Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when formatting: [UnterminatedString] String starting with ' must end with '. #492

Closed
hermantai opened this issue Jul 13, 2019 · 1 comment

Comments

@hermantai
Copy link

I followed the flutter web startup guide, then got a crash when using webdev:

flutter_web/examples/hello_world$ flutter pub upgrade
$ flutter pub global activate webdev
$ webdev serve --auto restart
Crash when formatting: [UnterminatedString] String starting with ' must end with '.
RangeError (index): Invalid value: Not in range 0..267128, inclusive: 271102
#0 _StringBase.[] (dart:core-patch/string_patch.dart:246:55)
#1 Source.getTextLine (package:kernel/ast.dart:6227:42)
#2 getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3 format (package:front_end/src/fasta/command_line_reporting.dart:83:27)
#4 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:205:9)
#5 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:226:29)
#6 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:68:13)
#7 Loader.addMessage (package:front_end/src/fasta/loader.dart:279:20)
#8 Loader.addProblem (package:front_end/src/fasta/loader.dart:230:12)
#9 LibraryBuilder.addProblem (package:front_end/src/fasta/builder/library_builder.dart:110:19)
#10 KernelLibraryBuilder.addProblem (package:front_end/src/fasta/kernel/kernel_library_builder.dart:256:47)
#11 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:230:17)

#12 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:267:26)

#13 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:198:13)

#14 KernelTarget.buildOutlines. (package:front_end/src/fasta/kernel/kernel_target.dart:248:20)

#15 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#16 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:246:12)

#17 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:110:28)

#18 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#19 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:58:10)

#20 generateKernel. (package:front_end/src/kernel_generator_impl.dart:41:18)

#21 CompilerContext.runWithOptions. (package:front_end/src/fasta/compiler_context.dart:134:20)

#22 CompilerContext.runInContext.. (package:front_end/src/fasta/compiler_context.dart:122:46)
#23 new Future.sync (dart:async/future.dart:224:31)
#24 CompilerContext.runInContext. (package:front_end/src/fasta/compiler_context.dart:122:19)
#25 _rootRun (dart:async/zone.dart:1124:13)
#26 _CustomZone.run (dart:async/zone.dart:1021:19)
#27 _runZoned (dart:async/zone.dart:1516:10)
#28 runZoned (dart:async/zone.dart:1463:12)
#29 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#30 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10)
#31 generateKernel (package:front_end/src/kernel_generator_impl.dart:40:32)

#32 kernelForComponent (package:front_end/src/api_prototype/kernel_generator.dart:83:17)

#33 SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:278:11)

#34 Compiler.compile. (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:145:31)

#35 new Future. (dart:async/future.dart:176:37)
#36 _rootRun (dart:async/zone.dart:1120:38)
#37 _CustomZone.run (dart:async/zone.dart:1021:19)
#38 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#39 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#40 _rootRun (dart:async/zone.dart:1124:13)
#41 _CustomZone.run (dart:async/zone.dart:1021:19)
#42 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)
#43 Timer._createTimer. (dart:async-patch/timer_patch.dart:21:15)
#44 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
#45 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#46 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Crash when compiling file:///Users/htaihm/.pub-cache/global_packages/webdev/bin/webdev.dart.snapshot,
at character offset 268909:
RangeError (index): Invalid value: Not in range 0..267128, inclusive: 271102
#0 _StringBase.[] (dart:core-patch/string_patch.dart:246:55)
#1 Source.getTextLine (package:kernel/ast.dart:6227:42)
#2 getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3 format (package:front_end/src/fasta/command_line_reporting.dart:83:27)
#4 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:205:9)
#5 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:226:29)
#6 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:68:13)
#7 Loader.addMessage (package:front_end/src/fasta/loader.dart:279:20)
#8 Loader.addProblem (package:front_end/src/fasta/loader.dart:230:12)
#9 LibraryBuilder.addProblem (package:front_end/src/fasta/builder/library_builder.dart:110:19)
#10 KernelLibraryBuilder.addProblem (package:front_end/src/fasta/kernel/kernel_library_builder.dart:256:47)
#11 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:230:17)

#12 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:267:26)

#13 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:198:13)

#14 KernelTarget.buildOutlines. (package:front_end/src/fasta/kernel/kernel_target.dart:248:20)

#15 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#16 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:246:12)

#17 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:110:28)

#18 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#19 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:58:10)

#20 generateKernel. (package:front_end/src/kernel_generator_impl.dart:41:18)

#21 CompilerContext.runWithOptions. (package:front_end/src/fasta/compiler_context.dart:134:20)

