Win32 Debug? (Was: [wxPython] wxYield() recommendations?)

Thank you very much for the response!

Unfortunately the crashes came back, even with the wxYield(). The crashes only happen more or less randomly when executing a certain operation. Sometimes the 1. time, sometimes the 5. time, sometimes the 15. time. Only with Windows98, and only if the stuff which gets destroyed and rebuilt is on a notebook page.

The program crashes only after the event handler returns control to the main loop. I added print statements to all my event handlers, and none of these is called after the destroy/rebuild operation.

So here is my new question: how can one enable the "Debug" button in Window's "Illegal operation" dialog for wxPython?

I case compiling is the only option, I have VC++ 6.0. What experience did people have following the instructions at Phoenix/README.rst at master · wxWidgets/Phoenix · GitHub?

Thanks,
        Ralf

···

--

On 11 Sep 2000 17:35:05 -040 David Bolen wrote:

"Ralf Grosse-Kunstleve" <rwgk@my-Deja.com> writes:

Are there general recommendations for inserting wxYield() after
certain types of operations? Similarly, are there places where one
would better not insert wxYield()?

I don't think as a matter of course you should need to do anything
like this, but would need to know more about the code (and structure of
objects) in question in this case.

If I had to guess, I'd say that you had established event handlers
that were being triggered in some way by the objects you were
destroying, such that you ended up destroying an object and later
(back in your main event loop) tried to process the pending event to
the now non-existent object. By adding the wxYield(), you permitted
the event to be processed prior to destroying the target object.

Now, depending on the structure you have, I suppose that might be
valid (although I'm not sure how deterministic, in case there are
other pending events for some other object), but it's hard to say in
the abstract.

--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l@fitlinxx.com /
> FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/

_______________________________________________
wxPython-users mailing list wxPython-users@wxwindows.org
http://wxwindows.org/mailman/listinfo/wxpython-users

--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.

"Ralf Grosse-Kunstleve" <rwgk@my-Deja.com> writes:

Unfortunately the crashes came back, even with the wxYield(). The
crashes only happen more or less randomly when executing a certain
operation. Sometimes the 1. time, sometimes the 5. time, sometimes
the 15. time. Only with Windows98, and only if the stuff which gets
destroyed and rebuilt is on a notebook page.

If there's a relatively small snippet of code that you can create that
reproduces the problem (even if not 100% of time - just enough to know
that it exists in that sample of code), then seeing that code might
help make some educated guesses as to what is going on.

So here is my new question: how can one enable the "Debug" button in
Window's "Illegal operation" dialog for wxPython?

I've only done this with Python itself at this point, but expect it
would work as well with wxWindows/wxPython. You'd probably have to
rebuild wxWindows/wxPython with debugging symbols, and then as long as
the crash was in one of those DLLs, the debug button should load it
properly. Of course, it may still be tricky to backtrack just what
was going on in relation to the outer Python script.

I case compiling is the only option, I have VC++ 6.0. What
experience did people have following the instructions at
Phoenix/README.rst at master · wxWidgets/Phoenix · GitHub?

I've been able to rebuild things following basically that approach
pretty well. I think at one point I stopped bothering to put the VC
CRTDBG stuff into the nmake command, but can't remember exactly why
(it worked fine with them - I think I just decided it was unnecessary
or redundant for some reason).

···

--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l@fitlinxx.com /
  > FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/