Thanks for reading, sorry for the delay, I wanted to do more tests. Answer between lines

On Wed, Aug 26, 2015 at 9:27 AM, Stefan Dösinger <stefandoesinger@gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Am 2015-08-25 um 22:09 schrieb Javier Pimás:
> Hi! this is a very low-level technical question and my first one to
> this list so please take with a grain of salt. I'm debugging a 32
> bit app in wine 1.6.2, on ubuntu 15.04 64 bits.
I recommend to switch to the development version of Wine if you're
doing debugging like this.

> The app I'm debugging is a smalltalk vm, so it is very possessive
> with the native stack, synchronization, callbacks and things like
> that. I'm having a problem that happens in wine and not in windows,
> and the following thing I describe might be the cause, it's very
> subtle.
I can't answer the core part of your question I'm afraid. I'm curious
though why this would make a difference. Does the VM place something
on the stack that the message handler expects to find? If so, how does
it find it? Does it expect a certain stack depth as well?

It's not so much for the stack shape but that the VM expects executing app code after returning from a WndProc. Before returning, the VM sets a RETURNED_FROM_CALLBACK flag, that is checked on method activations (very frequently). If WaitMessage doesn't return, a method activation doesn't occur and the flag is left active. A second non-queued message then reenters app code, and on the first method activation the flag is detected the code isn't where it supposed (after returning) but in another callback, confusing the app. This is not to mean the VM is bug free, the strange thing is that it behaves differently in wine and windows.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJV3bCaAAoJEN0/YqbEcdMwoXEP/Rss350C+9yjpzRoZKcXkhop
37QwmLrlkXg7Br0xWhgltfiIXpmRcrKq1EgGah0m9YTfSTjLbOIz80XszUELSCCc
lGnTOlkvETCJMv7EdinIVehngpm4phRugpfZSDdPNnx+orJn6T87PkbDhwTZsZ6u
g3TljQ1sLbF2O/AOKzr8S3CltIkf5oReHB29T4DnABbQqfXm0X5PhyKPevCtnWTG
od3PgQprwCve+DJmikZAVrqQtyms9xaryLh9Xc3XrYO8YNe2lxgfKYJY8NA3tDsk
nA+A1sNZferqIl5xUMooaquzU9471FS5pItXRPsnXJ5zwrzC47afgF47bnLpUmaQ
R2B6Vt8mUlB/KpNnhzzu9Q/RrEDwOj8PxmY/lhcSH2y4Y3VTAQCY2Mhrqc2tdJWT
li8R6OCF24pA1EM7q/+5gB2hedO4kMHcy5LcDvtxXbamIafxuUCM6loG5LR2VE+x
6qR1z+83CknyOOAm/MePNMDZqJ4dJmuM3V+8Dsv5YK5YtyM03i1Qy9l78jTkUGIG
2jVsRW1Ske+Uz50cBtago9z8S01BTMsLtctmQeFfmushfPW5BUjRLrJD257EngVH
lqNSBDSV/u41EiDjapN3ASkcWrEihdOyYQLJAfDjwu4vAN5MMO27B3N14wL2zKQ0
5+q0DrKfLGFUTgIQL0bR
=J5gb
-----END PGP SIGNATURE-----



--
Javier Pimás
Ciudad de Buenos Aires