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

List:       wine-devel
Subject:    Illegal Queue in QUEUE_RemoveMsg
From:       Uwe Bonnes <bon () elektron ! ikp ! physik ! tu-darmstadt ! de>
Date:       2000-04-25 21:56:07
[Download RAW message or body]

Hallo,

some installation programm (fpd21.exe) crashes when shutting down
like:
Backtrace:
=>0 0x40182b30 (NTDLL.DLL.RtlEnterCriticalSection+0x20) (ebp=40b46580)
  1 0x401bf2c7 (QUEUE_FindMsg+0x27(msgQueue=0x0, hwnd=0x1f0, first=0x0, last=0x0) \
[queue.c:1059]) (ebp=40b4659c)  2 0x401c69db \
(WIN_DestroyWindow+0x14b(wndPtr=0x4043e3bc) [win.c:507]) (ebp=40b465d0)  3 0x401c68f6 \
(WIN_DestroyWindow+0x66(wndPtr=0x4043e444) [win.c:455]) (ebp=40b465f8)  4 0x401c8338 \
(DestroyWindow+0x248(hwnd=0x278) [win.c:1430]) (ebp=40b46614)  5 0x41711729 \
(GLK1023.TMP.Update+0x709) (ebp=40c80000)

As msgQueue is NULL in QUEUE_FindMsg, dereferencing msgQueue to enter
the critical section fails.

By not entering the while loop, I can make the program exit
normally. It that the right cure?

Bye

Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Free Software: If you contribute nothing, expect nothing
--
Index: wine/windows/win.c
===================================================================
RCS file: /home/wine/wine/windows/win.c,v
retrieving revision 1.86
diff -u -w -5 -r1.86 win.c
--- wine/windows/win.c	2000/03/28 20:23:09	1.86
+++ wine/windows/win.c	2000/04/25 21:51:31
@@ -487,11 +494,11 @@
 	BOOL	      bPostQuit = FALSE;
 	WPARAM      wQuitParam = 0;
         MESSAGEQUEUE* msgQ = (MESSAGEQUEUE*) QUEUE_Lock(wndPtr->hmemTaskQ);
         QMSG *qmsg;
 
-	while( (qmsg = QUEUE_FindMsg(msgQ, hwnd, 0, 0)) != 0 )
+	while( (msgQ) && ((qmsg = QUEUE_FindMsg(msgQ, hwnd, 0, 0)) != 0) )
 	{
 	    if( qmsg->msg.message == WM_QUIT )
 	    {
 		bPostQuit = TRUE;
 		wQuitParam = qmsg->msg.wParam;


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

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