Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What could be causing this iOS MediaPlayer crash?

We've received some crash reports with stack traces that are difficult for us to decipher. The stack trace is entirely within MediaPlayer, Foundation, CoreFoundation and libsystem_c.dylib. Unfortunately we haven't been able to reproduce on any of our development devices so troubleshooting is proving problematic.

Here's an example of the stack trace. Has anyone seen anything like this or have any pointers of what could be causing this crash?

EXC_BAD_ACCESS KERN_PROTECTION_FAILURE at 0x000000016fc47fe0
Thread : Crashed: com.apple.main-thread
0   libsystem_c.dylib              0x0000000196a0624c localeconv_l
1   libsystem_c.dylib              0x0000000196a55d6c __vfprintf + 108
2   libsystem_c.dylib              0x0000000196a73680 __v2printf + 588
3   libsystem_c.dylib              0x0000000196a0620c _vsnprintf + 304
4   libsystem_c.dylib              0x0000000196a06c58 snprintf_l + 24
5   CoreFoundation                 0x000000018462b01c __CFStringAppendFormatCore + 11584
6   CoreFoundation                 0x00000001846282a4 _CFStringCreateWithFormatAndArgumentsAux2 + 248
7   Foundation                     0x000000018546e448 -[NSPlaceholderString initWithFormat:locale:arguments:] + 172
8   Foundation                     0x000000018546e308 +[NSString stringWithFormat:] + 76
9   MediaPlayer                    0x00000001869bf524 -[NSObject(MPLogDescription) MP_shortDescription] + 96
10  MediaPlayer                    0x00000001869bf598 -[AVPlayerItem(MPLogDescription) MP_shortDescription] + 72
11  MediaPlayer                    0x00000001869bde2c -[MPAVQueueCoordinator _syncPlayerItems] + 1316
12  MediaPlayer                    0x00000001869bd8a4 -[MPAVQueueCoordinator _syncItems] + 1452
13  MediaPlayer                    0x00000001869becbc -[MPAVQueueCoordinator _updateCurrentItem] + 620
14  MediaPlayer                    0x00000001869be61c -[MPAVQueueCoordinator _syncPlayerItems] + 3348
15  MediaPlayer                    0x00000001869bd8a4 -[MPAVQueueCoordinator _syncItems] + 1452
16  MediaPlayer                    0x00000001869becbc -[MPAVQueueCoordinator _updateCurrentItem] + 620
17  MediaPlayer                    0x00000001869be61c -[MPAVQueueCoordinator _syncPlayerItems] + 3348
18  MediaPlayer                    0x00000001869bd8a4 -[MPAVQueueCoordinator _syncItems] + 1452
19  MediaPlayer                    0x00000001869becbc -[MPAVQueueCoordinator _updateCurrentItem] + 620
20  MediaPlayer                    0x00000001869be61c -[MPAVQueueCoordinator _syncPlayerItems] + 3348
...

The stack trace continues for several hundred more repetitions of the last three lines above.

like image 509
Greg Avatar asked Jul 23 '15 00:07

Greg


1 Answers

Just had this happen on my iOS 8.4 app here. Turns out that the App was trying to load an non-existing local video file. It was trying to load 'Animation.mp4' when the file was called 'Intro.mp4' and I had no error catching code to detect this.

The end result was exactly the same stack trace as above - the several hundred repetitions of the last 3 lines of the trace, white screen and an App crash

So might be worth checking this - it might help someone, though hopefully you're a bit more sensible and have some error catching code around your loading code :)

like image 56
GeeElle Avatar answered Nov 06 '22 01:11

GeeElle