Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in ios #34

Closed
yringler opened this issue Feb 4, 2020 · 7 comments
Closed

Crash in ios #34

yringler opened this issue Feb 4, 2020 · 7 comments
Assignees

Comments

@yringler
Copy link

yringler commented Feb 4, 2020

I'm seeing a crash in crashalytics. (I'm also using audio_service)

I notice that the free RAM looks limited. Do you think this is just because my app is currently RAM heavy?

Model: iPhone 6s
Version: 13.3.0 (17C54)
RAM free: 58.27 MB

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010
-[AudioPlayer broadcastPlaybackEvent]

Crashed: com.apple.main-thread
0  Runner                         0x10452d220 -[AudioPlayer broadcastPlaybackEvent] + 118 (AudioPlayer.m:118)
1  AVFoundation                   0x1c5f497d8 -[AVPlayerItem _unregisterInvokeAndReleasePendingSeekCompletionHandlerForSeekID:finished:] + 116
2  AVFoundation                   0x1c5f5dc24 __avplayeritem_fpItemNotificationCallback_block_invoke + 6380
3  libdispatch.dylib              0x1bbbea610 _dispatch_call_block_and_release + 24
4  libdispatch.dylib              0x1bbbeb184 _dispatch_client_callout + 16
5  libdispatch.dylib              0x1bbb9d190 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1044
6  CoreFoundation                 0x1bbe9c5e4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
7  CoreFoundation                 0x1bbe975d8 __CFRunLoopRun + 2004
8  CoreFoundation                 0x1bbe96adc CFRunLoopRunSpecific + 464
9  GraphicsServices               0x1c5e1c328 GSEventRunModal + 104
10 UIKitCore                      0x1bff91ae0 UIApplicationMain + 1936
11 Runner                         0x1044d3834 main + 7 (main.m:7)
12 libdyld.dylib                  0x1bbd20360 start + 4
@ryanheise
Copy link
Owner

It could be that _eventSink hasn't been initialised yet, so that method may need to have a guard like this:

if (!_eventSink) return;

I also have a lot to learn about iOS memory management still, so maybe it's something even more crazy like the self instance being free'd. But I'd start with the above guard first. In any case, I am going off to sleep now. You are of course welcome to try the above code suggestion and see if it works for you in the meantime, assuming you are able to reproduce the issue.

@ryanheise ryanheise self-assigned this Feb 4, 2020
@yringler
Copy link
Author

yringler commented Feb 4, 2020

Thank you! When the plugin is updated I'll use it and redeploy, and see if that stops this crash.

@ryanheise
Copy link
Owner

I've added the above line of code to the latest git commit if you'd like to test it.

@jonafeucht
Copy link

I've added the above line of code to the latest git commit if you'd like to test it.

Thanks! App works like a charm now. Would recommend releasing as fast as possible as this is quite the critical error on iOS

@ryanheise
Copy link
Owner

Great! I was waiting on confirmation on some other iOS code that will also be included in the release, but it seems that things are working well enough that you haven't noticed any issues so I've just published a new release. If you have some spare time, I would also appreciate your feedback on #35 .

@yringler
Copy link
Author

yringler commented Feb 6, 2020

It's been 24 hours, and I'm not seeing any crashes now that I'm using the latest commit.

One interesting bit of context: One beta tester showed me that the crash happened when

  1. audio was playing,
  2. he sent voice note in whatsapp

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants