簡體   English   中英

Apple因崩潰拒絕了我的應用,無法重現它

[英]Apple rejected my app due to crash, can't reproduce it

我剛剛將應用程序上傳到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

請幫我解決這個問題。 提前致謝

你墜毀內objc_msgSendEXC_BAD_ACCESS例外。 根據我的經驗,這可能意味着一個對象已經超出了范圍並且您正在嘗試訪問它,或者該對象應該在另一個線程上執行某些操作並且在同一時間(當它正在執行此操作時),它已經不在原始線程的范圍。

如果你正在使用Apple的多線程對象之一(幾乎任何帶有委托回調的東西),請確保它被包含它的對象保留( strong )。 例如,如果您正在使用具有異步回調的對象,則不能僅在方法中對其進行實例化,然后讓它消失,您必須使其成為strong @property以便即使方法返回並且您仍然保持在范圍內正在等待回調。

編輯(基於CFSocket線程)

通過它看,你正在使用一個通常與NSStream類一起使用的套接字API。 請記住,創建強大的@properties那些NSStream對象(或正在使用其他連接對象),並且,如果你包裝他們另一個對象中,請確保是一個strong @property無論對象是使用它的。 您無法從創建它的線程上不再存在的對象獲取異步回調。

(注意,這不僅僅是消息傳遞的情況,已經設置為nil的對象。消息到nil不會崩潰,它們只返回nil 。問題是消息被發送到內存中你不再擁有的東西了) 。

編輯2(基於主線程)

您確定擁有View Controller轉換中使用的每個對象嗎? 在塊或異步操作中創建臨時對象也可能導致EXC_BAD_ACCESS

從它看起來,可能是兩個線程正在訪問相同的變量,其中一個線程正在破壞另一個線程中使用的變量。 這是一個同步問題。 訪問不良主要意味着您正在訪問一個nil的變量

您可以在應用程序中集成崩潰報告工具,如www.crashlytics.com 它非常易於實現,下載sdk后即可獲得文檔。 實施后,徹底測試您的應用程序,它會告訴您代碼崩潰的確切行,您可以解決它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM