Ladislav Sladecek lsla at post.cz
Sun Aug 5 19:12:53 CDT 2001

On Pá, 03 srp 2001, Andreas Mohr wrote:

> It's a totally dainbread application, that's why.
I agree (no news for me:-) ) but this does not explain why the application
worked fine on 2001/07/26. I looked into the change log and found

	* dlls/wineps/init.c, dlls/wineps/wineps.spec,
	  dlls/x11drv/x11drv.spec, graphics/Makefile.in, graphics/driver.c,
	  graphics/win16drv/init.c, graphics/x11drv/bitmap.c,
	  graphics/x11drv/init.c, graphics/x11drv/oembitmap.c, include/gdi.h,
	  include/x11drv.h, objects/dc.c, dlls/gdi/Makefile.in,
	  dlls/gdi/driver.c, dlls/gdi/gdi_main.c, dlls/ttydrv/bitmap.c,
	  dlls/ttydrv/dc.c, dlls/ttydrv/ttydrv.spec:
	Build the DC function table by using GetProcAddress on the graphics
	driver module. Moved driver support to dlls/gdi.

I think that the problems were started by this patch. (I do
not say that the patch is wrong, maybe the patch only found some stupid bug in
the app).  Thus I did 

cvs -diff -D 20010727 -D 20010728

I do not pretend that I do understand the code but some coincidences
exist. For example the crash is near the code which get changed, drivers
and DCs are involved etc. Please look at this:

Index: dlls/gdi/gdi_main.c
RCS file: /home/wine/wine/dlls/gdi/gdi_main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dlls/gdi/gdi_main.c	2001/03/05 19:30:18	1.10
+++ dlls/gdi/gdi_main.c	2001/07/27 19:37:31	1.11
@@ -17,14 +17,7 @@
     if (reason != DLL_PROCESS_ATTACH) return TRUE;
-    /* GDI initialisation */
-    if(!GDI_Init()) return FALSE;
-    /* Create the Win16 printer driver */
-    if (!WIN16DRV_Init()) return FALSE;
-    return TRUE;
+    return GDI_Init();

And this:
Index: graphics/win16drv/init.c
RCS file: /home/wine/wine/graphics/win16drv/init.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- graphics/win16drv/init.c	2001/07/22 23:13:09	1.34
+++ graphics/win16drv/init.c	2001/07/27 19:37:32	1.35
@@ -144,17 +144,16 @@
+/* FIXME: this no longer works */
+#if 0
  *	     WIN16DRV_Init
 BOOL WIN16DRV_Init(void)
     return DRIVER_RegisterDriver( NULL /* generic driver */, &WIN16DRV_Funcs );

Maybe  the printer driver never gets initialised? (Just a stupid speculation).

> What happens if you run this program on a windoze box without any printer
> installed ? (and thus the device= line should not exist, there, too...) 
> Does it fail the same way or does it seem to recognize somehow that there
> is no printer installed ?
I tried just now and the application worked fine, no problems. It did not tell
anything about missing printer; which is OK as I did not start to print.

I have installed the application several houndred times previously, sometimes
to boxes with no printers and never noticed similar problems on windoze.

Thank you for your advice. 

Ladislav Sladecek

More information about the wine-devel mailing list