[Bug 16998] WISO Sparbuch crashes at startup

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Apr 12 16:16:25 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=16998


Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net




--- Comment #6 from Anastasius Focht <focht at gmx.net>  2009-04-12 16:16:25 ---
Hello,

fortunately the 2009 trial version exhibits same behaviour ;-)

1)

First stopper is a message box with "OLE error 0x80004001" when it comes to
entering the trial code "SP2009"
Console reveals:

--- snip ---
err:ole:CoGetClassObject class {88d969c0-f192-11d4-a65f-0040963251e5} not
registered
err:ole:create_server class {88d969c0-f192-11d4-a65f-0040963251e5} not
registered
err:ole:CoGetClassObject no class object {88d969c0-f192-11d4-a65f-0040963251e5}
could be created for context 0x5
fixme:msxml:domdoc_createNode nodes with namespaces currently not supported.
fixme:msxml:domelem_setAttributeNode 
--- snip ---

-> CLSID_DOMDocument40

'winetricks -q msxml4' works around the problem.

2)

The installer complains about missing "Windows Media Player 9" but this can be
skipped (installer says it's optional).

3)

Installer tells about additional required prerequisites:

- .NET 2.0 Framework
- MSXML3 SP7

Install the .NET 2.0 Framework using winetricks - don't let the app installer
do this (see my note in appdb entry for rationale)!

'winetricks -q dotnet20'

Let the installer execute the MSXML3 SP7 update.
Wine will prefer builtin anyway, hence this update is harmless.

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

Now back to the real one ... relevant snippet:

