5

I have some problem with my iPhone/ipad app. its published in app store, but now it seems like a few users experiences crashes when they try to start the app. Sometimes it helps with a hard reboot. Would be very happy if someone could help me sorting out whats going on. The app is build in unity 3d if that matters.. Here´s my crash log:

Hardware Model:      iPad2,3
Process:         thegame [3955]
Path:            /var/mobile/Applications/...thegame.app/thegame
Identifier:      thegame
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]
Date/Time:       2013-03-18 23:00:43.195 +0000
OS Version:      iOS 6.1.2 (10B146)
Report Version:  104

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

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x3a863350 __pthread_kill + 8
1   libsystem_c.dylib               0x3a7da11e pthread_kill + 54
2   libsystem_c.dylib               0x3a81696e abort + 90
3   thegame                         0x00bc6288 0x1000 + 12341896
4   thegame                         0x00bb6e64 0x1000 + 12279396
5   libsystem_c.dylib               0x3a7e3e90 _sigtramp + 40
6   thegame                         0x007b9688 0x1000 + 8095368
7   thegame                         0x007b9688 0x1000 + 8095368
8   Foundation                      0x32e110f0 __NSThreadPerformPerform + 456
9   CoreFoundation                  0x324cf680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
10  CoreFoundation                  0x324ceee4 __CFRunLoopDoSources0 + 208
11  CoreFoundation                  0x324cdcb2 __CFRunLoopRun + 642
12  CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352
13  CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100
14  GraphicsServices                0x35ff52e6 GSEventRunModal + 70
15  UIKit                           0x343562fc UIApplicationMain + 1116
16  thegame                         0x00006a94 0x1000 + 23188
17  thegame                         0x00003324 0x1000 + 8996

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x3a853648 kevent64 + 24
1   libdispatch.dylib               0x3a783974 _dispatch_mgr_invoke + 792
2   libdispatch.dylib               0x3a783654 _dispatch_mgr_thread$VARIANT$mp + 32

Thread 2:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 3:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36
2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878
4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100
6   WebCore                         0x38407500 RunWebThread(void*) + 440
7   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
8   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 5:
0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8
1   thegame                         0x00c999d8 0x1000 + 13208024
2   thegame                         0x00bff558 0x1000 + 12576088
3   thegame                         0x00c7773c 0x1000 + 13068092
4   thegame                         0x00c92bec 0x1000 + 13179884
5   thegame                         0x00cada2c 0x1000 + 13290028
6   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
7   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 6:
0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8
1   thegame                         0x009401f4 0x1000 + 9695732
2   thegame                         0x0098b714 0x1000 + 10004244
3   thegame                         0x0098bc08 0x1000 + 10005512
4   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
5   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 7:
0   libsystem_kernel.dylib          0x3a852f04 semaphore_wait_trap + 8
1   thegame                         0x00a228ac 0x1000 + 10623148
2   thegame                         0x00a3f800 0x1000 + 10741760
3   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
4   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 8 name:  AURemoteIO::IOThread
Thread 8:
0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36
2   AudioToolbox                    0x31fc391c AURemoteIO::IOThread::Run() + 104
3   AudioToolbox                    0x31fc5c84 AURemoteIO::IOThread::Entry(void*) + 4
4   AudioToolbox                    0x31f03882 CAPThread::Entry(CAPThread*) + 294
5   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
6   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 9:
0   libsystem_kernel.dylib          0x3a8636a4 __semwait_signal + 24
1   libsystem_c.dylib               0x3a7c13ce nanosleep + 138
2   libsystem_c.dylib               0x3a7c133a usleep + 46
3   thegame                         0x00a22cb0 0x1000 + 10624176
4   thegame                         0x00a3f858 0x1000 + 10741848
5   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
6   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 10:
0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36
2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878
4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100
6   CFNetwork                       0x321a22ca CFURLConnectionSendSynchronousRequest + 330
7   Foundation                      0x32e351c2 +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 242
8   thegame                         0x007b4a6c 0x1000 + 8075884
9   thegame                         0x007b4704 0x1000 + 8075012
10  thegame                         0x007b8b64 0x1000 + 8092516
11  Foundation                      0x32e10e80 __NSThread__main__ + 968
12  libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
13  libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 11 name:  com.apple.NSURLConnectionLoader
Thread 11:
0   libsystem_kernel.dylib          0x3a852eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x3a853048 mach_msg + 36
2   CoreFoundation                  0x324cf040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x324cdd9e __CFRunLoopRun + 878
4   CoreFoundation                  0x32440eb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x32440d44 CFRunLoopRunInMode + 100
6   Foundation                      0x32d8d3d0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7   Foundation                      0x32e10e80 __NSThread__main__ + 968
8   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
9   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 12:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 13:
0   CoreFoundation                  0x3243e660 CFBasicHashAddValue + 180
1   CoreFoundation                  0x32446310 uniquedName + 124
2   CoreFoundation                  0x3244ad88 _CFXNotificationPost + 740
3   Foundation                      0x32d61594 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
4   Foundation                      0x32e11362 __NSFinalizeThreadData + 250
5   CoreFoundation                  0x324caf7e __CFTSDFinalize + 62
6   libsystem_c.dylib               0x3a7af128 _pthread_tsd_cleanup + 172
7   libsystem_c.dylib               0x3a7aedfe _pthread_exit + 114
8   libsystem_c.dylib               0x3a7c8160 pthread_exit + 24
9   Foundation                      0x32d99a2e +[NSThread exit] + 6
10  Foundation                      0x32e10e9e __NSThread__main__ + 998
11  libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
12  libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 14:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 15:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 16:
0   libsystem_kernel.dylib          0x3a863d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x3a7b1cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x3a7b1a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x3a7b18a0 start_wqthread + 4

Thread 17:
0   libsystem_kernel.dylib          0x3a8636a4 __semwait_signal + 24
1   libsystem_c.dylib               0x3a7c13ce nanosleep + 138
2   thegame                         0x0098ba8c 0x1000 + 10005132
3   thegame                         0x0093ec54 0x1000 + 9690196
4   thegame                         0x0093ec80 0x1000 + 9690240
5   thegame                         0x0098bc08 0x1000 + 10005512
6   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
7   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 18 name:  com.apple.CFSocket.private
Thread 18:
0   libsystem_kernel.dylib          0x3a863594 __select + 20
1   CoreFoundation                  0x324d31f2 __CFSocketManager + 674
2   libsystem_c.dylib               0x3a7bc30e _pthread_start + 306
3   libsystem_c.dylib               0x3a7bc1d4 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x3c34f534
    r4: 0x00000006    r5: 0x3c34fb88      r6: 0x01095260      r7: 0x2fdfebbc
    r8: 0x0000000b    r9: 0x000008c8     r10: 0x00000000     r11: 0x01090770
    ip: 0x00000148    sp: 0x2fdfebb0      lr: 0x3a7da123      pc: 0x3a863350
  cpsr: 0x00000010

Thank you!

user2219959
  • 51
  • 1
  • 2
  • Have you tried to use "Instruments" ? – Bhavin Mar 28 '13 at 14:24
  • Hmm, looks like it might be a dereference of a null pointer at runtime, but that's just my interpretation, which could be extremely wrong. Try looking at Instruments: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html – Shotgun Ninja Mar 28 '13 at 14:37
  • I have tried instruments, but I cant reproduce the crash on my own devices.. – user2219959 Mar 28 '13 at 15:13
  • This crash is not symbolicated. This means we dont know where in your game it crashed. See http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports http://kevincupp.com/2011/05/12/symbolicating-ios-crash-logs.html – jackslash Mar 28 '13 at 16:37
  • @jackslash thanks for replying.. it actually is symbolicated? before it looked like this: `9 CoreFoundation 0x324cf680 0x32438000 + 620160` and now it looks like this: `CoreFoundation 0x324cf680__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12` or am I wrong? – user2219959 Mar 28 '13 at 20:22
  • EXC_BAD_ACCESS usually means you are trying to access an object in memory that has already been released, e.g. an autorelease object that has not been retained before the main run loop was entered. So the 1st question is: Do you use ARC? – Reinhard Männer Mar 28 '13 at 21:17
  • @ReinhardMänner the game is built in the 3d engine unity, i just use xcode to compile my project.. not really sure what ARC is? – user2219959 Mar 28 '13 at 22:13
  • @user2219959 Yes you have symbolicated the UIKit parts but your own code is not symbolicated. You need to find the dsym for that build of your app and re-symbolicate. – jackslash Mar 28 '13 at 23:59
  • @user2219959 ARC is Automatic Reference Counting. If you use ARC in your project, the compiler does all retain, release and autorelease calls for you. There are a few cases where you have to be careful with memory management, but in most cases, you won't have any problem with memory leaks or dangling pointer (that may cause your problem). – Reinhard Männer Mar 29 '13 at 07:56
  • i have some more info on my problem.. yesterday a friend of mine was trying to start the game, but it crashed just when tapping the game icon. he tried several times, but same thing happened. he then turned on flight mode, and tapped the icon again. and it started fine again. after that he exited and terminated the game, and switched flight mode off again. now it still runs every time, and he cant reproduce the crash again.. any more ideas what this could be? – user2219959 Mar 29 '13 at 09:48
  • @jackslash thing is, i dont have a dsym file for the .app-file i uploaded to itunes. what i did was to re-generate exactly the same xcode project now, but with the dsym-option on. and now i symbolicate the crash-logs (from the itunes app version) with my new .app and new .dsym. is there any way i can symbolize without having a dsym file from uploaded project? – user2219959 Mar 29 '13 at 09:48
  • @user2219959 it can be different every time. You need to try and get crash reports from this new binary you have the dsym for. – jackslash Mar 29 '13 at 11:44

1 Answers1

0

EXC_BAD_ACCESS is thrown when something at scripting level gone wrong (e.g. null reference exception, but could be any other exception).

I've developed an in-game dev console where I forward all the debug logs thrown by Unity and our scripts (see the nice callback Unity offers http://docs.unity3d.com/Documentation/ScriptReference/Application.LogCallback.html).

Building the game as a Development Build (check build settings), Symlinking the Unity libraries and also checking script debugging if you need to, you can try to reproduce the steps that got your app to crash for some users. This way, it won't crash on iOS when an exception occurs.

Take a look at this DebugConsole implementation, which can be integrated really fast (despite you need some minor changes to forward Unity Logs too) and can do the job for you: https://gist.github.com/darktable/1412228

In our dev builds we no longer get a crash unless our app abuses memory. Even in that case you can track what happend.

frarees
  • 2,190
  • 3
  • 17
  • 22