views:

67

answers:

2

Hi all

while doing adhoc testing tester got the crash with the crash report :

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2ff00ff4

the appllication never crashes in simulator but certainly crashes in the device .

when I testes it with Object alloc I got some strange allocation like in the picture (see the last line in the picture) :alt text

so can anyone tell how to solve this bed access .

+1  A: 

I believe GeneralBlock-X refers to a block of memory allocated with malloc(); in other words, raw data without a type, as opposed to an instance of a known class.

The line item GeneralBlock--32 implies somebody tried to allocate -32 bytes of memory. I wouldn't think that would get as far as appearing in Instruments, but there it is. The fact that the count is also negative might be a clue that something stranger is happening, like you are actually trying to allocate MAXINT+33 and the number is wrapping around. I'm guessing.

At any rate, Instruments should be able to give you stack traces of where that block of memory was allocated; that information would be a valuable clue regarding what's going wrong.

benzado
+1  A: 

Remember that instruments only documents what it can see; if something malloc'd memory before it started, and then free'd it while it was running, you'd get a negative count. This is not necessarily relevant to your issue. An EXC _ BAD _ ACCESS is frequently the result of trying to access a deallocated (or never initialized) object; try turning on NSZombies and then running.

Ben Gottlieb