apache / apache/cordova-plugin-media

iOS: Crash in [CDVSound startPlayingAudio:] with version 3.0.1 and 5.0.2

Open
#174 7 comments 0 reactions 0 assignees View on GitHub
platform: ios support
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

Hi there,

I am receiving crashreports from my users (via iTunesConnect) related to `[CDVSound startPlayingAudio:]`

It is very hard to reproduce this issue and it does not occur very often. May be releated to specific usage, devices or threading.

I wonder if this issue is already known and potentially fixed. I'll upgrade to version 5.0.1 and let you know if it still occurs.

Full logfile
[cdv.crash.txt](https://github.com/apache/cordova-plugin-media/files/2317915/cdv.crash.txt)

Interesting log sections:
```
Thread 32 Crashed:
0 AVFAudio 0x000000018a25880c AVAudioPlayerCpp::AQOutputCallbackCore(OpaqueAudioQueue*, AudioQueueBuffer*) + 180 (AVAudioPlayerCpp.mm:1250)
1 AVFAudio 0x000000018a257e84 AVAudioPlayerCpp::prepareToPlayQueue() + 224 (AVAudioPlayerCpp.mm:883)
2 AVFAudio 0x000000018a257e84 AVAudioPlayerCpp::prepareToPlayQueue() + 224 (AVAudioPlayerCpp.mm:883)
3 AVFAudio 0x000000018a257fe0 AVAudioPlayerCpp::playQueue(AudioTimeStamp const*) + 112 (AVAudioPlayerCpp.mm:956)
4 AVFAudio 0x000000018a256760 AVAudioPlayerCpp::play() + 80 (AVAudioPlayerCpp.mm:667)
5 AVFAudio 0x000000018a218414 -[AVAudioPlayer play] + 52 (AVAudioPlayer.mm:455)
6 MYAPP 0x00000001041a16d4 __30-[CDVSound startPlayingAudio:]_block_invoke + 1648 (CDVSound.m:402)
7 libdispatch.dylib 0x00000001841b4aa0 _dispatch_call_block_and_release + 24 (init.c:994)
8 libdispatch.dylib 0x00000001841b4a60 _dispatch_client_callout + 16 (object.m:507)
9 libdispatch.dylib 0x00000001841bbb84 _dispatch_queue_override_invoke$VARIANT$mp + 716 (inline_internal.h:2500)
10 libdispatch.dylib 0x00000001841c1cac _dispatch_root_queue_drain + 588 (inline_internal.h:2539)
11 libdispatch.dylib 0x00000001841c19fc _dispatch_worker_thread3 + 120 (queue.c:6092)
12 libsystem_pthread.dylib 0x00000001844e7fac _pthread_wqthread + 1176 (pthread.c:2297)
13 libsystem_pthread.dylib 0x00000001844e7b08 start_wqthread + 4
```

Contributor guide

Open the contributing guide

Research direction

Start by reading CDVSound.m around line 402, where the crash report enters startPlayingAudio:, and inspect the attached cdv.crash.txt for additional context. Determine the conditions behind the intermittent AVAudioPlayer crash and verify that the affected playback path no longer crashes on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.