崩溃报告 - iOS - 查看控制器相关?

问题描述:

任何人都可以帮助我理解崩溃报告吗?这是自iOS应用程序开发8个月以来我第一次应对这个问题。崩溃报告 - iOS - 查看控制器相关?

我知道这是解雇一个视图控制器造成它,但我没有做出任何关于此代码的更改,但突然间它开始导致问题。从哪里开始的任何指导都会令人惊叹。

Date/Time:  2013-03-10 14:56:06.091 +0000 
OS Version:  iOS 6.1.2 (10B146) 
Report Version: 104 

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

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 libobjc.A.dylib     0x3afee5b6 objc_msgSend + 22 
1 AVFoundation     0x3247f752 -[AVAudioPlayer(AVAudioPlayerPriv) finishedPlaying:] + 74 
2 Foundation      0x33c700f0 __NSThreadPerformPerform + 456 
3 CoreFoundation     0x3332e680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12 
4 CoreFoundation     0x3332dee4 __CFRunLoopDoSources0 + 208 
5 CoreFoundation     0x3332ccb2 __CFRunLoopRun + 642 
6 CoreFoundation     0x3329feb8 CFRunLoopRunSpecific + 352 
7 CoreFoundation     0x3329fd44 CFRunLoopRunInMode + 100 
8 GraphicsServices    0x36e612e6 GSEventRunModal + 70 
9 UIKit       0x351b52fc UIApplicationMain + 1116 
10 iWhovian      0x000391fe main (main.m:15) 
11 iWhovian      0x0002f56c start + 36 

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager 
Thread 1: 
0 libsystem_kernel.dylib   0x3b4e1648 kevent64 + 24 
1 libdispatch.dylib    0x3b41a4ec _dispatch_mgr_invoke + 792 
2 libdispatch.dylib    0x3b40cdf4 _dispatch_mgr_thread$VARIANT$up + 32 

Thread 2 name: WebThread 
Thread 2: 
0 libsystem_kernel.dylib   0x3b4e0eb4 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x3b4e1048 mach_msg + 36 
2 CoreFoundation     0x3332e040 __CFRunLoopServiceMachPort + 124 
3 CoreFoundation     0x3332cd9e __CFRunLoopRun + 878 
4 CoreFoundation     0x3329feb8 CFRunLoopRunSpecific + 352 
5 CoreFoundation     0x3329fd44 CFRunLoopRunInMode + 100 
6 WebCore       0x39294500 RunWebThread(void*) + 440 
7 libsystem_c.dylib    0x3b44a30e _pthread_start + 306 
8 libsystem_c.dylib    0x3b44a1d4 thread_start + 4 

Thread 3: 
0 libsystem_kernel.dylib   0x3b4f108c __psynch_cvwait + 24 
1 libsystem_c.dylib    0x3b442d2a _pthread_cond_wait + 642 
2 libsystem_c.dylib    0x3b44cf14 pthread_cond_wait + 36 
3 Foundation      0x33bec4d2 -[NSCondition wait] + 190 
4 iWhovian      0x0006ef90 -[PFCommandCache runLoop] (PFCommandCache.m:491) 
5 Foundation      0x33c6fe80 __NSThread__main__ + 968 
6 libsystem_c.dylib    0x3b44a30e _pthread_start + 306 
7 libsystem_c.dylib    0x3b44a1d4 thread_start + 4 

Thread 4 name: AQClient 
Thread 4: 
0 libsystem_kernel.dylib   0x3b4e0eb4 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x3b4e1048 mach_msg + 36 
2 CoreFoundation     0x3332e040 __CFRunLoopServiceMachPort + 124 
3 CoreFoundation     0x3332cd9e __CFRunLoopRun + 878 
4 CoreFoundation     0x3329feb8 CFRunLoopRunSpecific + 352 
5 CoreFoundation     0x3329fd44 CFRunLoopRunInMode + 100 
6 AudioToolbox     0x32d816fe GenericRunLoopThread::Entry(void*) + 134 
7 AudioToolbox     0x32d62882 CAPThread::Entry(CAPThread*) + 294 
8 libsystem_c.dylib    0x3b44a30e _pthread_start + 306 
9 libsystem_c.dylib    0x3b44a1d4 thread_start + 4 

Thread 5: 
0 libsystem_kernel.dylib   0x3b4f1d98 __workq_kernreturn + 8 
1 libsystem_c.dylib    0x3b43fcf6 _pthread_workq_return + 14 
2 libsystem_c.dylib    0x3b43fa12 _pthread_wqthread + 362 
3 libsystem_c.dylib    0x3b43f8a0 start_wqthread + 4 

Thread 6 name: Dispatch queue: com.apple.NSXPCConnection.m-user.com.apple.gamed 
Thread 6: 
0 libobjc.A.dylib     0x3afee5b0 objc_msgSend + 16 
1 CoreFoundation     0x332b0fdc -[__NSSetI member:] + 140 
2 CoreFoundation     0x332b0f44 -[NSSet containsObject:] + 28 
3 Foundation      0x33c08978 -[NSCoder _validateAllowedClass:forKey:allowingInvocations:] + 124 
4 Foundation      0x33c08402 _decodeObjectStuff + 282 
5 Foundation      0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76 
6 GameKit       0x33e2f8fa -[GKInternalRepresentation initWithCoder:] + 238 
7 Foundation      0x33c086f2 _decodeObjectStuff + 1034 
8 Foundation      0x33d1fda8 -[NSXPCDecoder _decodeArrayOfObjectsForKey:] + 532 
9 Foundation      0x33bf4ebc -[NSArray(NSArray) initWithCoder:] + 784 
10 Foundation      0x33c086f2 _decodeObjectStuff + 1034 
11 Foundation      0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76 
12 GameKit       0x33e2f8fa -[GKInternalRepresentation initWithCoder:] + 238 
13 Foundation      0x33c086f2 _decodeObjectStuff + 1034 
14 Foundation      0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76 
15 Foundation      0x33c09fe8 _walkAndDecodeData + 1708 
16 Foundation      0x33c0988c decodeInvocationArguments + 1368 
17 Foundation      0x33c08fc8 -[NSXPCDecoder decodeInvocation] + 860 
18 Foundation      0x33c08630 _decodeObjectStuff + 840 
19 Foundation      0x33c08200 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 76 
20 Foundation      0x33c07c04 -[NSXPCConnection _decodeAndInvokeReplyBlockWithData:] + 548 
21 Foundation      0x33d1eedc __message_handler_block_invoke_0 + 32 
22 libdispatch.dylib    0x3b40b11c _dispatch_call_block_and_release + 8 
23 libdispatch.dylib    0x3b40a996 _dispatch_queue_drain$VARIANT$up + 142 
24 libdispatch.dylib    0x3b40a890 _dispatch_queue_invoke$VARIANT$up + 32 
25 libdispatch.dylib    0x3b419212 _dispatch_root_queue_drain + 190 
26 libdispatch.dylib    0x3b4193b4 _dispatch_worker_thread2 + 80 
27 libsystem_c.dylib    0x3b43fa0e _pthread_wqthread + 358 
28 libsystem_c.dylib    0x3b43f8a0 start_wqthread + 4 

Thread 7: 
0 libsystem_kernel.dylib   0x3b4f1d98 __workq_kernreturn + 8 
1 libsystem_c.dylib    0x3b43fcf6 _pthread_workq_return + 14 
2 libsystem_c.dylib    0x3b43fa12 _pthread_wqthread + 362 
3 libsystem_c.dylib    0x3b43f8a0 start_wqthread + 4 

Thread 0 crashed with ARM Thread State (32-bit): 
    r0: 0x208a4ef0 r1: 0x38e042ae  r2: 0x33f0ac6c  r3: 0x00000008 
    r4: 0x20747372 r5: 0x2089ac70  r6: 0x33f0ac6c  r7: 0x2fdd2df8 
    r8: 0x3b667530 r9: 0x0e3810ab  r10: 0x00000000  r11: 0x1fd4dd90 
    ip: 0x3b5734ac sp: 0x2fdd2de0  lr: 0x3247f757  pc: 0x3afee5b6 
    cpsr: 0x20070030 
+0

只是从经验,我建议重新启动xcode和模拟器,如果你还没有 – DGund 2013-03-10 17:37:15

不久前我遇到了这个。该问题可以通过在视图控制器的dealloc方法中将AVAudioPlayer实例的delegate设置为nil来解决。除非你这样做,否则音频播放器会尝试最后一次呼叫其代表,让它知道已完成播放。但是如果代理已经被释放,你会得到这个崩溃。

- (void)dealloc { 
    _myPlayer.delegate = nil; // _myPlayer is your AVAudioPlayer instance 
    [super dealloc]; // Only is you are not using ARC 
} 
+0

工作完美。非常感谢 – nobbsy 2013-03-10 22:02:18

+0

如果可以的话,我会拥抱你!谢谢! :) – johnnelm9r 2013-09-25 06:57:11

你很可能试图访问一个已被释放的对象。看看

Debugging EXC_BAD_ACCESS Error in Xcode using Instruments (Archived)

就看你如何追查。