making FreeReport work...

Grzegorz Prokopski greg at sente.pl
Fri Aug 9 09:29:48 CDT 2002


Hello!

Since 2 days I am trying to get FreeReport working.
(http://freereprot.sf.net/). It is important part of an app I am
trying to use with wine. Or rather the part that causes the problem :-/

For tests - I created 10-liner app (with Borland C++ Builder) that only
uses FR and calls one function from it. It crashes exactly the same way
as the big app. I attached the output (it looks terribly in email
clients, as the lines are much longer than 80 chars).

However the line that starts all the problem is DLL/BPL initialization:
9 0x40d8656e (FREEREPORT.BPL. at Fr_prntr@initialization$qqrv+0x2e
it than calls 
8 0x406051b8 (VCL50.BPL. at Printers@TPrinter at GetPrinterIndex$qqrv+0x10
and so on... then I am getting:
0x41534d1a (PSDRV_UpdateDevCaps+0x3f2 [init.c:221] in wineps.dll.so):
             fldcw     0xfffffff8(%ebp)
221  physDev->horzSize = (physDev->horzRes * 25.4) /
         physDev->logPixelsX;

physDev->logPixelsX is equal 0

(I tried to detect it is 0, and avoid error here, but if I do - then
some related error was occuring elsewhere, so I belive that one should
be fixed first)

I have sources to freereport and to vcl, but I was unable to force
builder to create BPLs with debug info that could be used with wine.
It only creates the info as separate file freereport.tds.
I tried year old FR and 3-week, fresh one - with the same result.
So I think that is wine's bug.

Questions:
1. Do you know of any way that would let me use builder's debug info?
2. Is anyone else digging ito this? Has anyone been trying to get
freereport working with wine? (so that I didn't reinvent the wheel)
3. Can you give me some advices where to start? I know assembler,
I can use dbg. Got the tools - what am I looking for? (I know winapi
as I used it some time ago, but not VCL)

I suspect there's some problem enumerating available printer devices
(I disabled printing in wine config, but I was told that cups is being
automatically detected anyway - I removed everything from /etc/printcap
- nothing changes).
FR/VCL tries to get data of a printer device that doesn't exist. For ex.
 in GDI_CallExtDeviceMode16 lpszDevice parameter
string is empty - "".

Any hints are welcomed

					Grzegorz B. Prokopski

-------------- next part --------------
Unhandled exception: c0000090 in 32-bit code (0x41534d1a).
In 32-bit mode.
0x41534d1a (PSDRV_UpdateDevCaps+0x3f2 [init.c:221] in wineps.dll.so): fldcw     0xfffffff8(%ebp)
221             physDev->horzSize = (physDev->horzRes * 25.4) / physDev->logPixelsX;
Wine-dbg>bt
Backtrace:
=>0 0x41534d1a (PSDRV_UpdateDevCaps+0x3f2(physDev=0x415ce0b0) [init.c:221] in wineps.dll.so) (ebp=405b6944)
  1 0x41534f3b (PSDRV_CreateDC+0x1a3(dc=0x403dcef0, pdev=0x403dcf04, driver=0x405b699c, device=0x416a5d70, output=0x40c82dd2, initData=0x0) [init.c:301] in wineps.dll.so) (ebp=405b6968)
	2 0x4097e6c9 (CreateDCA+0x14d(driver=0x405b6b10, device=0x416a5d70, output=0x40c82dd2, initData=0x0, s=0x40c82dd2, s=0x416a5d70, s=0x405b6b10) [dc.c:613] in libgdi32.dll.so) (ebp=405b6ac8)
	3 0x4097e939 (CreateICA+0x21(driver=0x405b6b10, device=0x416a5d70, output=0x40c82dd2, initData=0x0) [dc.c:671] in libgdi32.d
  4 0x4099395e (GDI_CallExtDeviceMode16+0x8e(hwnd=0x0, lpdmOutput=0x405b6cc0, lpszDevice=0x416a5d70, lpszPort=0x40c82dd2, lpdmInput=0x405b6cc0, lpszProfile=0x0, fwMode=0x0) [driver.c:415] in libgdi32.dll.so) (ebp=405b6c3c)
	5 0x40c7c7f2 (DocumentPropertiesA+0x14a(hWnd=0x0, hPrinter=0x11, pDeviceName=0x416a5d70, pDevModeOutput=0x405b6cc0, pDevModeInput=0x405b6cc0, fMode=0x0) [info.c:667] in winspool.drv.so) (ebp=405b6c70)
	6 0x40604e00 (VCL50.BPL. at Printers@TPrinter at SetPrinter$qqrpct1t1ui+0x1bc in C:\WINDOWS\SYSTEM\VCL50.BPL) (ebp=405b6d6c)
	7 0x406055f1 (VCL50.BPL. at Printers@TPrinter at SetToDefaultPrinter$qqrv+0x159 in C:\WINDOWS\SYSTEM\VCL50.BPL) (ebp=405b6e14)
	8 0x406051b8 (VCL50.BPL. at Printers@TPrinter at GetPrinterIndex$qqrv+0x10 in C:\WINDOWS\SYSTEM\VCL50.BPL) (ebp=405b6e3c)         
  9 0x40d8656e (FREEREPORT.BPL. at Fr_prntr@initialization$qqrv+0x2e in C:\PROGRAM FILES\SENTE ESYSTEM\FREEREPORT.BPL) (ebp=405b6e44)
	10 0x3257d9b5 (CC3250MT.DLL.__cwait+0x3e9 in C:\WINDOWS\SYSTEM\CC3250MT.DLL) (ebp=405b6e6c)
	11 0x3257db8b (CC3250MT.DLL.__startup+0xeb in C:\WINDOWS\SYSTEM\CC3250MT.DLL) (ebp=405b6e94)

Wine-dbg>print (char*)0x416A5D70
""




More information about the wine-devel mailing list