Re: Find rare bugs - SEH and c++ exception handling



Berry

Thank for your answer. Unfortunately I never encountered the bug on the
emulator. It even never occured in the lab: it only occured "on the road".

Markus




"Barry Bond [MS]" <barrybo@xxxxxxxxxxxxx> wrote in message
news:OmZs0JuaGHA.3740@xxxxxxxxxxxxxxxxxxxxxxx
If the bug repros on the DeviceEmulator, then you might have some luck if
you configure the emulator to display its debug console window for serial
port 1. When the kernel detects an application exception, it logs
critical
data about the exception out to the device's serial port.

Barry

"Markus Hofer" <mh@xxxxxxxxxxx> wrote in message
news:u90stVsaGHA.4424@xxxxxxxxxxxxxxxxxxxxxxx
I'm currently hunting a "rare" bug in a MFC PocketPC program, which
causes
the program to just "disapear" from the screen. I'm using VS2005 and the
program targets PocketPC 2003 devices. The same Executable also runs on
WM5
PocketPCs.

The bug is not reproducible and occours without user interaction (there
are
some background threads in the application). How can I find such a bug?
I checked lots of documentation and googled on the Web, but could not
find
good method:

a) Postmortem debugging / Dr. Watson
On WM5 it seems to be possible to write a crash dump (resp. Dr.
Wastson
Log) and to do
some postmortem debugging using the dump. Unfortunately all the
documentation I found
referenced Platform Builder but none mentioned VS2005. So I'm not sure
whether it is at all
possible to do this with VS2005

b) Exception Handling
VS2005 supports SEH as well as C++ exception handling. SEH would
probably
report the crash,
but does not unmangel the stack (destructors are not called) which is
a
problem in multithreaded
programs (locks!).
C++ exceptions are not really helpful to find this bug, because it
does
not give you information about
the exception.
In the WIN32 Api there exists the function _set_se_translator that
allows
you to handle a SEH exception as
C++ exception. Unfortunately this function does not seem to exist for
the
PocketPC.

So whatever I tried, it did not work as expected. All ideas, comments,
recommendations and so ob are highly
appreciated.

Markus















.



Relevant Pages

  • Find rare bugs - SEH and c++ exception handling
    ... I'm currently hunting a "rare" bug in a MFC PocketPC program, ... The bug is not reproducible and occours without user interaction (there are ... VS2005 supports SEH as well as C++ exception handling. ...
    (microsoft.public.pocketpc.developer)
  • Re: Choosing not to throw exceptions like IllegalArguementException
    ... preventing debug from happening at all. ... like a recipe for converting easily debugged problems into subtle wrong ... Imagine the TreeCellRenderer wich throw an exception, and prevent the JTree from any repaint success, only because some bug happened before, which broke a specific assumption, and now there is the "impossible case" happening. ...
    (comp.lang.java.programmer)
  • Re: toward null-safe cookie cutter Comparators
    ... Sometimes I doubt that you have worked in a lot of brownfield ... because the customer would not complain as much. ... How does the customer *ever* see an exception? ... Reality is that I dislike to deliberately introduce a bug to my code, ...
    (comp.lang.java.programmer)
  • Re: How to pop the interpreters stack?
    ... because this isn't a bug. ... The fact that the exception is generated deep down some ... traceback are relevant and which aren't. ... lies in the input rather than some internal error in some subroutine you ...
    (comp.lang.python)
  • Re: Any Clojure users here?
    ... I've also fixed the minor bug in your code, to wit, it did Swing ... I actually prefer forcing programmers to add some kind of exception ... likely nil or a collection containing a nil where the ... And really, when you look deeply into it, the checked exceptions emperor ...
    (comp.lang.lisp)