GPF in DoNotifyWindowAboutCaptureLost()

Neil Robinson neil at simpol.com
Thu May 1 08:07:20 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vaclav Slavik wrote:
| Hi,
|
| Neil, what exactly do you do to end in this situation? Do you have a
| backtrace showing when is the now-invalid window destroyed?

No, I don't. I am actually working within our language which uses
wxWidgets to implement the UI. However, we do not capture the mouse
under normal circumstances, unless the user calls that functionality. In
the scenario where the GPF is happening, this functionality is not being
called.

The scenario looks like this:

A frame window is opened, containing a menu, tool bar, and status bar.

A menu item is selected, resulting in the display of a modal wxdialog
containing a wxpanel on which there are various controls. The current
focus control is a wxcombobox, at which point a push button is clicked
resulting in the display of a common dialog (this is on Windows XP).

A selection is made and then the dialog is closed.

Redoing this scenario, the GPF occurs before the common dialog is shown.

At no point do we capture the mouse in any of the code that is called up
to the point where the crash occurs.

| I'm asking because this must mean that you (or wx itself?) are
| destroying a window (let's call it A) somewhere without releasing its
| mouse capture first (which is normally considered evil, there's an
| assert against it in ~wxWindowBase). Worse yet, you have _another_
| window B that took over A's capture.
|
| All I can think of is that there are two windows in the middle of some
| UI operation (such as dragging or scrolling) that requires mouse capture
| and all of sudden, one of the windows is destroyed under user's hands?
|
| Basically, what I'm asking is: is there a legitimate situation in which
| this situation happens? If there is, we should handle it gracefully. If
| there isn't, we should assert (and not crash, of course).

As I pointed out when I posted, upon reading the code it is clear that
an invalid pointer is being used, what I don't quite follow, is how the
assert has not already been called, except that perhaps it is further
down the stack and the current code doesn't account for that.

- --
Ciao, Neil

========================================================================
Neil Robinson
Technical Director

Simpol Limited
St John's Innovation Centre
Cowley Road, Cambridge, CB4 0WS, UK

Simpol Limited is a limited company registered in England and Wales.
Registered number is: 04759852.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIGdynZVwyUf+Ag9wRAvRBAJ0eHSflqlzJQcUYiLqGx6oNFEFx8ACdHLp6
VYgRiDoQg6c2T7WsAHUQdfE=
=dQFW
-----END PGP SIGNATURE-----


More information about the wx-users mailing list