Thread 0 crashing in X86 state (32-bit): in cocoa Application

I am doing a bug fix in an osx application. The crash report displays

Date/Time: 2012-05-01 16:05:58.004 +0200 OS Version: Mac OS X 10.5.8 (9L31a) Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000545f5f00 Crashed Thread: 8 Thread 8 crashed with X86 Thread State (32-bit): eax: 0x140e0850 ebx: 0x00060fc8 ecx: 0x92df0ec0 edx: 0xc0000003 edi: 0x545f5f00 esi: 0x140e0870 ebp: 0xb0445988 esp: 0xb0445964 ss: 0x0000001f efl: 0x00010206 eip: 0x92dca68c cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037 cr2: 0x545f5f00 

How to share application code with this report?

What is Thread 0 associated with the X86 (32-bit) event?

If anyone knows, please help me. Thanks in advance.

+4
source share
2 answers

Take a look at Apple's technical notes on CrashReporter here: https://developer.apple.com/library/mac/#technotes/tn2004/tn2123.html

 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x942cea07 ecx: 0xbfffed1c edx: 0x94b3a8e6 edi: 0x00000000 esi: 0x00000000 ebp: 0xbfffed58 esp: 0xbfffed1c ss: 0x0000001f efl: 0x00010206 eip: 0x00000000 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000000 

For Intel-based computers with 32-bit code, you should consider the following points:

Focus on two values: eip and exception address (described earlier).

eip is the program counter at the time the exception occurs. That is, this is the address of the instruction that caused the exception. For most memoryless access exceptions (e.g. EXC_ARITHMETIC / EXC_I386_DIV caused by integer division by zero), this is the key value.

For memory access exceptions:

If eip is equal to the exception address, the exception was caused by dialing instructions. This usually means:

you called a pointer to a fake function (or, equivalently, you called a method on a dummy object)

you returned to the wrong address, which in turn means that you damaged the stack

If the eip does not match the exception address, the exception was thrown by a memory access instruction (from the point of view of C, this means that you are dereferencing an invalid pointer).

+4
source

You get information about the failure, including the reason for the failure (EXC_BAD_ACCESS on stream 8), the contents of the registers, and the return traces for each stream.

Stream 8 crashed. In the part of the crash report, you did not insert here, there are stop traces for each stream, including stream 8. Look at what it does, and you could better understand what happened.

0
source

All Articles