#22 CompilerContext.runInContext.. (package:front_end/src/fasta/compiler_context.dart:122:46)
#23 new Future.sync (dart:async/future.dart:224:31)
#24 CompilerContext.runInContext. (package:front_end/src/fasta/compiler_context.dart:122:19)
#25 _rootRun (dart:async/zone.dart:1124:13)
#26 _CustomZone.run (dart:async/zone.dart:1021:19)
#27 _runZoned (dart:async/zone.dart:1516:10)
#28 runZoned (dart:async/zone.dart:1463:12)
#29 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#30 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10)
#31 generateKernel (package:front_end/src/kernel_generator_impl.dart:40:32)

#32 kernelForComponent (package:front_end/src/api_prototype/kernel_generator.dart:83:17)

#33 SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:278:11)

#34 Compiler.compile. (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:145:31)

#35 new Future. (dart:async/future.dart:176:37)
#36 _rootRun (dart:async/zone.dart:1120:38)
#37 _CustomZone.run (dart:async/zone.dart:1021:19)
#38 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#39 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#40 _rootRun (dart:async/zone.dart:1124:13)
#41 _CustomZone.run (dart:async/zone.dart:1021:19)
#42 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)
#43 Timer._createTimer. (dart:async-patch/timer_patch.dart:21:15)
#44 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
#45 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#46 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

#0 format (package:front_end/src/fasta/command_line_reporting.dart:126:5)
#1 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:205:9)
#2 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:226:29)
#3 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:68:13)
#4 Loader.addMessage (package:front_end/src/fasta/loader.dart:279:20)
#5 Loader.addProblem (package:front_end/src/fasta/loader.dart:230:12)
#6 LibraryBuilder.addProblem (package:front_end/src/fasta/builder/library_builder.dart:110:19)
#7 KernelLibraryBuilder.addProblem (package:front_end/src/fasta/kernel/kernel_library_builder.dart:256:47)
#8 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:230:17)

#9 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:267:26)

#10 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:198:13)

#11 KernelTarget.buildOutlines. (package:front_end/src/fasta/kernel/kernel_target.dart:248:20)

#12 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#13 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:246:12)

#14 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:110:28)

#15 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)

#16 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:58:10)

#17 generateKernel. (package:front_end/src/kernel_generator_impl.dart:41:18)

#18 CompilerContext.runWithOptions. (package:front_end/src/fasta/compiler_context.dart:134:20)

#19 CompilerContext.runInContext.. (package:front_end/src/fasta/compiler_context.dart:122:46)
#20 new Future.sync (dart:async/future.dart:224:31)
#21 CompilerContext.runInContext. (package:front_end/src/fasta/compiler_context.dart:122:19)
#22 _rootRun (dart:async/zone.dart:1124:13)
#23 _CustomZone.run (dart:async/zone.dart:1021:19)
#24 _runZoned (dart:async/zone.dart:1516:10)
#25 runZoned (dart:async/zone.dart:1463:12)
#26 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:121:12)
#27 CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:132:10)
#28 generateKernel (package:front_end/src/kernel_generator_impl.dart:40:32)

#29 kernelForComponent (package:front_end/src/api_prototype/kernel_generator.dart:83:17)

#30 SingleShotCompilerWrapper.compileInternal (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:278:11)

#31 Compiler.compile. (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:145:31)

#32 new Future. (dart:async/future.dart:176:37)
#33 _rootRun (dart:async/zone.dart:1120:38)
#34 _CustomZone.run (dart:async/zone.dart:1021:19)
#35 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#36 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#37 _rootRun (dart:async/zone.dart:1124:13)
#38 _CustomZone.run (dart:async/zone.dart:1021:19)
#39 _CustomZone.bindCallback. (dart:async/zone.dart:947:23)
#40 Timer._createTimer. (dart:async-patch/timer_patch.dart:21:15)
#41 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
#42 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#43 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F132, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
brew install cocoapods
pod setup
[✗] iOS tools - develop for iOS devices
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew install ios-deploy
[✓] Android Studio (version 3.4)
[✓] IntelliJ IDEA Community Edition (version 2019.1.3)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.

$ dart --version
Dart VM version: 2.5.0-dev.1.0 (Tue Jul 9 15:27:01 2019 +0200) on "macos_x64"

This happens on macOS Mojave: 10.14.5

@grouma
Copy link
Member

grouma commented Aug 21, 2019

Sorry for the delayed reply here. This should no longer be an issue. I am unable to reproduce this with webdev version 2.5.0.

@grouma grouma closed this as completed Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants