|
-
June 8th, 2012, 07:07 AM
#7
Re: How to debug without debugging?
 Originally Posted by Paul McKenzie
I think that might be the mistake you're making. You're trying to duplicate the issue on machines you know have been set up correctly or set up in a way where the problem can never be duplicated.
This is when you have to do what I stated and what Igor has stated. The issue is not that you must try your hardest to duplicate the problem (even though it is helpful), you have to do the code review, code analysis, making sure you're checking for all possible scenarios (i.e. return values), create a mini crash dump if the app crashes, get the database or whatever other third-party component information from the customer that your program relies on, etc.
One trick you can try is when you debug your program, by force you make a failure occur (database connect fails, return a NULL from a function, etc.) and see what happens. If the program hangs or does weird things, then you've discovered a hole in the program -- maybe not the same hole as the customer, but a hole nonetheless.
Regards,
Paul McKenzie
That's exactly what I've done. I used the debugger to set the path to the database to just an empty path before initializing the database object. I came up with the same situation as the customer. That's what led me to believe that the database object (or another critical object) is failing during initialization. However, that doesn't help me too much, as half of the object in the program are declared during the initialization of the program, so it really doesn't narrow it too much.
And finding the root of the problem will be difficult. I'm working with a very large code base, and to put it nicely, the code sucks. Return values aren't checked, exceptions are caught and suppressed, methods are 200+ lines long, etc. It's really just downright impossible to try to track it down without some sort of hint. That's why I'm hoping to get a log file from our customer. Narrowing it down to at least the object that crashed will help me tremendously.
I think I'm going to try to get some logging into the build. Hopefully I can find a nice library to help. It's also very possible that these customers have corrupted databases, which is why I'm waiting for them to send them to me. I'm not counting on that though, as history tells me that it would be too easy. 
Thanks for the suggestions guys. Hopefully I can figure this out. :/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|