-
Notifications
You must be signed in to change notification settings - Fork 1
Crashes
-
Get the Flutter Framework or Flutter Engine revision from the report. If you have the Engine revision, skip to step 3.
-
Get the Engine revision from the Framework (this could be automated). https://github.com/flutter/flutter/blob/master/bin/internal/engine.version is the file which contains the information. Substitute the framework hash for
master
in that url. -
With the full engine revision (e.g. cea5ed2b9be42a981eac762af3664e4a17d0a53f), you can now get the proper symbol files:
To view the available artifacts for a build, visit this URL in a browser (replacing the engine hash with your hash):
https://console.cloud.google.com/storage/browser/flutter_infra/flutter/cea5ed2b9be42a981eac762af3664e4a17d0a53f
To download the symbols for android-arm, download this URL using your browser (replacing the hash again, and noting that this URL is on a different host, "storage", compared to the one above, which uses "console"):
https://storage.cloud.google.com/flutter_infra/flutter/cea5ed2b9be42a981eac762af3664e4a17d0a53f/android-arm/symbols.zip
.You have to use your browser because it does authentication.
Once you have the symbols unzipped, you can use ndk-stack from your Android NDK. Suppose stack.txt
contains the stack (including the leading *** *** ***
line from the crash):
.../ndk/prebuilt/linux-x86_64/bin/ndk-stack -sym .../path/to/downloaded/symbols < stack.txt
Go to a commit page with the short commit as the last fragment of the URL: (e.g. https://github.com/flutter/flutter/commit/9cb914df1 or https://github.com/flutter/engine/commit/2a13567) and then find the full revision on the page.
If you have made your own builds, you can use ndk-stack directly:
# dev/engine is where your engine's .gclient file is
# android_debug_unopt is whatever build of your engine you are using
adb logcat | ~/dev/engine/src/third_party/android_tools/ndk/prebuilt/linux-x86_64/bin/ndk-stack -sym ~/dev/engine/src/out/android_debug_unopt
The dSYM file for App.framework
(which contains the app-specific code) can be located in the directory of your app under build/dSYMs.noindex/App.framework.dSYM
for release and profile builds created with flutter build ios
.
The dSYM file for Flutter.framework
(which is the Flutter Engine) for ios-release builds can be downloaded from Google Cloud Storage. Follow the steps from the Android section in this guide, but in the last step use a download url following this schema: https://storage.cloud.google.com/flutter_infra/flutter/38a646e14cc25f5a56a989c6a5787bf74e0ea386/ios-release/Flutter.dSYM.zip
(replace the engine hash with your hash).
If the crash is in AOT Dart code (in --release
or --profile
builds) on iOS, and you can build your own engine, these steps will be helpful for the VM team to fix the bug:
- Prepare a reduced test case.
- Compile the engine in profile mode and disable optimizations for symbolicated traces.
-
sky/tools/gn --ios --unopt --runtime-mode profile; ninja -C out/ios_profile_unopt -j800
.
-
- Launch the application via the Xcode project and make it crash in the debugger.
- File a bug on dart-lang/sdk.
- Dump the register state and paste it into the bug.
- In
lldb
,register read
.
- In
- Copy the backtrace and paste it into the bug.
- In
lldb
,thread backtrace
. Assumes you are on the thread that crashed. If not,thread select n
.
- In
- Disassemble the last frame and paste it into the bug.
- In
lldb
,frame select 0
thendisassemble --frame
.
- In
- Disassemble using the
gen_snapshot
and paste the function into the bug for more detailed information.- In the backtrace, look for the name of the precompiled function that caused the crash.
- Open
SnapshotterInvoke
from Xcode and to theRunCommand ... Snapshotter
call, add the--disassemble
flags. - Modify the
RunCommand
function to dump to a file. - Build again. The results should end up in the file.
- Look for the function name (by substring match) in this file and copy out that information to the bug.
- Ping someone on dart-lang/sdk.
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (master)
- Glossary
- Contributor Guide
- Chat on Discord
- Code of Conduct
- Issue triage reports
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Running and writing tests
- Release process
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems
- Setting up the Framework development environment
- The Framework architecture
- The flutter tool
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Engine disk footprint
- Comparing AOT Snapshot Sizes
- Custom Flutter engine embedders
- Custom Flutter Engine Embedding in AOT Mode
- Flutter engine operation in AOT Mode
- Engine-specific Service Protocol extensions
- Crashes
- Supporting legacy platforms
- Metal on iOS FAQ
- Engine Clang Tidy Linter
- Why we have a separate engine repo
- Reduce Flutter engine size with MLGO
- Setting up the Plugins development environment
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Plugin Tests
- Contributing to Plugins and Packages
- Releasing a Plugin or Package
- Unexpected Plugins and Packages failures