Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Chrome crashes when starting Flutter Web app in debug mode with breakpoints setΒ #90844

@obeobe

Description

@obeobe

Chrome crashes when starting Flutter Web app in debug mode with breakpoints set

Steps to Reproduce

  1. Create the Flutter Counter demo project.
  2. Add many breakpoints. I added 26 breakpoints:
Screenshot

image

  1. Start the program in Chrome, in debug mode: (I only tried this with Android Studio and IntelliJ).
    image

Expected results:
The program starts in Chrome.

Actual results:
4. Chrome will likely crash with an "Aw, Snap!" message, with error code "SIGILL".
5. If I refresh the browser - I will likely get it again. And again. And again.
6. Eventually, the page will load correctly. From that point on - it will keep loading correctly with additional refreshes, until I close it and start again.
7. The more breakpoints I add - the more likely it is to crash when it's opened, and the more times I need to refresh the page afterwards until it starts to work.

Note: this issue is not new for the recent Flutter version; I've had it since I started using Flutter, several months ago.

Logs
[  +62 ms] executing: uname -m
[  +31 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +5 ms] executing: [/home/user/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +8 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] ffb2ecea5223acdd139a5039be2f9c796962833d
[        ] executing: [/home/user/flutter/] git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
[  +11 ms] Exit code 0 from: git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
[        ] 2.5.1
[   +6 ms] executing: [/home/user/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +8 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/home/user/flutter/] git ls-remote --get-url origin
[   +4 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +77 ms] executing: [/home/user/flutter/] git rev-parse --abbrev-ref HEAD
[   +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +54 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +59 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +64 ms] Skipping pub get: version match.
[  +93 ms] Generating /home/user/tmp/2021-09-27.2/test5/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[{"event":"daemon.connected","params":{"version":"0.6.1","pid":826353}}]
[{"event":"app.start","params":{"appId":"d208f67c-74c5-4061-8d19-4221950063a9","deviceId":"chrome","directory":"/home/user/tmp/2021-09-27.2/test5","supportsRestart":true,"launchMode":"run"}}]
[ +126 ms] Launching lib/main.dart on Chrome in debug mode...
[  +82 ms] Updating assets
Waiting for connection from debug service on Chrome...
[{"event":"app.progress","params":{"appId":"d208f67c-74c5-4061-8d19-4221950063a9","id":"0","progressId":null,"message":"Waiting for connection from debug service on Chrome...","finished":false}}]
[ +101 ms] <- reset
[   +6 ms] /home/user/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/user/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root /home/user/flutter/bin/cache/flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -Dflutter.inspector.structuredErrors=true -DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.OSANXP/flutter_tool.UHCLXC/app.dill --libraries-spec file:///home/user/flutter/bin/cache/flutter_web_sdk/libraries.json --packages /home/user/tmp/2021-09-27.2/test5/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root /tmp/flutter_tools.OSANXP/flutter_tools.WHXMXX --filesystem-scheme org-dartlang-app --initialize-from-dill build/9da3ff2a5297e0c47025236ff84e71f4.cache.dill.track.dill --platform file:///home/user/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety
[  +11 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[{"event":"app.progress","params":{"appId":"d208f67c-74c5-4061-8d19-4221950063a9","id":"0","progressId":null,"finished":true}}]
[+12927 ms] Synced 26.2MB.
[        ] <- accept
[        ] Caching compiled dill
[ +102 ms] Using Google Chrome 94.0.4606.54 

[  +33 ms] executing: uname -m
[   +9 ms] Exit code 0 from: uname -m
[        ] x86_64
[ +155 ms] [CHROME]:
[        ] [CHROME]:DevTools listening on ws://127.0.0.1:37385/devtools/browser/175a7ad5-c7ee-4c17-b390-5f475bba1593
[{"event":"app.webLaunchUrl","params":{"url":"http://localhost:37229","launched":true}}]
[ +308 ms] DwdsInjector: Received request for entrypoint at http://localhost:37229/main_module.bootstrap.js
[   +6 ms] MetadataProvider: Loading debug metadata...
[  +18 ms] MetadataProvider: Loaded debug metadata (sound null safety)
[   +4 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:37229/main_module.bootstrap.js
[+1926 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[  +65 ms] DevHandler: Debug service listening on ws://127.0.0.1:43725/LbsTbcQwKa4=/ws

[  +19 ms] This app is linked to the debug service: ws://127.0.0.1:43725/LbsTbcQwKa4=/ws
[   +5 ms] Debug service listening on ws://127.0.0.1:43725/LbsTbcQwKa4=/ws
[        ] πŸ’ͺ Running with sound null safety πŸ’ͺ
[{"event":"app.started","params":{"appId":"d208f67c-74c5-4061-8d19-4221950063a9"}}]
Debug service listening on ws://127.0.0.1:43725/LbsTbcQwKa4=/ws
[{"event":"app.debugPort","params":{"appId":"d208f67c-74c5-4061-8d19-4221950063a9","port":43725,"wsUri":"ws://127.0.0.1:43725/LbsTbcQwKa4=/ws"}}]
user@ubuntu:~/tmp/2021-09-27.2/test5 $ flutter analyze
Analyzing test5...
No issues found! (ran in 1.0s)
[βœ“] Flutter (Channel stable, 2.5.1, on Ubuntu 20.04.1 LTS 5.8.0-59-generic, locale en_US.UTF-8)
β€’ Flutter version 2.5.1 at /home/user/flutter
β€’ Upstream repository https://github.com/flutter/flutter.git
β€’ Framework revision ffb2ecea52 (10 days ago), 2021-09-17 15:26:33 -0400
β€’ Engine revision b3af521a05
β€’ Dart version 2.14.2
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
β€’ Android SDK at /home/user/Android/Sdk
βœ— cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
βœ— Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[βœ“] Chrome - develop for the web
β€’ CHROME_EXECUTABLE = /usr/bin/google-chrome
[βœ“] Linux toolchain - develop for Linux desktop
β€’ clang version 10.0.0-4ubuntu1
β€’ cmake version 3.16.3
β€’ ninja version 1.10.0
β€’ pkg-config version 0.29.1
[βœ“] Android Studio (version 4.2)
β€’ Android Studio at /home/user/Downloads/android-studio
β€’ Flutter plugin version 58.0.1
β€’ Dart plugin version 202.8488
β€’ Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
[βœ“] IntelliJ IDEA Ultimate Edition (version 2020.2)
β€’ IntelliJ at /snap/intellij-idea-ultimate/253
β€’ Flutter plugin version 59.0.1
β€’ Dart plugin version 202.8531
[βœ“] IntelliJ IDEA Ultimate Edition (version 2021.2)
β€’ IntelliJ at /home/user/Downloads/ideaIU-2021.2.1/idea-IU-212.5080.55
β€’ Flutter plugin version 60.1.4
β€’ Dart plugin version 212.5080.8
[βœ“] Connected device (2 available)
β€’ Linux (desktop) β€’ linux  β€’ linux-x64      β€’ Ubuntu 20.04.1 LTS 5.8.0-59-generic
β€’ Chrome (web)    β€’ chrome β€’ web-javascript β€’ Google Chrome 94.0.4606.54
! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationdependency: dartDart team may need to help usfound in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: duplicateIssue is closed as a duplicate of an existing issuetoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions