苹果拒绝我的应用程序,由于崩溃,无法重现
我刚上传了一个应用程序到appstore,它是为ios7开发的。
他们拒绝了应用程序,因为我无法重现崩溃…他们给我发了这个崩溃报告:
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000008 Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x000000018e0501c8 objc_msgSend + 8 1 UIKit 0x000000018493e940 __97-[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:]_block_invoke718 + 52 2 UIKit 0x00000001846b6504 -[UIViewController _executeAfterAppearanceBlock] + 60 3 UIKit 0x00000001846b646c _applyBlockToCFArrayCopiedToStack + 352 4 UIKit 0x00000001846224c8 _afterCACommitHandler + 540 5 CoreFoundation 0x00000001816270a4 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28 6 CoreFoundation 0x000000018162432c __CFRunLoopDoObservers + 368 7 CoreFoundation 0x00000001816246b8 __CFRunLoopRun + 760 8 CoreFoundation 0x00000001815656cc CFRunLoopRunSpecific + 448 9 GraphicsServices 0x0000000187201c08 GSEventRunModal + 164 10 UIKit 0x0000000184696fd8 UIApplicationMain + 1152 11 brandnooz 0x00000001000aaa0c 0x100038000 + 469516 12 libdyld.dylib 0x000000018e633a9c start + 0 Thread 1 name: Dispatch queue: com.apple.libdispatch-manager Thread 1: 0 libsystem_kernel.dylib 0x000000018e715aa8 kevent64 + 8 1 libdispatch.dylib 0x000000018e619998 _dispatch_mgr_thread + 48 Thread 2 name: AFNetworking Thread 2: 0 libsystem_kernel.dylib 0x000000018e715ca0 mach_msg_trap + 8 1 CoreFoundation 0x0000000181626570 __CFRunLoopServiceMachPort + 180 2 CoreFoundation 0x0000000181624700 __CFRunLoopRun + 832 3 CoreFoundation 0x00000001815656cc CFRunLoopRunSpecific + 448 4 Foundation 0x00000001821012c0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 292 5 Foundation 0x000000018215ed74 -[NSRunLoop(NSRunLoop) run] + 92 6 brandnooz 0x0000000100045280 0x100038000 + 53888 7 Foundation 0x00000001821e8408 __NSThread__main__ + 996 8 libsystem_pthread.dylib 0x000000018e7afe18 _pthread_body + 164 9 libsystem_pthread.dylib 0x000000018e7afd70 _pthread_start + 136 10 libsystem_pthread.dylib 0x000000018e7ad550 thread_start + 0 Thread 3 name: com.apple.NSURLConnectionLoader Thread 3: 0 libsystem_kernel.dylib 0x000000018e715ca0 mach_msg_trap + 8 1 CoreFoundation 0x0000000181626570 __CFRunLoopServiceMachPort + 180 2 CoreFoundation 0x0000000181624700 __CFRunLoopRun + 832 3 CoreFoundation 0x00000001815656cc CFRunLoopRunSpecific + 448 4 Foundation 0x000000018215a424 +[NSURLConnection(Loader) _resourceLoadLoop:] + 344 5 Foundation 0x00000001821e8408 __NSThread__main__ + 996 6 libsystem_pthread.dylib 0x000000018e7afe18 _pthread_body + 164 7 libsystem_pthread.dylib 0x000000018e7afd70 _pthread_start + 136 8 libsystem_pthread.dylib 0x000000018e7ad550 thread_start + 0 Thread 4 name: com.apple.CFSocket.private Thread 4: 0 libsystem_kernel.dylib 0x000000018e72e76c __select + 8 1 libsystem_pthread.dylib 0x000000018e7afe18 _pthread_body + 164 2 libsystem_pthread.dylib 0x000000018e7afd70 _pthread_start + 136 3 libsystem_pthread.dylib 0x000000018e7ad550 thread_start + 0 Thread 5 name: Dispatch queue: com.apple.root.high-priority Thread 5: 0 libsystem_kernel.dylib 0x000000018e72e394 __psynch_cvwait + 8 1 Foundation 0x00000001821cf8e0 -[__NSOperationInternal _waitUntilFinished:] + 100 2 brandnooz 0x0000000100083928 0x100038000 + 309544 3 brandnooz 0x00000001000cf3c0 0x100038000 + 619456 4 libdispatch.dylib 0x000000018e618010 _dispatch_call_block_and_release + 20 5 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 6 libdispatch.dylib 0x000000018e61f2b4 _dispatch_root_queue_drain + 552 7 libdispatch.dylib 0x000000018e61f4f8 _dispatch_worker_thread2 + 72 8 libsystem_pthread.dylib 0x000000018e7ad6b8 _pthread_wqthread + 352 9 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 6 name: Dispatch queue: com.apple.root.default-priority Thread 6: 0 libsystem_kernel.dylib 0x000000018e715cdc semaphore_wait_trap + 8 1 brandnooz 0x00000001000d8044 0x100038000 + 655428 2 libdispatch.dylib 0x000000018e618010 _dispatch_call_block_and_release + 20 3 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 4 libdispatch.dylib 0x000000018e61f2b4 _dispatch_root_queue_drain + 552 5 libdispatch.dylib 0x000000018e61f4f8 _dispatch_worker_thread2 + 72 6 libsystem_pthread.dylib 0x000000018e7ad6b8 _pthread_wqthread + 352 7 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 7 name: Dispatch queue: com.apple.root.high-priority Thread 7: 0 libsystem_kernel.dylib 0x000000018e72e394 __psynch_cvwait + 8 1 Foundation 0x00000001821cf8e0 -[__NSOperationInternal _waitUntilFinished:] + 100 2 brandnooz 0x0000000100083928 0x100038000 + 309544 3 brandnooz 0x00000001000cf3c0 0x100038000 + 619456 4 libdispatch.dylib 0x000000018e618010 _dispatch_call_block_and_release + 20 5 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 6 libdispatch.dylib 0x000000018e61f2b4 _dispatch_root_queue_drain + 552 7 libdispatch.dylib 0x000000018e61f4f8 _dispatch_worker_thread2 + 72 8 libsystem_pthread.dylib 0x000000018e7ad6b8 _pthread_wqthread + 352 9 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 8 name: Dispatch queue: com.apple.root.default-priority Thread 8: 0 libsystem_kernel.dylib 0x000000018e715cdc semaphore_wait_trap + 8 1 brandnooz 0x00000001000d8044 0x100038000 + 655428 2 libdispatch.dylib 0x000000018e618010 _dispatch_call_block_and_release + 20 3 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 4 libdispatch.dylib 0x000000018e61f2b4 _dispatch_root_queue_drain + 552 5 libdispatch.dylib 0x000000018e61f4f8 _dispatch_worker_thread2 + 72 6 libsystem_pthread.dylib 0x000000018e7ad6b8 _pthread_wqthread + 352 7 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 9 name: Dispatch queue: com.apple.network.helper_queue Thread 9: 0 libsystem_kernel.dylib 0x000000018e715ca0 mach_msg_trap + 8 1 libdispatch.dylib 0x000000018e621648 _dispatch_mach_msg_send + 364 2 libdispatch.dylib 0x000000018e61a6d4 dispatch_mach_send + 216 3 libxpc.dylib 0x000000018e7c9814 xpc_connection_send_message_with_reply + 124 4 libsystem_network.dylib 0x000000018e77cfe0 __net_helper_send_block_invoke + 48 5 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 6 libdispatch.dylib 0x000000018e61dc80 _dispatch_barrier_sync_f_invoke + 44 7 libsystem_network.dylib 0x000000018e77ab84 net_helper_send + 212 8 libsystem_network.dylib 0x000000018e77bd4c net_helper_connection_start + 264 9 libsystem_network.dylib 0x000000018e778b78 tcp_connection_register_reachability + 164 10 libsystem_network.dylib 0x000000018e77775c __tcp_connection_start_block_invoke + 312 11 libdispatch.dylib 0x000000018e618010 _dispatch_call_block_and_release + 20 12 libdispatch.dylib 0x000000018e617fd0 _dispatch_client_callout + 12 13 libdispatch.dylib 0x000000018e61e4a4 _dispatch_queue_drain + 636 14 libdispatch.dylib 0x000000018e61a4bc _dispatch_queue_invoke + 64 15 libdispatch.dylib 0x000000018e61f0f0 _dispatch_root_queue_drain + 100 16 libdispatch.dylib 0x000000018e61f4f8 _dispatch_worker_thread2 + 72 17 libsystem_pthread.dylib 0x000000018e7ad6b8 _pthread_wqthread + 352 18 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 10: 0 libsystem_kernel.dylib 0x000000018e72ee74 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x000000018e7ad548 start_wqthread + 0 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000008 x1: 0x0000000184d29a89 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x000000018f24b4b8 x9: 0x0000000100183460 x10: 0x0000000150882c00 x11: 0x000000520000007f x12: 0x0000000150883390 x13: 0x000001a500183465 x14: 0x0000000000000006 x15: 0x0000000000000000 x16: 0x000000018e0501c0 x17: 0x00000001846484ec x18: 0x0000000000000000 x19: 0x0000000170053500 x20: 0x000000018f287000 x21: 0x000000016fdc6b28 x22: 0x000000016fdc6b20 x23: 0x000000017012d3e0 x24: 0x000000017012d3f0 x25: 0x000000019157a098 x26: 0x000000016fdc6b20 x27: 0x000000016fdc6d00 x28: 0x0000000000000003 fp: 0x000000016fdc6af0 lr: 0x000000018493e944 sp: 0x000000016fdc6ae0 pc: 0x000000018e0501c8 cpsr: 0x20000000
请帮我解决这个问题。 提前致谢
你用EXC_BAD_ACCESS
exception崩溃了EXC_BAD_ACCESS
。 根据我的经验,这可能意味着一个对象已经超出了范围,而您正在尝试访问它,或者该对象应该在另一个线程上做某件事情,同时(当它正在这样做时),它已经退出范围在原来的线程。
如果您正在使用Apple的multithreading对象(几乎所有使用委托callback的对象),请确保它被包含在其中的对象保留( strong
)。 例如,如果您使用的是asynchronouscallback对象,则不能只是在方法中实例化,然后让它消失,您必须使其成为一个strong @property
因此即使在方法返回时它仍然在作用域中,而您正在等待callback。
编辑(基于CFSocket线程) :
从它的外观来看,你正在使用一个通常与NSStream
类一起使用的套接字API。 请记住为那些NSStream
对象(或其他正在使用的连接对象)创build强大的NSStream
,并且如果将它们包装到另一个对象中,请确保它是一个strong @property
(无论使用哪个对象)。 您不能从创build它的线程上不存在的对象获得asynchronouscallback。
(注意,这不仅仅是一个消息对象被设置为nil
,消息到nil
不会崩溃,只是返回nil
。问题是一个消息被发送到内存中的东西,你不拥有了) 。
编辑2(基于主线程) :
你确定你拥有在View Controller转换中使用的每个对象吗? 在块或asynchronous操作中创build瞬态对象也可能导致EXC_BAD_ACCESS
。
从它看起来,可能是两个线程正在访问相同的variables,其中一个线程正在破坏另一个线程中使用的variables。 这是一个同步问题。 糟糕的访问通常意味着你正在访问一个variables是零
您可以在您的应用程序中集成崩溃报告工具,如www.crashlytics.com
。 这是非常容易实现和文档是可用的,一旦你下载SDK。 实施后,testing你的应用程序,它会告诉你代码崩溃的确切行,你可以解决它。