|
Prev: xgif.ocx
Next: SetUnhandledExceptionFilter()
From: Fernando Rodriguez on 27 Jun 2008 13:55 Dear fellow dinosaurs, Some customers are complaining that my VB6 app raises a GPF on exiting. Unfortunately, the only infromation they can provide is a memory address, which is pretty useless as it doesn't tell me if my main exe is the culprit or if it's some dll or ocx or whatever. I managed to catch that and other exceptions using SetUnhandledExceptionFilter() (see http://urlmini.us?i=1099) , but I still have no idea where the exception is comming from. Is there a way to get a stack trace up to the offending function and module? Even better, is there any pre-built solution for this? Free or commercial. Thanks in advance!
From: Stoil Marinov on 27 Jun 2008 14:21 Fernando Rodriguez wrote: > > Dear fellow dinosaurs, > > Some customers are complaining that my VB6 app raises a GPF on exiting. > Unfortunately, the only infromation they can provide is a memory > address, which is pretty useless as it doesn't tell me if my main exe is > the culprit or if it's some dll or ocx or whatever. > > I managed to catch that and other exceptions using > SetUnhandledExceptionFilter() (see http://urlmini.us?i=1099) , but I > still have no idea where the exception is comming from. Is there a way > to get a stack trace up to the offending function and module? > > Even better, is there any pre-built solution for this? Free or commercial. > > Thanks in advance! > > Hi Fernando, If you can reproduce the error on your computer, you could run the program in the VS (VC++) debugger and catch the error in there. If you compile the the program with debug information (check the Compile options), the debugger will show the responsible line of your code that caused the error. I use this method of tracking down bugs that happen only in the compiled version. Usually they stem from the optimizations I have selected for the compiler. If the error happens only on the users' computers, then you might want to check Matthew Curland's book and debug code: "Advanced Visual Basic 6: Power Techniques for Everyday Programs" Author: Matthew Curland Published by: Addison-Wesley, July 2000 ISBN: 0-201-70712-8 http://www.PowerVB.com On the CD, accompanying the book he has several modules (.bas) that let you get source code location of the error from the memory address of the error. he discusses the debugging in Chapter 11 of his book. You still have to compile with Create Symbolic Debug Info option checked. You can create a debug version of your program using this modules and ask the user to run it. When an error happens you could display the information you get from the stack (using the debug modules) and display it for the user or save it into a file. Regards, Stoil
|
Pages: 1 Prev: xgif.ocx Next: SetUnhandledExceptionFilter() |