[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Clipboard/X-problem  - how to debug?
From:       gerard patel <g.patel () wanadoo ! fr>
Date:       2000-05-29 22:08:16
[Download RAW message or body]

At 05:18 PM 5/27/00 +0200, you wrote:
>Hi!
>
>There is a very old problem I have with Agent (16 bit). Maybe someone
>knows how to debug it.
>
>When creating a message somtimes this happens:
>
>I mark the address and delete it. Then I mark the cc address and copy
>it (want to make it the to-address). After the copy Agent is frozen. -
>No crash at all.
>
>This may be a problem with selecting, clipboard or connection to
>Xserver.

I see a similar problem any time I try to select 2 times in a row an edit control
with FreeAgent 16 bits - managed mode or not. I think that it's a problem
in the 'new' clipboard code added end of last year. It has been designed only
for 32 bits programs. There is this remark in windows/clipboard.c:

 * This is a callback mechanism to allow HGLOBAL data to be released in
 * the context of the process which allocated it. We post a WM_TIMER message
 * to the owner window(in CLIPBOARD_DeleteRecord) and destroy the data(in idEvent)
 * in this WndProc, which is invoked when the apps message loop calls DispatchMessage.
 * This technique is discussed in Matt Pietrek's "Under the Hood".
 * An article describing the same may be found in MSDN by searching for WM_TIMER.
 * Note that this mechanism will probably stop working when WINE supports
 * address space separation. When "queue events" are implemented in Wine we
 * should switch to using that mechanism, since it is more robust and does not
 * require a procedure address to be passed. See the SetWinEventHook API for
 * more info on this.                           

When tracing FFA16, it's quite obvious that an incorrect callback is passed
to 16 bits code a few lines after the second selection in the edit control :

Call USER.114: DISPATCHMESSAGE(05d7:b770) ret=0367:0f08 ds=05d7
CallTo16(func=4018:2480,ds=05d7,0x1cf0,0x0113,0x85fe,0x0000,0x43c4) ss:sp=05d7:b720
     AX=05d6 BX=0000 CX=0000 DX=0000 SI=0000 DI=0000 BP=b74a ES=05d7 FS=0000

[this 4018:2480 value is strange :-(. All the other 16 bits callbacks have 09xx or 0axx as the
segment value. This is in fact a 32 bits callback.
I had seen by adding a special trace that this message is in fact a WM_TIMER.]

trace:seh:EXC_RtlRaiseException code=c0000096 flags=0

bang.
invalid instruction.There is no valid code at this address, obviously.

After that, nothing happens anymore, only the X events are occuring without Wine
caring that much.

trace:event:EVENT_ProcessAllEvents called (thread 8091f88).
trace:event:EVENT_ProcessEvent called.
trace:event:EVENT_ProcessEvent Got event MotionNotify for hwnd 04ec
trace:event:MOUSE_SendEvent (8001,275,191)
trace:event:EVENT_ProcessEvent returns.
trace:event:EVENT_ProcessAllEvents called (thread 8091f88).
trace:event:EVENT_ProcessEvent called.
trace:event:EVENT_ProcessEvent Got event MotionNotify for hwnd 04ec
trace:event:MOUSE_SendEvent (8001,276,191)
etc...

It's probably possible to find a work around for this, but as
the adress-space separation is upon us, I'm not sure it's worth the
bother...

BTW I have no such problem with FFA 32 bits (of course)

Gerard

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic