Skip to content

Flutter tool crashes when you type Ctrl-\ #58391

Closed

Description

@Hixie

Steps to reproduce:

  • flutter analyze --watch or flutter run
  • Press ^\ (Ctrl Backslash).

Tool crashes.

Activity

  1. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: qualityA truly polished experience
    P2Important issues not at the top of the work list
    on May 31, 2020
  2. jason-simmons commented on Jun 2, 2020

    @jason-simmons
    Member

    Ctrl-\ sends a SIGQUIT to child processes. The Dart SDK provides a SIGQUIT handler that starts up or shuts down the VM service. The handler also prints an "Observatory listening" or "Observatory no longer listening" message.

    This works as expected when I use flutter run. What are you seeing when flutter run crashes in your environment? Does the tool dump a stack trace?

    Ctrl-\ does crash the tool when I run flutter analyze --watch. flutter analyze --watch is starting an analysis server child process that writes JSON messages on its stdout. Pressing ctrl-\ causes the child process to write the "Observatory listening" message to stdout. The tool then tries to parse this as JSON and throws.

    The VM service apparently supports a SILENT_OBSERVATORY property that will disable the observatory messages (https://github.com/dart-lang/sdk/blob/master/sdk/lib/_internal/vm/bin/vmservice_server.dart#L9).

    The tool could pass this flag to the analysis server command line. Or it could just skip any lines in the analysis server's output that do not parse as valid JSON.

  3. Hixie commented on Jan 21, 2021

    @Hixie
    ContributorAuthor

    Yeah I can only repro this for the analysis case.

  4. darshankawar commented on Apr 14, 2021

    @darshankawar
    Member

    Replicable using latest stable version.

    dhs@Dhss-MacBook-Pro macbug % flutter analyze --watch
    Analyzing /Users/dhs/Documents/NCFlutter/macbug...                  55ms
       info • Avoid using web-only libraries outside Flutter web plugin packages • lib/main.dart:1:1 • avoid_web_libraries_in_flutter
       info • Unused import: 'package:macbug/main.dart' • test/widget_test.dart:11:8 • unused_import
      error • The function 'MyApp' isn't defined • test/widget_test.dart:16:29 • undefined_function
    3 issues found. (3 new) • analyzed 3 files (ran in 0.07s)
    ^\Observatory listening on http://127.0.0.1:52358/0CzJP3IwqJU=/
    
    Oops; flutter has exited unexpectedly: "FormatException: Unexpected character (at character 1)
    Observatory listening on http://127.0.0.1:52359/QVxc9lynYEk=/
    ^
    ".
    A crash report has been written to /Users/dhs/Documents/NCFlutter/macbug/flutter_01.log.
    This crash may already be reported. Check GitHub for similar crashes.
    https://github.com/flutter/flutter/issues?q=is%3Aissue+FormatException%3A+Unexpected+character+%28at+character+1%29%0AObservatory+listening+on+http%3A%2F%2F127.0.0.1%3A52359%2FQVxc9lynYEk%3D%2F%0A%5E%0A
    
    To report your crash to the Flutter team, first read the guide to filing a bug.
    https://flutter.dev/docs/resources/bug-reports
    
    Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
    https://git.io/JOsRT
    
    dhs@Dhss-MacBook-Pro macbug % 
    
    
    flutter doctor -v
    [✓] Flutter (Channel stable, 2.0.4, on Mac OS X 10.15.4 19E2269 darwin-x64,
        locale en-GB)
        • Flutter version 2.0.4 at /Users/dhs/documents/fluttersdk/flutter
        • Framework revision b1395592de (7 days ago), 2021-04-01 14:25:01 -0700
        • Engine revision 2dce47073a
        • Dart version 2.12.2
    
    [!] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.3, Build version 12C33
        ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
            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 upgrade see
          https://guides.cocoapods.org/using/getting-started.html#installation for
          instructions.
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)    
    
    [✓] VS Code (version 1.55.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.20.0
    
    [✓] Connected device (3 available)
        • SM A260G (mobile)            • 5200763ebcfa861f • android-arm    • Android
          8.1.0 (API 27)
        • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
          • iOS 14.4.1
        • macOS (desktop)           • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)              • chrome                                   •
          web-javascript • Google Chrome 89.0.4389.114
    
    ! Doctor found issues in 1 category.
    
    
  5. dam-ease commented on May 9, 2023

    @dam-ease

    I am able to reproduce this issue on the latest master and stable channels.

    Details
    Oops; flutter has exited unexpectedly: "FormatException: Unexpected character (at character 1)
    The Dart VM service is listening on http://127.0.0.1:50245/vBMtGcJD6io=/
    ^
    ".
    Oops; flutter has exited unexpectedly: "FormatException: Unexpected character (at character 1)
    The Dart VM service is listening on http://127.0.0.1:50245/vBMtGcJD6io=/
    ^
    ".
    A crash report has been written to /Users/dammya/triage/flutter_master/flutter_01.log.
    This crash may already be reported. Check GitHub for similar crashes.
    https://github.com/flutter/flutter/issues?q=is%3Aissue+FormatException%3A+Unexpected+character+%28at+character+1%29%0AThe+Dart+VM+service+is+listening+on+http%3A%2F%2F127.0.0.1%3A49999%2FrXEN7QEU3b4%3D%2F%0A%5E%0A
    
    To report your crash to the Flutter team, first read the guide to filing a bug.
    https://flutter.dev/docs/resources/bug-reports
    
    Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
    https://github.com/flutter/flutter/issues/new?title=%5Btool_crash%5D+FormatException&body=%23%23+Command%0A%60%60%60%0Aflutter+analyze+--watch%0A%60%60%60%0A%0A%23%23+Steps+to+Reproduce%0A1.+...%0A2.+...%0A3.+...%0A%0A%23%23+Logs%0AFormatException%0A%60%60%60%0A%230++++++_ChunkedJsonParser.fail+%28dart%3Aconvert-patch%2Fconvert_patch.dart%3A1383%3A5%29%0A%231++++++_ChunkedJsonParser.parseNumber+%28dart%3Aconvert-patch%2Fconvert_patch.dart%3A1250%3A9%29%0A%232++++++_ChunkedJsonParser.parse+%28dart%3Aconvert-patch%2Fconvert_patch.dart%3A915%3A22%29%0A%233++++++_parseJson+%28dart%3Aconvert-patch%2Fconvert_patch.dart%3A35%3A10%29%0A%234++++++JsonDecoder.convert+%28dart%3Aconvert%2Fjson.dart%3A610%3A36%29%0A%235++++++JsonCodec.decode+%28dart%3Aconvert%2Fjson.dart%3A216%3A41%29%0A%236++++++AnalysisServer._handleServerResponse+%28package%3Aflutter_tools%2Fsrc%2Fdart%2Fanalysis.dart%3A140%3A35%29%0A%237++++++_rootRunUnary+%28dart%3Aasync%2Fzone.dart%3A1406%3A47%29%0A%238++++++_CustomZone.runUnary+%28dart%3Aasync%2Fzone.dart%3A1307%3A19%29%0A%239++++++_CustomZone.runUnaryGuarded+%28dart%3Aasync%2Fzone.dart%3A1216%3A7%29%0A%2310+++++_BufferingStreamSubscription._sendData+%28dart%3Aasync%2Fstream_impl.dart%3A339%3A11%29%0A%2311+++++_BufferingStreamSubscription._add+%28dart%3Aasync%2Fstream_impl.dart%3A271%3A7%29%0A%2312+++++_SinkTransformerStreamSubscription._add+%28dart%3Aasync%2Fstream_transformers.dart%3A63%3A11%29%0A%2313+++++_EventSinkWrapper.add+%28dart%3Aasync%2Fstream_transformers.dart%3A13%3A11%29%0A%2314+++++_StringAdapterSink.add+%28dart%3Aconvert%2Fstring_conversion.dart%3A238%3A11%29%0A%2315+++++_LineSplitterSink._addLines+%28dart%3Aconvert%2Fline_splitter.dart%3A153%3A13%29%0A%2316+++++_LineSplitterSink.addSlice+%28dart%3Aconvert%2Fline_splitter.dart%3A128%3A5%29%0A%2317+++++StringConversionSinkMixin.add+%28dart%3Aconvert%2Fstring_conversion.dart%3A163%3A5%29%0A%2318+++++_SinkTransformerStreamSubscription._handleData+%28dart%3Aasync%2Fstream_transformers.dart%3A111%3A24%29%0A%2319+++++_rootRunUnary+%28dart%3Aasync%2Fzone.dart%3A1406%3A47%29%0A%2320+++++_CustomZone.runUnary+%28dart%3Aasync%2Fzone.dart%3A1307%3A19%29%0A%2321+++++_CustomZone.runUnaryGuarded+%28dart%3Aasync%2Fzone.dart%3A1216%3A7%29%0A%2322+++++_BufferingStreamSubscription._sendData+%28dart%3Aasync%2Fstream_impl.dart%3A339%3A11%29%0A%2323+++++_BufferingStreamSubscription._add+%28dart%3Aasync%2Fstream_impl.dart%3A271%3A7%29%0A%2324+++++_SinkTransformerStreamSubscription._add+%28dart%3Aasync%2Fstream_transformers.dart%3A63%3A11%29%0A%60%60%60%0A%60%60%60%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Flutter+%28Channel+stable%2C+3.7.12%2C+on+macOS+13.3+22E252+darwin-arm64%2C+locale+en-NG%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+version+3.7.12+on+channel+stable+at+%2FUsers%2Fdammya%2Fsdks%2Fflutter%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Upstream+repository+https%3A%2F%2Fgithub.com%2Fflutter%2Fflutter.git%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Framework+revision+4d9e56e694+%283+weeks+ago%29%2C+2023-04-17+21%3A47%3A46+-0400%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Engine+revision+1a65d409c7%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Dart+version+2.19.6%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+DevTools+version+2.20.1%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Android+toolchain+-+develop+for+Android+devices+%28Android+SDK+version+32.1.0-rc1%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Android+SDK+at+%2FUsers%2Fdammya%2FLibrary%2FAndroid%2Fsdk%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Platform+android-33%2C+build-tools+32.1.0-rc1%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+ANDROID_HOME+%3D+%2FUsers%2Fdammya%2FLibrary%2FAndroid%2Fsdk%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Java+binary+at%3A+%2FApplications%2FAndroid+Studio.app%2FContents%2Fjre%2FContents%2FHome%2Fbin%2Fjava%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Java+version+OpenJDK+Runtime+Environment+%28build+11.0.12%2B0-b1504.28-7817840%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+All+Android+licenses+accepted.%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Xcode+-+develop+for+iOS+and+macOS+%28Xcode+14.3%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Xcode+at+%2FApplications%2FXcode.app%2FContents%2FDeveloper%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Build+14E222b%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+CocoaPods+version+1.11.3%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Chrome+-+develop+for+the+web%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Chrome+at+%2FApplications%2FGoogle+Chrome.app%2FContents%2FMacOS%2FGoogle+Chrome%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Android+Studio+%28version+2021.2%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Android+Studio+at+%2FApplications%2FAndroid+Studio.app%2FContents%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F9212-flutter%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Dart+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F6351-dart%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Java+version+OpenJDK+Runtime+Environment+%28build+11.0.12%2B0-b1504.28-7817840%29%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+IntelliJ+IDEA+Community+Edition+%28version+2022.3.2%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+IntelliJ+at+%2FApplications%2FIntelliJ+IDEA+CE.app%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F9212-flutter%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Dart+plugin+can+be+installed+from%3A%0A++++++%F0%9F%94%A8+https%3A%2F%2Fplugins.jetbrains.com%2Fplugin%2F6351-dart%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+VS+Code+%28version+1.78.0%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+VS+Code+at+%2FApplications%2FVisual+Studio+Code.app%2FContents%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+extension+version+3.50.0%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+VS+Code+%28version+1.78.0%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+VS+Code+at+%2FUsers%2Fdammya%2F.Trash%2FVisual+Studio+Code+20.07.05.app%2FContents%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Flutter+extension+version+3.50.0%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+Connected+device+%284+available%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+sdk+gphone+arm64+%28mobile%29++%E2%80%A2+emulator-5554++++++++++++++++++++++++%E2%80%A2+android-arm64++%E2%80%A2+Android+11+%28API+30%29%0A++++++%28emulator%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+iPhone+14+Pro+Max+%28mobile%29+%E2%80%A2+D7F3302D-D66F-4B89-B8CF-DBEE1CDB5449+%E2%80%A2+ios++++++++++++%E2%80%A2%0A++++++com.apple.CoreSimulator.SimRuntime.iOS-16-4+%28simulator%29%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+macOS+%28desktop%29++++++++++++%E2%80%A2+macos++++++++++++++++++++++++++++++++%E2%80%A2+darwin-arm64+++%E2%80%A2+macOS+13.3+22E252%0A++++++darwin-arm64%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+Chrome+%28web%29+++++++++++++++%E2%80%A2+chrome+++++++++++++++++++++++++++++++%E2%80%A2+web-javascript+%E2%80%A2+Google+Chrome%0A++++++112.0.5615.137%0A%0A%1B%5B32m%5B%E2%9C%93%5D%1B%5B39m+HTTP+Host+Availability%0A++++%1B%5B32m%E2%80%A2%1B%5B39m+All+required+HTTP+hosts+are+available%0A%0A%1B%5B32m%E2%80%A2%1B%5B39m+No+issues+found%21%0A%0A%60%60%60%0A%0A%23%23+Flutter+Application+Metadata%0A%2A%2AType%2A%2A%3A+app%0A%2A%2AVersion%2A%2A%3A+1.0.0%2B1%0A%2A%2AMaterial%2A%2A%3A+true%0A%2A%2AAndroid+X%2A%2A%3A+false%0A%2A%2AModule%2A%2A%3A+false%0A%2A%2APlugin%2A%2A%3A+false%0A%2A%2AAndroid+package%2A%2A%3A+null%0A%2A%2AiOS+bundle+identifier%2A%2A%3A+null%0A%2A%2ACreation+channel%2A%2A%3A+stable%0A%2A%2ACreation+framework+version%2A%2A%3A+4d9e56e694b656610ab87fcf2efbcd226e0ed8cf%0A%0A&labels=tool%2Csevere%3A+crash
    
  6. self-assigned this
    on Jul 7, 2025
  7. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jul 8, 2025
  8. github-actions commented on Jul 22, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: qualityA truly polished experiencec: crashStack traces logged to the consolefound in release: 3.11Found to occur in 3.11found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions