我的用户不断收到这个错误,而我从来没有能够在模拟器或我的设备上重现它。我没有实现AVAudioSessionDelegate (可能会有不同的名称),并且我始终使用应用程序的默认AVAudioSession,从不创建新的and。
对于可能的原因有什么建议吗?
0 libobjc.A.dylib 0x31ca5fbc objc_msgSend + 15
1 AudioToolbox 0x3677ff27 _ZN29AudioSessionPropertyListeners24CallPropertyListenersImpEmmPKv + 274
2 AudioToolbox 0x36780205 _ZN29AudioSessionPropertyListeners21CallPropertyListenersEmmPKv + 240
3 AudioToolbox 0x3677de81 SSServer_AudioSessionInterruptionListenerMessage + 56
4 AudioToolbox 0x36726483 _XAudioSessionInterruptionListenerMessage + 62
5 AudioToolbox 0x366bb373 mshMIGPerform + 374
6 CoreFoundation 0x38199553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
7 CoreFoundation 0x381994f5 __CFRunLoopDoSource1 + 140
8 CoreFoundation 0x38198343 __CFRunLoopRun + 1370
9 CoreFoundation 0x3811b4dd CFRunLoopRunSpecific + 300
10 CoreFoundation 0x3811b3a5 CFRunLoopRunInMode + 104
11 GraphicsServices 0x37c99fcd GSEventRunModal + 156
12 UIKit 0x355ab743 UIApplicationMain + 1090
13 Accentuate! 0x395f main (main.m:14)发布于 2012-12-05 01:23:15
我们刚刚追踪到一起非常相似的撞车事故。
我们的结果如下所示:
https://github.com/mattgallagher/AudioStreamer/issues/6
特别是,MyAudioSessionInterruptionListener (或传递给AudioSessionInitialize的回调的名称)和它的inClientData在注册后不能更改,因此即使底层对象已被释放,回调也必须始终执行一些合理的操作。
为AudioStream建议的解决方案是使用静态变量,并确保它指向当前对回调感兴趣的对象,而不是指向释放的对象-重要的是不使用inClientData。
https://stackoverflow.com/questions/10960447
复制相似问题