3

We made a crash logging system that logs all crashes and let the server store them. We're getting bunch of crashes but we don't know what causes it. The game's been running for months and we never saw any of these crashes while the game is running (debugging, development stage, etc).

Strangely, we're getting bunch of these errors. I tried looking at them in code but it seems that they're all okay. If they weren't it should crash right away.

The only thing that we're getting is a stack trace that is not very informative. We can't get any clue from the stack trace since it doesn't include anything in our code.

I want to know why this crash happens and why it only gives me this stack trace. I posted the crash log below. Thanks.

+++++++++++++++++++++++++++++++++++++++++++
#1 - Mutating method sent to immutable object (Dictionary)

-[__NSCFDictionary removeObjectForKey:]: mutating method sent to immutable object
(

    \4   libc++abi.dylib                     0x30e093c5 _ZL19safe_handler_callerPFvvE + 76\"
    \"5   libc++abi.dylib                     0x30e09451 _ZdlPv + 0\"
    \"6   libc++abi.dylib                     0x30e0a825 __cxa_current_exception_type + 0\"
    \"7   libobjc.A.dylib                     0x3687d2a9 objc_exception_rethrow + 12\"
    \"8   CoreFoundation                      0x353ac50d CFRunLoopRunSpecific + 404\"
};

+++++++++++++++++++++++++++++++++++++++++++
#2 - Inserting nil object in array


*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
(

    \4   libc++abi.dylib                     0x380eb3c5 _ZL19safe_handler_callerPFvvE + 76\"
    \"5   libc++abi.dylib                     0x353e5451 _ZdlPv + 0\"
    \"6   libc++abi.dylib                     0x353e6825 __cxa_current_exception_type + 0\"
    \"7   libobjc.A.dylib                     0x35d1b2a9 objc_exception_rethrow + 12\"
    \"8   CoreFoundation                      0x3776b50d CFRunLoopRunSpecific + 404\"
};


+++++++++++++++++++++++++++++++++++++++++++
#3 - Array out of bounds

*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]
(

    \4   libc++abi.dylib                     0x353e53c5 _ZL19safe_handler_callerPFvvE + 76\"
    \"5   libc++abi.dylib                     0x353e5451 _ZdlPv + 0\"
    \"6   libc++abi.dylib                     0x353e6825 __cxa_current_exception_type + 0\"
    \"7   libobjc.A.dylib                     0x35d1b2a9 objc_exception_rethrow + 12\"
    \"8   CoreFoundation                      0x3776b50d CFRunLoopRunSpecific + 404\"
};
gavinb
  • 19,278
  • 3
  • 45
  • 60
Sylpheed
  • 267
  • 1
  • 12

1 Answers1

2

It looks like an unhanded Objective-C exception, which is being rethrown by the run loop and which eventually calls terminate. This loses the stack backtrace information.

How are you logging the application crashes? I'm assuming you haven't registered your own exception handler using NSSetUncaughtExceptionHandler? This would allow you to inspect the stack to find the real cause of the problem. There are scripts around to symbolicate stack dumps - check the Apple docs for details.

This is a very similar problem:

Community
  • 1
  • 1
gavinb
  • 19,278
  • 3
  • 45
  • 60
  • I'm not really sure since I didn't write the CrashLogger and the one who wrote that is already gone. Can you please examine this code and see if this is the problem why it's not logging properly? https://docs.google.com/document/d/1DK3nyN-bz67EDAo09PWTRTlpDxVDaawhuGj67v8F1ZU/edit – Sylpheed Jun 05 '12 at 13:13