[Bug 19400] Quicken Will Maker 2007 crashes wine
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Nov 9 22:28:40 CST 2009
--- Comment #11 from Nate Eldredge <nate at thatsmathematics.com> 2009-11-09 22:28:39 ---
After some single stepping I found the problem. PSDRV_ExtDeviceMode is defined
as CDECL but the application expects ExtDeviceMode to be STDCALL and pop its
own arguments off the stack. The result, obviously, is that the stack pointer
isn't where the application expects. What happens is not a crash exactly. The
application has some sort of stack sentinel feature which I think is supposed
to catch buffer overruns. But the sentinel is addressed relative to esp, so
this check fails and it attempts to invoke the debugger.
I wasn't sure of exactly the right way to make the change, but I changed the
definition of PSDRV_ExtDeviceMode to
INT WINAPI PSDRV_ExtDeviceMode
and I changed the corresponding line in wineps.drv.spec to
@ stdcall ExtDeviceMode(ptr long ptr ptr ptr ptr ptr long) PSDRV_ExtDeviceMode
The previous change to PSDRV_FindPrinterInfo that causes ExtDeviceMode to do
something sensible when lspzDevice is NULL is also needed and still in effect.
After these changes, qwp runs without crashing, and printing works! So maybe
someone who knows better than me can implement these changes in a good way and
Another mystery regarding ExtDeviceMode: it is currently defined as
INT WINAPI PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA
LPSTR lpszDevice, LPSTR lpszPort, LPDEVMODEA
LPSTR lpszProfile, DWORD dwMode)
Some MSDN links I found on Google suggest that the first two arguments should
be reversed (google "extdevicemode"). However, qwp calls ExtDeviceMode with a
first argument of 0 and a second argument of 0x7db40000, which seems more
likely to be a hwnd than a string (it doesn't point to a meaningful looking
string either). I wonder if there is some more authoritative documentation
available, which might also confirm which calling convention is to be used.
Perhaps if so, the other functions in wineps should be checked as well.
It might also be good if there is documentation that can be checked about the
correct interface for
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs