question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Crash when "hot restart" (with crash report & cause of it)

See original GitHub issue

When running the sample app and click “hot restart”, the app crashes (iOS emulator and iOS device).

The crash report says

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: Assertion failed: (flautoPlayerSlots[slotNo] == [NSNull null]), function -[FlautoPlayerManager handleMethodCall:result:], file /Users/tom/RefCode/flutter_sound-4/ios/Classes/FlutterSoundPlayer.m, line 104.

CoreSimulator 704.12.2 - Device: iPhone SE (2nd generation) (9FF71C9F-9919-4E46-BF44-4292C0AB5C10) - Runtime: iOS 13.5 (17F61) - DeviceType: iPhone SE (2nd generation)

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff51b617fa __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff51c0cbc1 pthread_kill + 432 2 libsystem_c.dylib 0x00007fff51af0b7c abort + 120 3 libsystem_c.dylib 0x00007fff51aefe36 __assert_rtn + 314 4 com.dooboolab.FlutterSoundDemo 0x0000000104d02134 -[FlautoPlayerManager handleMethodCall:result:] + 788 5 io.flutter.flutter 0x0000000106a889df __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104 6 io.flutter.flutter 0x0000000106a17622 flutter::PlatformMessageRouter::HandlePlatformMessage(fml::RefPtrflutter::PlatformMessage) const + 166 7 io.flutter.flutter 0x0000000106a1b77a flutter::PlatformViewIOS::HandlePlatformMessage(fml::RefPtrflutter::PlatformMessage) + 38 8 io.flutter.flutter 0x0000000106a826bb std::__1::__function::__func<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtrflutter::PlatformMessage):😒_32, std::__1::allocator<flutter::Shell::OnEngineHandlePlatformMessage(fml::RefPtrflutter::PlatformMessage):😒_32>, void ()>::operator()() + 57 9 io.flutter.flutter 0x0000000106a2c267 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 117 10 io.flutter.flutter 0x0000000106a311b4 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 26 11 com.apple.CoreFoundation 0x00007fff23da14b4 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20 12 com.apple.CoreFoundation 0x00007fff23da114e __CFRunLoopDoTimer + 1038 13 com.apple.CoreFoundation 0x00007fff23da07aa __CFRunLoopDoTimers + 282 14 com.apple.CoreFoundation 0x00007fff23d9b3fe __CFRunLoopRun + 1950 15 com.apple.CoreFoundation 0x00007fff23d9a944 CFRunLoopRunSpecific + 404 16 com.apple.GeoServices 0x00007fff38ba6c1a GSEventRunModal + 139 17 com.apple.UIKitCore 0x00007fff48c8b9ec UIApplicationMain + 1605 18 com.dooboolab.FlutterSoundDemo 0x0000000104cfd4db main + 75 (AppDelegate.swift:5) 19 libdyld.dylib 0x00007fff51a231fd start + 1

so the most important line is :

Application Specific Information:
Assertion failed: (flautoPlayerSlots[slotNo] == [NSNull null]), function -[FlautoPlayerManager handleMethodCall:result:], file /Users/tom/RefCode/flutter_sound-4/ios/Classes/FlutterSoundPlayer.m, line 104.

maybe caused by the resource not get freed when hot restarting.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

2reactions
felixjunghanscommented, Aug 25, 2020

I have a similar problem. If I open an AudioSession in my app at start (for example to start recordings) and then hot restart the app, the app crashes when I try to open an AudioSession again. Unfortunately I have not found a way to kill the old AudioSession. Because after the hot restart flutter_sound has no open audio session anymore. But on native iOS the AudioSession is still running.

1reaction
Larpouxcommented, Feb 11, 2021

Fixed in Flutter Sound release 7.6.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing issues using crash reports and device logs
When receiving crash reports for your app, use them to understand the stability problems the app is having. A crash report describes how...
Read more >
How To Debug A Crash When The Crash Report Is Corrupted
A corrupted crash report from Crashlytics means the stack trace won't help you in error debugging. Embrace's User Timeline shows every user ...
Read more >
Game crashes or closes unexpectedly - Microsoft Support
Symptoms of the problem · Method 1: Check for the latest update for the game · Method 2: Restart the computer by using...
Read more >
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
How to Diagnose App Issues Using Crash Logs - Papertrail
When apps crash, they generate logs containing information related to where the issues causing the crash occurred. Looking at these logs is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found