Application crashes after unlocking the phone – "failed to attach to thread: Permission denied"
After upgrading my Flutter application from version 2.1 to 3.27, some errors appeared. I managed to resolve all null safety-related issues, but one critical error remains.
When I lock and then unlock the smartphone while the app is running, the application crashes, and I see the following messages in the terminal:
I/mx.fleetmonito(30053): Thread[6,tid=30064,WaitingInMainSignalCatcherLoop,Thread*=0xb4000071103b4be0,peer=0x131426a8,"Signal Catcher"]: reacting to signal 3
I/mx.fleetmonito(30053): Wrote stack traces to tombstoned
F/crash_dump64(31601): crash_dump.cpp:474] failed to attach to thread 813: Permission denied
No error appears in Sentry.
- Verified that all dependencies are updated.
- Reviewed Android permissions in
AndroidManifest.xml
. - Checked for any breaking changes in Flutter between versions 2.1 and 3.27.
- Debugged using logcat, but the messages don’t give clear clues about the root cause.
- What could be causing this crash when unlocking the phone?
- Are there any Flutter or Android changes between versions that could explain this behavior?
- How can I get more detailed logs to diagnose this issue further?
Environment:
- Flutter version: (insert exact version)
- Android version: (insert affected version)
- Device/Emulator: (specify if it happens on all devices or only some)
Any insights or suggestions would be greatly appreciated!