iphone - 如何在 AQClient 线程中追踪 iPad 应用程序的奇怪崩溃?

标签 iphone ios crash

我的应用程序最近开始出现奇怪的崩溃,我无法追踪到源头。寻找什么的任何帮助都会有所帮助:)

设备(iOS 5 iPad)的崩溃日志在开头显示以下内容:

Date/Time:       2011-11-08 19:07:21.044 +0100
OS Version:      iPhone OS 5.0 (9A334)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x406cad3d
Crashed Thread:  9

崩溃的线程 9 是一个 AQClient 线程,它的堆栈跟踪如下所示:

Thread 9 name:  AQClient
Thread 9 Crashed:
0   libobjc.A.dylib                 0x30107fbc objc_msgSend + 16
1   AVFoundation                    0x3420cdc8 _ZL27AudioPlayerAQOutputCallbackPvP16OpaqueAudioQueueP16AudioQueueBuffer + 28
2   AudioToolbox                    0x32a409fe ClientMessageHandler::OutputBufferComplete(unsigned int) + 98
3   AudioToolbox                    0x32a425d6 AQClientCallbackMessageReader::DispatchCallbacks(unsigned char*, unsigned int, void*, unsigned int) + 198
4   AudioToolbox                    0x32a408dc AQCallbackReceiver_CallbackNotificationsAvailable + 364
5   AudioToolbox                    0x329ee4b6 _XCallbackNotificationsAvailable + 54
6   AudioToolbox                    0x329e436c mshMIGPerform + 368
7   CoreFoundation                  0x34fa454c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
8   CoreFoundation                  0x34fa44ee __CFRunLoopDoSource1 + 134
9   CoreFoundation                  0x34fa333c __CFRunLoopRun + 1364
10  CoreFoundation                  0x34f264d6 CFRunLoopRunSpecific + 294
11  CoreFoundation                  0x34f2639e CFRunLoopRunInMode + 98
12  AudioToolbox                    0x32a3d29c GenericRunLoopThread::Entry(void*) + 116
13  AudioToolbox                    0x329c5aac CAPThread::Entry(CAPThread*) + 208
14  libsystem_c.dylib               0x35756c16 _pthread_start + 314
15  libsystem_c.dylib               0x35756ad0 thread_start + 0

这似乎与 AVAudioPlayer 或 MPMoviePlayer 事件有关。在应用程序中我有一个正在播放的电影(来自应用程序包的 .m4v),然后当它完成时 View 翻转到没有电影的一侧并且音频开始播放。

在崩溃的情况下,我可以听到相同的音频播放两次,即使这不是故意的。然后在完成音频(当 AVAudioPlayer 应该被释放时)应用程序崩溃。

我在应用中添加了一些 NSLog 来追踪这里发生的事情。关键点的控制台向我展示了这样一个东西:

Nov  8 19:17:19 unknown XXX[1753] <Warning>: Finished movie
Nov  8 19:17:19 unknown XXX[1753] <Warning>: Finished movie
Nov  8 19:17:20 unknown XXX[1753] <Warning>: flipping
Nov  8 19:17:20 unknown XXX[1753] <Warning>: flipping
Nov  8 19:17:20 unknown XXX[1753] <Warning>: --> dealloc <AVAudioPlayer: 0x6887530> (d2_s3_l3_q9.aif)
Nov  8 19:17:20 unknown XXX[1753] <Warning>: --> dealloc <AVAudioPlayer: 0x6887530> (d2_s3_l3_q9.aif)
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x68859f0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x11ef30 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x1a6720 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x6872400 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug

(...) 

Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x6872ed0 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x10cf80 of class __NSCFNumber autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x6850480 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x10a530 of class __NSCFNumber autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x1d15d0 of class __NSCFNumber autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x6884550 of class TFCrashHandler autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x685ec10 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:20 unknown UIKitApplication:com.bundle.name[0x2432][1753] <Notice>: objc[1753]: Object 0x6856270 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Nov  8 19:17:21 unknown com.apple.networkd[1763] <Notice>: main:212 networkd.1763 built Sep 16 2011 00:02:59
Nov  8 19:17:25 unknown ReportCrash[1764] <Notice>: Formulating crash report for process XXX[1753]
Nov  8 19:17:25 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.bundle.name[0x2432]) Job appears to have crashed: Segmentation fault: 11
Nov  8 19:17:25 unknown SpringBoard[15] <Warning>: Application 'XXX' exited abnormally with signal 11: Segmentation fault: 11
Nov  8 19:17:25 unknown ReportCrash[1764] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/XXX_2011-11-08-191724_iKotapad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

编辑:

我认为这里的关键部分是开头的双日志。非崩溃时,它只显示一次。而且,问题可能来自两次调用同一对象的 dealloc 方法。

最佳答案

我会说首先处理那个autorelease 池泄漏,看看问题是否仍然存在。

关于iphone - 如何在 AQClient 线程中追踪 iPad 应用程序的奇怪崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8055597/

相关文章:

ios - 该 View 是 Iphone XS Max、Iphone 11 pro max 上的显示差异以及差异项目

ruby-on-rails - 保护 iOS 应用程序和 Rails 应用程序之间通信的最简单方法是什么?

android - 每次我使用Facebook登录时应用程序关闭

javascript - Node.js 应用程序在尝试使用它下载大文件时崩溃

ios - View 尺寸不会随 iPhone 尺寸而改变

ios - 如何将 UIImage 数组导出为电影?

具有非透明 subview 的 iOS 8 透明 View

ios - 是否可以在 iOS 9 上让您的 iPad 应用程序退出多任务处理

ios - 状态栏边框变化无任何通知

python - 创建非常大的 Python 列表