--- snip ---
...
0009:Call KERNEL32.WinExec(00571588 "wmain09.dll /BYEXE:WISO2009.EXE /CODE:S
/SPECIALVERSION:ON4U_PAY",0000000a) ret=0040154a 
...
001e:Starting process L"C:\\Program Files\\WISO\\Sparbuch 2009\\wmain09.dll"
(entryproc=0x49a3e8) 
...
001e:CALL winc09.2793(<unknown, check return>) ret=0040348a
001e:CALL rswinapi4.964(157779f8) ret=1556a538
001e:Call KERNEL32.GetModuleHandleA(157779f8 "kernel32.dll") ret=01390019
001e:Ret  KERNEL32.GetModuleHandleA() retval=7b820000 ret=01390019
001e:RET  rswinapi4.964() retval=7b820000 ret=1556a538
001e:CALL rswinapi4.944(<unknown, check return>) ret=1556a53f
001e:Call KERNEL32.GetProcAddress(7b820000,15777a08 "IsDebuggerPresent")
ret=01390019
001e:Ret  KERNEL32.GetProcAddress() retval=7b829c64 ret=01390019
001e:RET  rswinapi4.944(7b820000,15777a08) retval=7b829c64 ret=1556a53f
001e:Call KERNEL32.IsDebuggerPresent() ret=1556a54b
001e:Ret  KERNEL32.IsDebuggerPresent() retval=00000000 ret=1556a54b
001e:CALL MSVCR80.??2 at YAPAXI@Z() ret=1556a55a
001e:Call ntdll.RtlAllocateHeap(01280000,00000000,00000001) ret=78134d83
001e:Ret  ntdll.RtlAllocateHeap() retval=012b2e40 ret=78134d83
001e:RET  MSVCR80.??2 at YAPAXI@Z() retval=012b2e40 ret=1556a55a
001e:CALL rsdebug4.412(<unknown, check return>) ret=1556a56c
001e:Call KERNEL32.SetUnhandledExceptionFilter(13307974) ret=133079af
001e:Ret  KERNEL32.SetUnhandledExceptionFilter() retval=0049a647 ret=133079af
001e:Call KERNEL32.GetModuleHandleA(1330cc08 "kernel32") ret=133079c9
001e:Ret  KERNEL32.GetModuleHandleA() retval=7b820000 ret=133079c9
001e:Call KERNEL32.GetProcAddress(7b820000,1330cd28
"SetUnhandledExceptionFilter") ret=13302a5a
001e:Ret  KERNEL32.GetProcAddress() retval=7b82b11c ret=13302a5a
001e:CALL QtCore4.?createData at QMapData@@SAPAU1 at XZ() ret=1330233f
001e:CALL MSVCR80.??2 at YAPAXI@Z() ret=67043667
001e:Call ntdll.RtlAllocateHeap(01280000,00000000,00000048) ret=78134d83
001e:Ret  ntdll.RtlAllocateHeap() retval=012b2e58 ret=78134d83
001e:RET  MSVCR80.??2 at YAPAXI@Z() retval=012b2e58 ret=67043667
001e:RET  QtCore4.?createData at QMapData@@SAPAU1 at XZ() retval=012b2e58
ret=1330233f
001e:CALL MSVCR80.malloc(0000000c) ret=13302a99
001e:Call ntdll.RtlAllocateHeap(01280000,00000000,0000000c) ret=78134d83
001e:Ret  ntdll.RtlAllocateHeap() retval=012b2ea8 ret=78134d83
001e:RET  MSVCR80.malloc() retval=012b2ea8 ret=13302a99
001e:CALL MSVCR80.memset(012b2ea8,00000000,0000000c) ret=13302aa8
001e:RET  MSVCR80.memset() retval=012b2ea8 ret=13302aa8
001e:CALL MSVCR80.memcpy(012b2ea8,7b82b11c,00000006) ret=13302ab9
001e:RET  MSVCR80.memcpy() retval=012b2ea8 ret=13302ab9
001e:CALL MSVCR80.memset(0033eddc,00000000,00000006) ret=13302ac6
001e:RET  MSVCR80.memset() retval=0033eddc ret=13302ac6
001e:Call KERNEL32.VirtualQuery(7b82b11c,0033ed90,0000001c) ret=133018ec
001e:Ret  KERNEL32.VirtualQuery() retval=0000001c ret=133018ec
001e:CALL MSVCR80.memcpy(7b82b11c,0033eddc,00000006) ret=133018fe
001e:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7814517c
ip=0x7814517c tid=001e
001e:trace:seh:raise_exception  info[0]=00000001
001e:trace:seh:raise_exception  info[1]=7b82b11c
001e:trace:seh:raise_exception  eax=c7f9e967 ebx=97adc7f9 ecx=00000001
edx=00000002 esi=0033eddc edi=7b82b11c
001e:trace:seh:raise_exception  ebp=0033ed78 esp=0033ed70 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00210297 
...
001e:Call KERNEL32.lstrcatA(13312e90 "C:\\Program Files\\WISO\\Sparbuch
2009\\wmain09.dll (16.04.6273) \n \nException code: C0000005 \nFault address: 
7814517C \n \nRegisters: \nEAX:C7F9E967 \nEBX:97ADC7F9 \nECX:00000001
\nEDX:00000002 \nESI:0033EDDC \nEDI:7B82B11C \nCS:EIP:0023:7814517C
\nSS:ESP:002B:0033ED70  EBP:0033ED78 \n \nSegments"...,1330cc24 " \n")
ret=13308ee6
...
--- snip ---

The way the app tries to hook the API entry won't work with Wine as of now.
Basically it sets up a trampoline at the API entry of
SetUnhandledExceptionFilter().

Protection, default for builtins: (unix) VPROT_SYSTEM | VPROT_IMAGE |
VPROT_COMMITTED | VPROT_WRITECOPY | VPROT_EXEC | VPROT_READ

--- snip ---
001e:trace:module:load_builtin_dll Trying built-in L"kernel32.dll"
001e:trace:virtual:VIRTUAL_DumpView View: 0x7b820000 - 0x7b949fff (system)
001e:trace:virtual:VIRTUAL_DumpView       0x7b820000 - 0x7b949fff c-rWx
001e:trace:virtual:virtual_create_system_view created 0x7b820000-0x7b94a000
--- snip ---

Unfortunately Wine lies about page protection by design (it will later adjust
the permissions under certain conditions) and returns PAGE_EXECUTE_WRITECOPY
for API entry regions.

Because of that the app code straight tries to rewrite the API entry opcodes
and causes exception which is unexpected hence the error.

The app has a hard coded page protection bits check: PAGE_EXECUTE_READ |
PAGE_READONLY - if one of these is set, it will adjust the page protection
(VirtualProtect) to enable write.

I went the quick route and forced the app to explicitly make protection change
request (enable write) and it fixed the problem.
This lets the app successfully start - only to run into bug 12405

Regards


-- 
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 mailing list