What this bug indicates ? and How to solve it? [closed]
Program received signal: “0”.
If there is no stack trace or anything and it just quits, this is likely a memory issue. Your app has asked for too much memory and the OS shut it down.
Look for memory leaks, and look at areas that might allocate huge chunks of memory (things like image data manipulation maybe)
Also use the Object Allocations
and Leaks
instruments to monitor memory usage and look for leaks, respectively.
This is likely a memory issue, what you should do are as follows:
- In the menu run, choose Manage Breakpoints -> Add Symbolic Breakpoint -> enter: obj_exception_thrown. (This should allow you to see where in your code the application quits)
- Try to look for overreleased variables from the breakpoints. It may be difficult to find. Here is one hint: If you use the class methods to allocate and initialize a variable e.s [NSString stringWithFormat], that variable will be autoreleased by the pool, so you don't need to call the [release] on it.
- If all the above fails, try the following procedure: In the project window, under Groups & Files -> Executables -> Get Info -> Arguments -> add two variables: NSZombieEnabled & MallocStackLogging to YES. (This will enable the logging of the memory allocation stack into a temporary file, you should then be able to view the log of overreleased variables) In the console window of the debug application, type: $ shell malloc_history {processid} {address} (Here, you should be able to see from which methods cause the overreleased variables).
精彩评论