EXC_BAD_ACCESS (SIGABRT),ios崩溃日志

use*_*959 5 iphone xcode unity-game-engine crash-log sigabrt

我的 iPhone/ipad 应用程序出现问题。它已发布在应用程序商店中,但现在似乎有一些用户在尝试启动该应用程序时遇到崩溃。有时它有助于硬重启。\n如果有人能帮我解决发生的事情,我会非常高兴。如果重要的话,该应用程序是在 unity 3d 中构建的.. Here\xc2\xb4s 我的崩溃日志:

\n\n
Hardware Model:      iPad2,3\nProcess:         thegame [3955]\nPath:            /var/mobile/Applications/...thegame.app/thegame\nIdentifier:      thegame\nVersion:         ??? (???)\nCode Type:       ARM (Native)\nParent Process:  launchd [1]\nDate/Time:       2013-03-18 23:00:43.195 +0000\nOS Version:      iOS 6.1.2 (10B146)\nReport Version:  104\n\nException Type:  EXC_BAD_ACCESS (SIGABRT)\nException Codes: KERN_INVALID_ADDRESS at 0x00000000\nCrashed Thread:  0\n\nThread 0 name:  Dispatch queue: com.apple.main-thread\nThread 0 Crashed:\n0   libsystem_kernel.dylib          0x3a863350 __pthread_kill + 8\n1   libsystem_c.dylib               0x3a7da11e pthread_kill + 54\n2   libsystem_c.dylib               0x3a81696e abort + 90\n3   thegame                         0x00bc6288 0x1000 + 12341896\n4   thegame                         0x00bb6e64 0x1000 + 12279396\n5   libsystem_c.dylib               0x3a7e3e90 _sigtramp + 40\n6   thegame                         0x007b9688 0x1000 + 8095368\n7   thegame                         0x007b9688 0x1000 + 8095368\n8   Foundation                      0x32e110f0 __NSThreadPerformPerform + 456\n9   CoreFoundation                  0x324cf680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12\n10  CoreFoundation                  0x324ceee4 __CFRunLoopDoSources0 + 208\n11  CoreFoundation                  0x324cdcb2 __CFRunLoopRun + 642\n12  CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352\n13  CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100\n14  GraphicsServices                0x35ff52e6 GSEventRunModal + 70\n15  UIKit                           0x343562fc UIApplicationMain + 1116\n16  thegame                         0x00006a94 0x1000 + 23188\n17  thegame                         0x00003324 0x1000 + 8996\n\nThread 1 name:  Dispatch queue: com.apple.libdispatch-manager\nThread 1:\n0   libsystem_kernel.dylib          0x3a853648 kevent64 + 24\n1   libdispatch.dylib               0x3a783974 _dispatch_mgr_invoke + 792\n2   libdispatch.dylib               0x3a783654 _dispatch_mgr_thread$VARIANT$mp + 32\n\nThread 2:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 3:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 4 name:  WebThread\nThread 4:\n0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20\n1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36\n2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124\n3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878\n4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352\n5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100\n6   WebCore                         0x38407500 RunWebThread(void*) + 440\n7   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n8   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 5:\n0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8\n1   thegame                         0x00c999d8 0x1000 + 13208024\n2   thegame                         0x00bff558 0x1000 + 12576088\n3   thegame                         0x00c7773c 0x1000 + 13068092\n4   thegame                         0x00c92bec 0x1000 + 13179884\n5   thegame                         0x00cada2c 0x1000 + 13290028\n6   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n7   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 6:\n0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8\n1   thegame                         0x009401f4 0x1000 + 9695732\n2   thegame                         0x0098b714 0x1000 + 10004244\n3   thegame                         0x0098bc08 0x1000 + 10005512\n4   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n5   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 7:\n0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8\n1   thegame                         0x00a228ac 0x1000 + 10623148\n2   thegame                         0x00a3f800 0x1000 + 10741760\n3   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n4   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 8 name:  AURemoteIO::IOThread\nThread 8:\n0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20\n1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36\n2   AudioToolbox                    0x31fc391c AURemoteIO::IOThread::Run() + 104\n3   AudioToolbox                    0x31fc5c84 AURemoteIO::IOThread::Entry(void*) + 4\n4   AudioToolbox                    0x31f03882 CAPThread::Entry(CAPThread*) + 294\n5   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n6   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 9:\n0   libsystem_kernel.dylib          0x3a8636a4 __semwait_signal + 24\n1   libsystem_c.dylib               0x3a7c13ce nanosleep + 138\n2   libsystem_c.dylib               0x3a7c133a usleep + 46\n3   thegame                         0x00a22cb0 0x1000 + 10624176\n4   thegame                         0x00a3f858 0x1000 + 10741848\n5   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n6   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 10:\n0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20\n1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36\n2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124\n3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878\n4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352\n5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100\n6   CFNetwork                       0x321a22ca CFURLConnectionSendSynchronousRequest + 330\n7   Foundation                      0x32e351c2 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 242\n8   thegame                         0x007b4a6c 0x1000 + 8075884\n9   thegame                         0x007b4704 0x1000 + 8075012\n10  thegame                         0x007b8b64 0x1000 + 8092516\n11  Foundation                      0x32e10e80 __NSThread__main__ + 968\n12  libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n13  libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 11 name:  com.apple.NSURLConnectionLoader\nThread 11:\n0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20\n1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36\n2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124\n3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878\n4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352\n5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100\n6   Foundation                      0x32d8d3d0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304\n7   Foundation                      0x32e10e80 __NSThread__main__ + 968\n8   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n9   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 12:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 13:\n0   CoreFoundation                  0x3243e660 CFBasicHashAddValue + 180\n1   CoreFoundation                  0x32446310 uniquedName + 124\n2   CoreFoundation                  0x3244ad88 _CFXNotificationPost + 740\n3   Foundation                      0x32d61594 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68\n4   Foundation                      0x32e11362 __NSFinalizeThreadData + 250\n5   CoreFoundation                  0x324caf7e __CFTSDFinalize + 62\n6   libsystem_c.dylib               0x3a7af128 _pthread_tsd_cleanup + 172\n7   libsystem_c.dylib               0x3a7aedfe _pthread_exit + 114\n8   libsystem_c.dylib               0x3a7c8160 pthread_exit + 24\n9   Foundation                      0x32d99a2e +[NSThread exit] + 6\n10  Foundation                      0x32e10e9e __NSThread__main__ + 998\n11  libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n12  libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 14:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 15:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 16:\n0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8\n1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14\n2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362\n3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4\n\nThread 17:\n0   libsystem_kernel.dylib          0x3a8636a4 __semwait_signal + 24\n1   libsystem_c.dylib               0x3a7c13ce nanosleep + 138\n2   thegame                         0x0098ba8c 0x1000 + 10005132\n3   thegame                         0x0093ec54 0x1000 + 9690196\n4   thegame                         0x0093ec80 0x1000 + 9690240\n5   thegame                         0x0098bc08 0x1000 + 10005512\n6   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n7   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 18 name:  com.apple.CFSocket.private\nThread 18:\n0   libsystem_kernel.dylib          0x3a863594 __select + 20\n1   CoreFoundation                  0x324d31f2 __CFSocketManager + 674\n2   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306\n3   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4\n\nThread 0 crashed with ARM Thread State (32-bit):\n    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x3c34f534\n    r4: 0x00000006    r5: 0x3c34fb88      r6: 0x01095260      r7: 0x2fdfebbc\n    r8: 0x0000000b    r9: 0x000008c8     r10: 0x00000000     r11: 0x01090770\n    ip: 0x00000148    sp: 0x2fdfebb0      lr: 0x3a7da123      pc: 0x3a863350\n  cpsr: 0x00000010\n
Run Code Online (Sandbox Code Playgroud)\n\n

谢谢你!

\n

fra*_*ees 0

EXC_BAD_ACCESS当脚本级别出现错误时抛出(例如空引用异常,但也可能是任何其他异常)。

我开发了一个游戏内开发控制台,在其中转发 Unity 和我们的脚本抛出的所有调试日志(请参阅 Unity 提供的漂亮回调http://docs.unity3d.com/Documentation/ScriptReference/Application.LogCallback.html) 。

将游戏构建为开发构建(检查构建设置),对 Unity 库进行符号链接并检查脚本调试(如果需要),您可以尝试重现导致某些用户的应用程序崩溃的步骤。这样,当发生异常时,iOS上就不会崩溃。

看一下这个 DebugConsole 实现,它可以非常快速地集成(尽管您也需要一些小的更改来转发 Unity 日志)并且可以为您完成这项工作:https ://gist.github.com/darktable/1412228

在我们的开发版本中,除非我们的应用程序滥用内存,否则我们不会再发生崩溃。即使在这种情况下,您也可以追踪发生的情况。