in a quite complex WebApp (Mac standalone) I’ve seen some crashes that were not caught by any exception handler. Happily I was able to find a way to relibly reproduce them, even running in the debugger. The symptom is that the App just quits. In the debugger log I see the lines “Process Completed. Ended” In the Console I find OSX crash logs with different exceptions:
[code]Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000005a8ba855
VM Regions Near 0x5a8ba855:
MALLOC_TINY 000000000c900000-000000000cc00000 [ 3072K] rw-/rwx SM=PRV
–>
__TEXT 000000008fef5000-000000008ff28000 [ 204K] r-x/rwx SM=COW /usr/lib/dyld
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000e0191290
VM Regions Near 0xe0191290:
CG shared images 00000000c7eb2000-00000000c7eba000 [ 32K] r–/r-- SM=SHM
–>
Submap 00000000ffff0000-00000000ffff1000 [ 4K] r–/r-- SM=PRV process-only VM sub map
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000161091e
VM Regions Near 0x161091e:
__LINKEDIT 00000000014da000-00000000015c2000 [ 928K] r–/rwx SM=COW /Users/USER/Documents//.debug
–> __TEXT 00000000015c2000-000000000176f000 [ 1716K] r-x/rwx SM=COW /Users/USER/Documents//.dylib
__DATA 000000000176f000-0000000001779000 [ 40K] rw-/rwx SM=ZER /Users/USER/Documents//.dylib
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000038
VM Regions Near 0x38:
–> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] —/--- SM=NUL /Users/USER/Documents//.debug
__TEXT 0000000000001000-0000000001482000 [ 20.5M] r-x/rwx SM=COW /Users/USER/Documents//.debug
[/code]
occasionally, there is also a message in the debugger log saying solumserver.debug(30510,0xb0093000) malloc: *** error for object 0xc9b9020: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
I tried to strip down that part of the application and added a lot of debug statements. The last thing that seem to happen just before the crash is that I set a variable containing an object (simple class) to nil. I then see the Destructor of that object being executed twice (!) and the App dies, no UnhandledException Handler catches this.
What do you recommend how to further debug the issue? Of course I was not yet able to replicate this within a simple demo app.