Win VM modifications

Andreas Raab andreas.raab at gmx.de
Fri Mar 4 21:05:10 UTC 2005


>> Again, any chance of finding out where it crashes?
>
> Okay, here's where it gets interesting. If the wx pre-processing is 
> applied, simple isolated events work fine. But if an event comes in during 
> a callback, it crashes in a completely random way. What's happening here 
> is a sequence like:
>    interpret -> ioProcessEvents -> wxProcessMessage -> [...] -> 
> interpret() -> ioProcessEvents -> ...
>
> With a separate process polling for wx events, re-entry of the interpreter 
> occurs only during a primitive call.

An RSTTT (Really Simple Thing To Try) would be to do, say,:

ioProcessEvents {
    static int inCallBack = 0;

    if(!inCallBack) {
        /* only do wxProcessMessage if not in callback */
        inCallBack := 1;
        wxProcessMessage(...);
    }

}

Does this work? (if it does work reliably, we just solved the problem)

>> Interesting. What happens if you take out the test here:
>>
>>>        if (msg.hwnd != stWindow){
>>
>> Does this crash? (this would clearly point to a problem in the wx libs).
>
> No, it works fine, so the wx pre-processing doesn't seem to hurt.

Good, good. Very good. Now on for the next try: What happens if you stub out 
the whole ioProcessEvents() loop (yes, everything) and just run the loop 
from the other process? Everything still fine?

Cheers,
  - Andreas




More information about the Wxsqueak mailing list