Memory related defects can be hard to debug, therefore I usually force automatic system "out of memory" notifications. That makes sure I have no other choice, but to handle potential OOM issues from the start. Otherwise the app won't run. Clever, right?
And that's the problem. Potential OOM issues. Did you notice that "potential" keyword?
Showing posts with label memory leak. Show all posts
Showing posts with label memory leak. Show all posts
Saturday, January 7, 2012
Always Test in Real - Not Just Crappy - User Device
Wednesday, December 8, 2010
GDB: Program received signal: "EXC_BAD_ACCESS"
When your program crashes (not if, but when) with an error message...
GDB: Program received signal: "EXC_BAD_ACCESS"...you know that there is most likely a memory leak somewhere. Your code just tried to access something, which was supposed to be there, which used to be there, which is going to be there, which should have been there - but right now is missing.
Labels:
debug,
Guard Malloc,
iphone,
memory leak,
simulator
Monday, June 7, 2010
How to Make Instruments Show Your Own Code
Debugging memory leaks with Instruments. Great tool, but would be more useful, if I could see there references to my code.
Turned out it's a known iPhone OS 3.0 defect, almost two years old! No idea why it hasn't been fixed by Apple. Maybe old SDKs are not supported on purpose, which does make some business sense.
How to fix: Go to your Xcode project, select project info, go to Build tab and search Base SDK. Change your project Base SDK to 3.1. I had there 3.0, which seems to be a known defect.
Turned out it's a known iPhone OS 3.0 defect, almost two years old! No idea why it hasn't been fixed by Apple. Maybe old SDKs are not supported on purpose, which does make some business sense.
How to fix: Go to your Xcode project, select project info, go to Build tab and search Base SDK. Change your project Base SDK to 3.1. I had there 3.0, which seems to be a known defect.
- Build - Clean All Targets - select all - Clean
- Build - Build and Analyze
- Run - Run with Performance Tool - Leaks
- Stop
- Open popup item with application name - Launch Executable - Choose Executable
- Browse to your Build directory and select your application
- Record (the red Dot button)
Labels:
code,
debug,
Instruments,
iphone,
memory leak,
simulator,
source,
Xcode
Subscribe to:
Posts (Atom)