Repository navigation
Commit bb693d7
authored
[stable] [flutter_tools] Fix crash in symbolize command on stream error (#191605)
### Issue Link:
#191205
### Impact Description:
When running `flutter symbolize` on an obfuscated stack trace, if the underlying process output stream completes or encounters an error while a `Completer` is already resolved, `Symbolizer` crashes unexpectedly with `StateError: Bad state: Future already completed`. This causes the CLI to exit abruptly during stack deobfuscation and crash report generation.
### Changelog Description:
[flutter/191205] Prevent `StateError: Bad state: Future already completed` in `Symbolizer` by checking `completer.isCompleted` when handling stream errors and completions during stack symbolization.
### Workaround:
Manually deobfuscate stack traces using standalone `addr2line` / `atos` / `llvm-symbolizer` tools.
### Risk:
### Test Coverage:
### Validation Steps:
1. Generate an obfuscated stack trace using `flutter build apk --obfuscate --split-debug-info=...`.
2. Run `flutter symbolize --debug-info=<symbols-file> -i <stacktrace.txt>`.
3. Verify that `flutter symbolize` processes the stack trace without throwing `StateError: Bad state: Future already completed`.1 parent b3bc058 commit bb693d7
2 files changed
Lines changed: 29 additions & 1 deletion
File tree
- packages/flutter_tools
- lib/src/commands
- test/commands.shard/hermetic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
56 | 83 | | |
57 | 84 | | |
58 | 85 | | |
| |||
0 commit comments