Program signal: "EXC_BAD_ACCESS". [Going to process 388] kill the error in the kill target (kill anyway): warning: error on line 2179 "/SourceCache/gdb/gdb-1472/src/gdb/macosx/macosx-nat-inferior.c" in function "macosx_kill_inferior_safe": (os / kern) failed (0x5x) exit
Note where the error is; gdb crashed. This is potentially due to a crash in your application, but these specific messages are certainly not useful for debugging a real problem.
And, most likely, the actual failure has nothing to do with the excess release of the object. Maybe so, but most likely not.
As a rule, when GDB crashes in this way, it happens because you broke a heap or stack so that gdb disables corruption, trying to understand what is happening. Or your application has entered a state in which gdb can no longer communicate with it (which may be the case here, given the location of the failure).
In this case, some things to try:
using the latest developer tools? If not, do it and rebuild your application from a clean one too.
Can an accident be reproduced on the simulator and device? If so, is it possible to debug it correctly on one and not on the other?
If you run the application without a debugger, can you launch it and then extract the failure log from the device?
Does the behavior between debug and non-debug builds change? This can greatly affect memory corruption.
Is this just the beginning? If so, what have you changed recently?
The thought of another trick;
- try setting the
MallocScribble environment MallocScribble . This will write the values ββto memory during allocation / deallocation and often, at least, cause damage due to memory corruption, for a crash earlier or enough to detect it.
bbum
source share