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

List:       wine-devel
Subject:    Re: Crash in GetProcessDWord
From:       Ulrich Weigand <weigand () informatik ! uni-erlangen ! de>
Date:       1999-05-31 12:25:51
[Download RAW message or body]


Ian Schmidt <irsman@iag.net> wrote:

> Somewhere between last Sunday (5/24) and Friday (5/29) something changed that
> causes this crash in GetProcessDword when running with native USER.   This look
> familiar to anyone?
> 
> Call KERNEL.485: GETPROCESSDWORD(0x083fa340,0xfff4) ret=0277:33fe ds=0307
> trace:win32:GetProcessDword (138388288, -12)

That's GPD_STARTF_FLAGS ...  This would have been broken by Alexandre's
recent startup changes, because now at the point the USIG_PROCESS_CREATE
user signal is sent, the process startup info is not yet initialized.

Actually, I think I warned that this would happen, but Alexandre didn't
seem to care much about GetProcessDword  ;-) 

Anyway, I can see only two ways to fix that:  either, we move initialization
of the startup info back to PROCESS_Create (by holding the startup info
on the system heap).  Alexandre won't like this, I guess.

The other option would be to try to delay sending the USIG_PROCESS_CREATE
signal until the child process has set up its startup info. This is wrong,
strictly speaking, because in real Win95 the USIG_PROCESS_CREATE is sent
from within the parent process' context.  But AFAIK the Win95 signal proc
does not care (and this is the only signal proc we need to care about),
hence maybe you could try this one:

--- wine-cvs/scheduler/process.c.orig   Mon May 31 14:14:18 1999
+++ wine-cvs/scheduler/process.c        Mon May 31 14:15:37 1999
@@ -481,6 +481,9 @@
     /* Create the environment db */
     if (!PROCESS_CreateEnvDB()) goto error;
 
+    /* Call delayed until here because startup info must already be set up ... */
+    PROCESS_CallUserSignalProc( USIG_PROCESS_CREATE, 0 );
+
     PROCESS_CallUserSignalProc( USIG_THREAD_INIT, 0 );  /* for initial thread */
 
     /* Create a task for this process */
@@ -618,10 +621,6 @@
         load_done_evt = CreateEventA( NULL, TRUE, FALSE, NULL );
         DuplicateHandle( GetCurrentProcess(), load_done_evt,
                          info->hProcess, &pdb->load_done_evt, 0, TRUE, DUPLICATE_SAME_ACCESS );
-
-        /* Call USER signal proc */
-        PROCESS_CallUserSignalProcHelper( USIG_PROCESS_CREATE, info->dwProcessId, 0,
-                                          pdb->flags, startup->dwFlags );
 
         /* Set the process module (FIXME: hack) */
         pdb->module = pModule->self;


Bye,
Ulrich


=========================================================================

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

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