What does the following error mean?

Program received signal: "EXC_BAD_ACCESS". [Switching to process 388] kill error while killing target (killing anyway): warning: error on line 2179 of "/SourceCache/gdb/gdb-1472/src/gdb/macosx/macosx-nat-inferior.c" in function "macosx_kill_inferior_safe": (os/kern) failure (0x5x) quit The Debugger has exited with status 0.(gdb) 
+6
iphone xcode gdb
source share
3 answers

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.
+23
source share

EXC_BAD_ACCESS usually means that you are trying to access those that no longer exist. We need your dump of your stack and probably some code to help you figure it out.

+1
source share

To quote an employee: "Something went wrong."

This means that you tried to access a pointer that is no longer valid. Did you forget to save the object or release it too many times?

0
source share

All Articles