GPF in DoNotifyWindowAboutCaptureLost()

Neil Robinson neil at simpol.com
Thu May 1 11:26:55 PDT 2008


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

Kevin Ollivier wrote:
| Hi Neil,
|
| On May 1, 2008, at 10:09 AM, Neil Robinson wrote:
|
|> This is not as easy to establish as you seem to assume. Our code is
|> not calling any of the capture code. It is also running wx in a
|> completely separate thread (since wx requires that it be running
|> things, which is something that we can't allow since otherwise our
|> own threads would halt).
|
| Wait, are you saying you're not running wx in the application's main
|  thread? If so, running wx inside a thread is not supported not just
| by wx, but by most (all?) of the underlying native toolkits it uses,
| and will definitely lead to a lot of strange errors caused by
| non-threadsafe code crossing threads. (invalid pointers being a prime
| example)

wx can't be run in the main thread without it taking over. We cannot
afford to abdicate control of the entire event processing to wx in the
hope that it will pass *our* events of which it has no knowledge, on
correctly. On Windows, we use a separate thread to run wx, and we
coordinate with that thread by passing messages back and forth. All of
the wx stuff runs inside the same thread, there is no crossing of
threads. As for other platforms, the current design calls for a similar
design, except that we will run wx in a separate process and communicate
with that process.

This has been working fine for quite some time now (nearly two years and
on both wx 2.6 and 2.8). The biggest problem we have run across is some
issues in the focus handling which we reported but which were not
implemented, so we are forced to fix them each time in our own copy.

- --
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

iD8DBQFIGgtvZVwyUf+Ag9wRAox6AJ0TLd26dQej+Sxy8Z5Ch4eeCiGEyQCgs3yi
SAmHP5s+sKNaCBjfC33yqBY=
=rwFo
-----END PGP SIGNATURE-----


More information about the wx-users mailing list