Issue 1:
Steps to Reproduce

Clone test project https://github.com/v3rm0n/mixin_coverage_error

Run flutter test --coverage

Logs

unhandled error during test:
/Users/maidokaara/Development/change/mixin_coverage_error/test/profile_bloc_test.dart
Bad state: Couldn't find line and column for token 180 in package:mixin_coverage_error/profile_bloc.dart.
#0 VMScript._lineAndColumn (package:vm_service_client/src/script.dart:243:5)
#1 _ScriptLocation._ensureLineAndColumn (package:vm_service_client/src/script.dart:314:26)
#2 _ScriptLocation.line (package:vm_service_client/src/script.dart:295:5)
#3 _getCoverageJson (package:coverage/src/collect.dart:99:45)
<asynchronous suspension>
#4 _getAllCoverage (package:coverage/src/collect.dart:51:26)
<asynchronous suspension>
#5 collect (package:coverage/src/collect.dart:35:18)
<asynchronous suspension>
#6 CoverageCollector.collectCoverage (package:flutter_tools/src/test/coverage_collector.dart:59:45)
<asynchronous suspension>
#7 CoverageCollector.handleFinishedTest (package:flutter_tools/src/test/coverage_collector.dart:27:11)
<asynchronous suspension>
#8 _FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:622:30)
<asynchronous suspension>
#9 _FlutterPlatform.loadChannel (package:flutter_tools/src/test/flutter_platform.dart:383:36)
#10 PlatformPlugin.load (package:test/src/runner/plugin/platform.dart:65:19)
<asynchronous suspension>
#11 Loader.loadFile.<anonymous closure> (package:test/src/runner/loader.dart:248:36)
<asynchronous suspension>
#12 new LoadSuite.<anonymous closure>.<anonymous closure> (package:test/src/runner/load_suite.dart:89:31)
<asynchronous suspension>
#13 invoke (package:test/src/utils.dart:242:5)
#14 new LoadSuite.<anonymous closure> (package:test/src/runner/load_suite.dart:88:7)
#15 Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test/src/backend/invoker.dart:403:25)
<asynchronous suspension>
#16 new Future.<anonymous closure> (dart:async/future.dart:176:37)
#17 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#18 StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#19 _rootRun (dart:async/zone.dart:1120:38)
#20 _CustomZone.run (dart:async/zone.dart:1021:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#22 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#23 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#24 StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#25 _rootRun (dart:async/zone.dart:1124:13)
#26 _CustomZone.run (dart:async/zone.dart:1021:19)
#27 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#28 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#29 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#30 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#31 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:169:12)

Analyzing mixin_coverage_error...
No issues found! (ran in 0.9s)

[✓] Flutter (Channel master, v0.5.9-pre.84, on Mac OS X 10.14 18A365a, locale en-EE)
• Flutter version 0.5.9-pre.84 at /Users/maidokaara/Programs/flutter
• Framework revision 3ae5ecebea (23 hours ago), 2018-08-19 06:25:00 -0400
• Engine revision 03f8ba51e3
• Dart version 2.1.0-dev.0.0.flutter-be6309690f

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/maidokaara/Library/Android/sdk
• Android NDK at /Users/maidokaara/Library/Android/sdk/ndk-bundle
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /Users/maidokaara/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 10.0, Build version 10L221o
• ios-deploy 1.9.2
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 27.1.3
• Dart plugin version 182.3911.37

[✓] VS Code (version 1.25.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.16.0

[!] Connected devices
! No devices available

! Doctor found issues in 1 category.

Issue 2:
when i try to run my application for the first time, i get these messages

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: 42166fb9f119ab6f)
Crash report written to /Users/yusuf/Documents/Flutter/flutter_app1/flutter_05.log;
please let us know at https://github.com/flutter/flutter/issues.

crash report

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter --no-color run --machine --device-id=F57A730B-8D40-41B7-8F5C-67140B7296B9 lib/main.dart

exception

FileSystemException: FileSystemException: Cannot open file, path = '/Users/yusuf/Documents/Flutter/flutter_app1/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java' (OS Error: Permission denied, errno = 13)

#0 _File.throwIfError (dart:io/file_impl.dart:647)
#1 _File.openSync (dart:io/file_impl.dart:491)
#2 _File.writeAsBytesSync (dart:io/file_impl.dart:616)
#3 _File.writeAsStringSync (dart:io/file_impl.dart:640)
#4 LocalFileSystemEntity&ForwardingFile.writeAsStringSync (package:file/src/forwarding/forwarding_file.dart:147)
#5 _writeAndroidPluginRegistrant (package:flutter_tools/src/plugins.dart:156)
#6 injectPlugins (package:flutter_tools/src/plugins.dart:238)
#7 FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:62)
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:332)
<asynchronous suspension>
#9 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:279)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#11 _rootRun (dart:async/zone.dart:1126)
#12 _CustomZone.run (dart:async/zone.dart:1023)
#13 runZoned (dart:async/zone.dart:1501)
#14 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#15 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:270)
#16 CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#17 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:309)
<asynchronous suspension>
#18 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#19 _rootRun (dart:async/zone.dart:1126)
#20 _CustomZone.run (dart:async/zone.dart:1023)
#21 runZoned (dart:async/zone.dart:1501)
#22 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#23 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)
<asynchronous suspension>
#24 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#25 new Future.sync (dart:async/future.dart:222)
#26 CommandRunner.run (package:args/command_runner.dart:109)
#27 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#28 run.<anonymous closure> (package:flutter_tools/runner.dart:59)
<asynchronous suspension>
#29 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#30 _rootRun (dart:async/zone.dart:1126)
#31 _CustomZone.run (dart:async/zone.dart:1023)
#32 runZoned (dart:async/zone.dart:1501)
#33 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#34 runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#35 run (package:flutter_tools/runner.dart:50)
#36 main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#37 main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#38 _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#39 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

flutter doctor

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale en-US)
• Flutter version 0.5.1 at /Users/yusuf/flutter
• Framework revision c7ea3ca377 (7 weeks ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
• Android SDK at /Users/yusuf/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.1.5)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 26.0.2
• Dart plugin version 181.4892.1

[✓] Connected devices (1 available)
• iPhone X • F57A730B-8D40-41B7-8F5C-67140B7296B9 • ios • iOS 11.4 (simulator)

• No issues found!