Hi, running the latest CVS version doesn't bring ZooTycoon too life. I'm debugging and debugging but seem to get lost. During my tracing I see: trace:msg:PostMessageW hwnd 0x20021 msg 800c (WM_USER+7c0c) wp 0 lp 0 trace:msg:put_message_in_queue dest_tid 9 000c: send_message( id=0009, type=6, flags=0, win=0x20021, msg=0000800c, wparam=00000000, lparam=00000000, x=0, y=0, time=00007dc4, info=00000000, timeout=-1, callback=(nil), data={} ) 000c: send_message() = 0 so a Message is send and it looks OK. But any subsequent: trace:msg:MSG_peek_message msg 0x41a5ded8 hwnd (nil) first 00000000 last 00000000 flags 1 gives: 000d: get_message( flags=1, get_win=(nil), get_first=00000000, get_last=ffffffff ) 000d: get_message() = PENDING { type=0, win=(nil), msg=00000000, wparam=00000000, lparam=00000000, x=0, y=0, time=00000000, info=00000000, total=0, data={} } so the message is not retrieved. Which is strange cause first=0 and last=ffffff would mean every message ? Any suggestion how to tackle this. I'm convinced (don't ask me why) that the installer fails because of the messaging. I used strace on a Windows2000Prof box and it reveals that a lot of GetMessage calls are done, while we are doing PeekMessage (there is a subtle difference). The point at which the installer fails is the point where a new background should be drawn (visual conclusion on W2KP). Again, this is the ZooTycoon demo, downloadable from M$. Cheers, Paul Vriens.
On Tue, 23 Mar 2004 17:58:18 +0100 (CET), you wrote:> Hi, > > running the latest CVS version doesn't bring ZooTycoon too life. I'm > debugging and debugging but seem to get lost. During my tracing I see: > > trace:msg:PostMessageW hwnd 0x20021 msg 800c (WM_USER+7c0c) wp 0 lp 0 > trace:msg:put_message_in_queue dest_tid 9 > 000c: send_message( id=0009, type=6, flags=0, win=0x20021, msg=0000800c, > wparam=00000000, lparam=00000000, x=0, y=0, time=00007dc4, info=00000000, > timeout=-1, callback=(nil), data={} ) > 000c: send_message() = 0 > > so a Message is send and it looks OK. But any subsequent: > > trace:msg:MSG_peek_message msg 0x41a5ded8 hwnd (nil) first 00000000 last > 00000000 flags 1 > > gives: > > 000d: get_message( flags=1, get_win=(nil), get_first=00000000, > get_last=ffffffff ) > 000d: get_message() = PENDING { type=0, win=(nil), msg=00000000, > wparam=00000000, lparam=00000000, x=0, y=0, time=00000000, info=00000000, > total=0, data={} } > > so the message is not retrieved. Which is strange cause first=0 and > last=ffffff would mean every message ? > > Any suggestion how to tackle this. I'm convinced (don't ask me why) that > the installer fails because of the messaging.Pay attention to the threads, each has its own message queue. It looks that your 'missing' message is sent to the thread with thread ID (tid) 9. The get_message is done by thread with tid 0xd. Look in the relay trace what thread 9 is doing. Rein. -- Rein Klazes rklazes@xs4all.nl
Hi, I have a BIG question now (with some accompanying text): ZooTycoon creates a lot of windows that are all owned by the main thread (0x0009 in my case). Several messages are posted to several windows in several threads. Because the messages are send to a hwnd and all windows are owned by 0x0009, all messages end up in the message queue of the main thread. If a GetMessage or PeekMessage is done with a specific hwnd everything is fine. When however a GetMessage or PeekMessage is done with a hwnd=0 (NULL) it all depends in which thread the Get or PeekMessage is done, if one (or more) message is retrieved. In my case all Get or PeekMessages done in all other threads but the main one (0x0009) end up with nothing. It appears that on Windows the behaviour is different, in the ZooTycoon case, all GetMessages are done from the main thread. Maybe there is some logic that check which thread own windows ? Can somebody confirm my findings for the WINE part ? And of course can somebody confirm my findings for the WINDOWS part ? It looks like I found the cause of my problem, now the fix ! cheers, Paul.
On Fri, 26 Mar 2004 11:08:46 +0100 (CET), you wrote:> Hi, > > I have a BIG question now (with some accompanying text): > > ZooTycoon creates a lot of windows that are all owned by the main thread > (0x0009 in my case). > > Several messages are posted to several windows in several threads. Because > the messages are send to a hwnd and all windows are owned by 0x0009, all > messages end up in the message queue of the main thread. > > If a GetMessage or PeekMessage is done with a specific hwnd everything is > fine. > > When however a GetMessage or PeekMessage is done with a hwnd=0 (NULL) it > all depends in which thread the Get or PeekMessage is done, if one (or > more) message is retrieved. In my case all Get or PeekMessages done in all > other threads but the main one (0x0009) end up with nothing. > > It appears that on Windows the behaviour is different, in the ZooTycoon > case, all GetMessages are done from the main thread. Maybe there is some > logic that check which thread own windows ? > > Can somebody confirm my findings for the WINE part ? And of course can > somebody confirm my findings for the WINDOWS part ? > > It looks like I found the cause of my problem, now the fix !I think you should ask these questions on the developers list. Rein. -- Rein Klazes rklazes@xs4all.nl