忽略com.apple.coremedia.networkbuffering中的异常

时间:2013-12-04 15:32:07

标签: ios objective-c xcode exception lldb

我正在com.apple.coremedia.networkbuffering中收到异常,如this question中所述。

他们不会崩溃应用程序或似乎导致任何问题。但它们使我的异常断点无用,因为它一直触发。

我发现these questions描述了过滤“All Exception”断点的一些方法,但没有太多运气。我在调试器中检查了NSThread,希望找到一些我可以用来构造应用于断点的条件的信息,但线程没有命名。我可能能够使用堆栈跟踪中的信息,但我找不到一种很好的方法来应用它来防止断点被触发。

问题末尾包含了调用堆栈。

如何阻止我的“所有例外”断点停止此异常?

Xcode screenshot

这是调用堆栈:

(lldb) po [NSThread callStackSymbols]
<_NSCallStackArray 0xdceefa0>(
0   ???                                 0x12e41edd 0x0 + 316939997,
1   AudioCodecs                         0x15aa7f95 _ZL15GetPropertyInfoPvmPmPh + 45,
2   AudioToolbox                        0x0435ae79 AudioCodecGetPropertyInfo + 89,
3   AudioToolbox                        0x04257d85 _ZN14CodecConverter15CheckInitializeEPKvm + 533,
4   AudioToolbox                        0x042579e5 _ZN14CodecConverterC2ERP20OpaqueAudioComponentP28OpaqueAudioComponentInstanceRK14StreamDescPairS7_bRK23AudioConverterPrimeInfo + 661,
5   AudioToolbox                        0x0425773c _ZN14CodecConverterC1ERP20OpaqueAudioComponentP28OpaqueAudioComponentInstanceRK14StreamDescPairS7_bRK23AudioConverterPrimeInfo + 60,
6   AudioToolbox                        0x0425c6d0 _ZN19CodecDecoderFactory24BuildCodecConverterChainERK14StreamDescPairRK18ChainBuildSettingsP19AudioConverterChainP19PCMConverterFactory + 240,
7   AudioToolbox                        0x042445dc _ZN17ConverterRegistry15CreateConverterERK14StreamDescPairPP19AudioConverterChainmPK21AudioClassDescription + 204,
8   AudioToolbox                        0x04235156 _AudioConverterNewInternal + 342,
9   AudioToolbox                        0x042832e1 _ZN16AudioQueueObject19ConverterConnection14BuildConverterEv + 1505,
10  AudioToolbox                        0x04282c72 _ZN16AudioQueueObject19ConverterConnectionC2ERS_Rl + 130,
11  AudioToolbox                        0x042848bc _ZN16AudioQueueObject16IONodeConnection27GetConverterConnection_InitERl + 60,
12  AudioToolbox                        0x042899bc _ZN16AudioQueueObject11SetPropertyEmR14CADeserializer + 2588,
13  AudioToolbox                        0x042b3bdb AQServer_SetProperty + 123,
14  AudioToolbox                        0x042be251 AudioQueueSetProperty + 369,
15  MediaToolbox                        0x0c665d8b subaq_createSubAudioQueue + 876,
16  MediaToolbox                        0x0c6655d1 FigAudioQueueCreate + 669,
17  MediaToolbox                        0x0c7012c3 FigAudioQueueRenderPipelineCreate + 658,
18  MediaToolbox                        0x0c68c3a3 fpfs_EnsureRenderChainForTrack + 2722,
19  MediaToolbox                        0x0c682c3f fpfs_ResolveAllWaitingTracks + 2372,
20  MediaToolbox                        0x0c67cd85 fpfs_PushSampleBuffer + 3941,
21  MediaToolbox                        0x0c64b993 _ZL32fim_MakePushSampleBufferCallbackP17OpaqueFigManifoldP14FigIcyManifoldiPFlS0_iPvjxP20opaqueCMSampleBufferES3_jxS5_ + 85,
22  MediaToolbox                        0x0c64b453 _ZL22AudioFileStreamPacketsPvmmPKvP28AudioStreamPacketDescription + 3263,
23  AudioToolbox                        0x042ac5de _ZN22AudioFileStreamWrapper15CallPacketsProcEmmPKvP28AudioStreamPacketDescriptionb + 142,
24  AudioToolbox                        0x042de8e1 _ZN15ADTSAudioStream15GeneratePacketsER27AudioFileStreamContinuation + 1873,
25  AudioToolbox                        0x042af1e5 _ZN22AudioFileStreamWrapper10ParseBytesEmPKvm + 229,
26  AudioToolbox                        0x042abfd8 AudioFileStreamParseBytes + 88,
27  MediaToolbox                        0x0c64a218 _ZL24FigIcyManifoldInjectDataP17OpaqueFigManifoldxjP19OpaqueCMBlockBuffer + 819,
28  MediaToolbox                        0x0c69dbc2 fpfs_BytePumpFn + 2813,
29  MediaToolbox                        0x0c648f18 fbp_SendDataCallback + 171,
30  MediaToolbox                        0x0c64884d FigICY_HTTPPumpFn + 2350,
31  MediaToolbox                        0x0c83f826 figHTTPRequestPerformReadCallback + 183,
32  MediaToolbox                        0x0c83f9cd figHttpRequestSendOutputBlockBuffer + 81,
33  MediaToolbox                        0x0c83f729 figHttpRequestAppendDataArrayToBlockBuffer + 485,
34  MediaToolbox                        0x0c83f09a figHttpRequestDidReceiveDataArrayCallback + 300,
35  CFNetwork                           0x015578ae ___ZN27URLConnectionClient_Classic29_delegate_didReceiveDataArrayEv_block_invoke + 157,
36  CFNetwork                           0x01556bac ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 104,
37  CFNetwork                           0x015a10ef ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 25,
38  CoreFoundation                      0x039f0d59 CFArrayApplyFunction + 57,
39  CFNetwork                           0x014c05af _ZN19RunloopBlockContext7performEv + 139,
40  CFNetwork                           0x015a16d2 _ZThn16_N19RunloopBlockContext24multiplexerClientPerformEv + 20,
41  CFNetwork                           0x014c03dd _ZN17MultiplexerSource7performEv + 299,
42  CFNetwork                           0x014c01f2 _ZN17MultiplexerSource8_performEPv + 76,
43  CoreFoundation                      0x039d883f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15,
44  CoreFoundation                      0x039d81cb __CFRunLoopDoSources0 + 235,
45  CoreFoundation                      0x039f529e __CFRunLoopRun + 910,
46  CoreFoundation                      0x039f4ac3 CFRunLoopRunSpecific + 467,
47  CoreFoundation                      0x039ffe61 CFRunLoopRun + 129,
48  CoreMedia                           0x024f6e9e FigThreadGlobalNetworkBufferingRunloop + 31,
49  CoreMedia                           0x024f9dbd figThreadMain + 284,
50  libsystem_pthread.dylib             0x04f825fb _pthread_body + 144,
51  libsystem_pthread.dylib             0x04f82485 _pthread_struct_init + 0,
52  libsystem_pthread.dylib             0x04f87cf2 thread_start + 34
)

1 个答案:

答案 0 :(得分:3)

当您拥有一段代码时,这可能会有所帮助,例如:第三方库,它会抛出您想要忽略的多个异常:

设置两个断点,一个在您想要忽略的异常抛出代码块之前和之后。 运行该程序,直到它在异常处停止,然后键入“断点列表”&#39;进入调试器控制台,找到所有异常的数量&#39;断点,它应该是这样的:

2:names = {&#39; objc_exception_throw&#39;,&#39; __ cxa_throw&#39;},locations = 2选项:已禁用2.1:where = libobjc.A.dylibobjc_exception_throw,address = 0x00007fff8f8da6b3,unresolved,hit count = 0 2.2:where = libc ++ abi.dylib__cxa_throw,address = 0x00007fff8d19fab7,unresolved,hit count = 0

这意味着它是断点2.现在在xcode中,编辑第一个断点(在抛出异常代码之前)并将操作更改为“调试器命令”。并输入&#39;断点禁用2&#39; (并设置&#39;自动继续......&#39;复选框)。

对违规行后的断点执行相同的操作,并使用命令&#39;断点启用2&#39;。

所有断点异常现在将打开和关闭,因此它只在您需要时才会激活