Quote:
Originally Posted by bytor99999
I have bugs in my application that I would love to fix. But the problem is I can't always replicate it with the same conditions. And right now, I can't make it break at all. It seems to break when I am showing it off to someone else.
I don't have any crash reports on it to even help me out.
So what is the best approach to testing, different devices and finding some deep root causes of bugs.
Thanks
Mark
|
Intermittent bugs can be really hard to find. First step is to create a build where you have the source code unchanged, plus the exact executable and symbol file you are testing with. save the executable and symbol file in a second folder. The system uses the date stamp on the build to match the program and the symbol file to "symbolicate" log files, so you need to make sure you save the exact .app and symbol file that you test with. Rebuilding t without making any source changes will proven the system from matching the executable with the symbol file.
To fix this problem, you can give out a development build with symbols included. Just put your tester's UDIDs into the development profile. Give that out to testers, and teach them how to get crash logs from their devices and mail them to you. Also test the snot out of it yourself, trying to get it to crash. Sometimes the crash log shows the line that's the source of the bug.
Next, do a build and analyze on the program, and look through and fix every single problem it identifies with your code. Some, like unused variables, won't cause any harm, but it can be easy to miss a real problem if you have a ton of other issues flagged as well. Getting a build and analyze to run with no issues raised is a very good thing.
Also try running with the zombies tool in Instruments. That can find memory problems with over-released objects.
If it only crashes when you are demonstrating it, demonstrate it to people with a video camera recording the screen. Capture as many crashes as you can, and then go back and try to figure out what aspects they have in common. Frequently other people do things with your app that you don't. Programmers tend to get into a narrow path through their programs, without even realizing it. Users will do things we don't expect. That might be the reason you crash doing demos.
That's just some off-the-cuff advice. Good luck, and stick with it. Debugging takes patience and determination.