http://bugs.winehq.org/show_bug.cgi?id=21828
Summary: Unable to launch Mercenaries 2 Product: Wine Version: 1.1.39 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: taurolyon@gmail.com
Created an attachment (id=26425) --> (http://bugs.winehq.org/attachment.cgi?id=26425) Terminal log of wine attempting to launch Mercenaries2.exe
Terminal log attached. Game installs fine (minor, unrelated cosmetic issue shows installer at 100% for a long period while still copying files), but game will not launch.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #1 from Jay taurolyon@gmail.com 2010-02-23 02:45:00 --- Will attach more information upon request. Please also provide instruction on where to locate or how to provide requested information.
http://bugs.winehq.org/show_bug.cgi?id=21828
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
--- Comment #2 from Jeff Zaroyko jeffz@jeffz.name 2010-02-23 05:14:29 --- not major, http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
wine: Unhandled page fault on write access to 0x033bc000 at address 0xf74ddd56 (thread 0009), starting debugger...
it's missing the backtrace that normally follows.
see if you can get one out by following the steps here http://wiki.winehq.org/Backtraces attach as a text file.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #3 from Jay taurolyon@gmail.com 2010-02-23 09:45:48 --- I tried the methods provided to get a backtrace, however the application terminates before it retrieves any information.
The "$ wine windbg app.exe" method gives an application error (details in attachment), whereas the others terminate as before. I did however do a "bt all" after starting the command, but before using the "cont" command. This did return some BT data.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #4 from Jay taurolyon@gmail.com 2010-02-23 09:47:16 --- Created an attachment (id=26431) --> (http://bugs.winehq.org/attachment.cgi?id=26431) Attempted backtrace
This BT was performed at launch of the application, see attachment for details.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #5 from Jay taurolyon@gmail.com 2010-02-23 10:20:26 --- Determined the dialog that occurs from doing the "wine winedbg APP.EXE" method is caused by SecuROM software - http://www.securom.com/support_enduser.asp?t=2&ts1=4
http://bugs.winehq.org/show_bug.cgi?id=21828
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #6 from Anastasius Focht focht@gmx.net 2010-02-23 13:09:32 --- Hello,
starting SecuROM protected game with winedbg is not recommended unless you know what you are doing.
Make sure you installed the game in a clean WINEPREFIX (= no other software installed). If not - reinstall in fresh one.
Please provide +relay log until the error dialog appears:
WINEDEBUG=+tid,+seh,+relay wine Mercenaries2.exe &> log.txt
If log.txt is too large, compress it: bzip2 -9 log.txt and attach to bug.
Additionally provide exact SecuROM version information using "Protection ID" tool (http://pid.gamecopyworld.com/ProtectionID_v6.3.5.rar). Select the Mercenaries2.exe for Protection ID scan and copy log info.
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation
http://bugs.winehq.org/show_bug.cgi?id=21828
Jay taurolyon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|obfuscation |
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #7 from Jay taurolyon@gmail.com 2010-02-24 04:19:38 --- Created an attachment (id=26446) --> (http://bugs.winehq.org/attachment.cgi?id=26446) BZIPed Log.txt (WINEDEBUG +RELAY)
Resulting TXT file attached and compressed (108MB decompressed) from running: WINEDEBUG=+tid,+seh,+relay wine Mercenaries2.exe &> log.txt
The SecuROM error did not appear using this method, the program just failed to launch and returned to the terminal prompt.
ProtectionID Log file in next post...
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #8 from Jay taurolyon@gmail.com 2010-02-24 04:25:25 --- Created an attachment (id=26447) --> (http://bugs.winehq.org/attachment.cgi?id=26447) ProtectionID tool Log of Mercenaries2.exe
Appears to be using version 07.37.0014 of SecuROM per the log file.
I scanned both the Mercenaries2.exe in the install folder and on the retail DVD-ROM.
I don't remember the disc being required to run the game, so I'm actually surprised that I'm getting SecuROM errors.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #9 from Jay taurolyon@gmail.com 2010-02-24 04:26:27 --- If you require any additional information, please let me know!
Thanks so much for your help so far!
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2010-02-24 08:45:38 --- The content of attachment 26446 has been deleted by Alexandre Julliard julliard@winehq.org who provided the following reason:
Contains private information
The token used to delete this attachment was generated at 2010-02-24 08:45:08.
http://bugs.winehq.org/show_bug.cgi?id=21828
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #11 from Vitaliy Margolen vitaliy@kievinfo.com 2010-02-24 08:47:18 --- Duplicate
*** This bug has been marked as a duplicate of bug 7065 ***
http://bugs.winehq.org/show_bug.cgi?id=21828
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Vitaliy Margolen vitaliy@kievinfo.com 2010-02-24 08:47:32 --- Closing
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #13 from Anastasius Focht focht@gmx.net 2010-02-24 10:04:26 --- Hello,
please don't close this bug, this *not* a SecuROM issue (bug 7065 is too generic anyway)! I just had to make sure the attachment is removed before posting further information.
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|DUPLICATE |
--- Comment #14 from Nikolay Sivov bunglehead@gmail.com 2010-02-24 10:13:37 --- (In reply to comment #13)
Hello,
please don't close this bug, this *not* a SecuROM issue (bug 7065 is too generic anyway)! I just had to make sure the attachment is removed before posting further information.
Regards
Reopened.
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #15 from Anastasius Focht focht@gmx.net 2010-02-24 14:37:39 --- Hello,
looks like a problem with winhttp:
--- snip --- ... 0009:Call winhttp.WinHttpReceiveResponse(00000003,00000000) ret=1000882d ... 0009:Ret winhttp.WinHttpReceiveResponse() retval=00000001 ret=1000882d ... 0009:Call winhttp.WinHttpQueryDataAvailable(00000003,02a0fbbc) ret=10008856 0009:Call ntdll.RtlAllocateHeap(00110000,00000000,000000bd) ret=7d02a8f9 0009:Ret ntdll.RtlAllocateHeap() retval=001da7c0 ret=7d02a8f9 0009:Ret winhttp.WinHttpQueryDataAvailable() retval=00000001 ret=10008856 0009:Call winhttp.WinHttpReadData(00000003,02a0fcb8,000000bc,02a0fbc0) ret=10008919 0009:Call ntdll.RtlFreeHeap(00110000,00000000,001da7c0) ret=7d02a8c0 0009:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7d02a8c0 0009:Ret winhttp.WinHttpReadData() retval=00000001 ret=10008919 0009:Call winhttp.WinHttpQueryDataAvailable(00000003,02a0fbbc) ret=10008856 0009:Ret winhttp.WinHttpQueryDataAvailable() retval=00000001 ret=10008856 0009:Call winhttp.WinHttpReadData(00000003,02a0fd74,00000000,02a0fbc0) ret=10008919 0009:Ret winhttp.WinHttpReadData() retval=00000001 ret=10008919 ... 0009:Call winhttp.WinHttpQueryDataAvailable(00000003,02a0fbbc) ret=10008856 0009:Call ntdll.RtlAllocateHeap(00110000,00000000,00001001) ret=7d02a8f9 0009:Ret ntdll.RtlAllocateHeap() retval=033bc5f0 ret=7d02a8f9 ... 0009:trace:seh:raise_exception code=c0000005 flags=0 addr=0xf7576d56 ip=f7576d56 tid=0009 0009:trace:seh:raise_exception info[0]=00000001 0009:trace:seh:raise_exception info[1]=033cc000 0009:trace:seh:raise_exception eax=00000003 ebx=7d038ff4 ecx=3fffc17b edx=001d1a64 esi=02a1e49c edi=033cc000 0009:trace:seh:raise_exception ebp=02a0ea48 esp=02a0e9f8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210206 0009:trace:seh:call_vectored_handlers calling handler at 0x7e0360e0 code=c0000005 flags=0 0009:trace:seh:call_vectored_handlers handler at 0x7e0360e0 returned 0 0009:trace:seh:call_stack_handlers calling handler at 0x1002610a code=c0000005 flags=0 ... 0009:Call KERNEL32.GetLastError() ret=01c8b5db 0009:Ret KERNEL32.GetLastError() retval=00002f76 ret=01c8b5db ... 0009:Call KERNEL32.UnhandledExceptionFilter(02a0e55c) ret=01c8cc28 wine: Unhandled page fault on write access to 0x033cc000 at address 0xf7576d56 (thread 0009), starting debugger... --- snip ---
Please generate a new log, adding "winhttp" debug channel:
remove old log: $ rm log.txt
new log: $ WINEDEBUG=+tid,+seh,+relay,+winhttp wine Mercenaries2.exe >>log.txt 2>&1
Please make sure you removed any references to private data before attaching the log file.
Search "log.txt" for "requestcode=" and "serial=":
$ grep -i "requestcode=" log.txt ... "requestcode=xxx" (where xxx is your code)
$ grep -i "serial=" log.txt ... "serial=yyy" (where yyy is your code)
take the "xxx" and "yyy" part and in-place replace it in log file using following commands:
$ sed -i 's/xxx/myrequestcode/gi' log.txt $ sed -i 's/yyy/myserial/gi' log.txt
Compress the log.txt before attaching.
---
If you happen to have some Windows installation around you could try if native "winhttp.dll" works around the crash.
Put the Windows "winhttp.dll" in the folder where "Mercenaries2.exe" resides and start the game with:
--- snip --- $ WINEDLLOVERRIDES="winhttp=n" wine Mercenaries2.exe --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #16 from Jay taurolyon@gmail.com 2010-02-24 19:45:19 --- Created an attachment (id=26463) --> (http://bugs.winehq.org/attachment.cgi?id=26463) WinHTTP Log file (Private data omitted)
Resulting log file from running command: $ WINEDEBUG=+tid,+seh,+relay,+winhttp wine Mercenaries2.exe >>log.txt 2>&1
Private data was omitted and replaced with XXXXX's
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #17 from Jay taurolyon@gmail.com 2010-02-24 19:49:06 --- Created an attachment (id=26464) --> (http://bugs.winehq.org/attachment.cgi?id=26464) Log file: replaced winhttp.dll
Log file: replaced winhttp.dll with WinXP SP3 x86 version. Placed in program's dir.
Command: WINEDLLOVERRIDES="winhttp=n" wine Mercenaries2.exe
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #18 from Anastasius Focht focht@gmx.net 2010-02-25 02:08:49 --- Hello,
regarding the test with native winhttp:
--- snip --- jay@Jay-desktop:/media/Windows/Program Files/EA Games/Mercenaries 2 World in Flames$ WINEDLLOVERRIDES="winhttp=n" wine Mercenaries2.exe fixme:ntoskrnl:KeInitializeMutex stub: 0x111138, 0 fixme:ntoskrnl:KeInitializeMutex stub: 0x111160, 0 fixme:ntoskrnl:IoRegisterShutdownNotification stub: 0x111048 fixme:ntoskrnl:KeInitializeEvent stub: 0x111110 1 0 fixme:ntoskrnl:KeInitializeEvent stub: 0x111120 1 0 fixme:ntoskrnl:KeInitializeSpinLock stub: 0x111108 fixme:ntoskrnl:ObReferenceObjectByHandle stub: 0x54 1f0000 (nil) 0 0x111130 (nil) wine: Call from 0x7b8366e2 to unimplemented function ntoskrnl.exe.IoUnregisterShutdownNotification, aborting wine: Unimplemented function ntoskrnl.exe.IoUnregisterShutdownNotification called at address 0x7b8366e2 (thread 0016), starting debugger... ... Module Address Debug info Name (28 modules) PE 540000- 544900 Deferred elbycdio.sys --- snip ---
I doubt this "elbycdio.sys" kernel driver is part of the game installation...
Please make sure you don't install other stuff (games, app) into same WINEPREFIX while providing test logs as it interferes with original problem.
If you need to work with other stuff in the meanwhile, install the game in a separate WINEPREFIX (other than default ~/.wine) and run it from there...
Please rerun the game using "WINEDLLOVERRIDES="winhttp=n" wine Mercenaries2.exe" from clean WINEPREFIX and post terminal output again.
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #19 from Anastasius Focht focht@gmx.net 2010-02-25 02:24:49 --- Hello,
the winhttp problem might be related to SSL data processing (reads).
--- snip --- 0009:Call winhttp.WinHttpQueryDataAvailable(00000003,02a0fbbc) ret=10008856 0009:trace:winhttp:WinHttpQueryDataAvailable 0x3, 0x2a0fbbc 0009:trace:winhttp:addref_object 0x1d1a38 -> refcount = 2 0009:trace:winhttp:grab_object handle 0x3 -> 0x1d1a38 0009:Call ntdll.RtlAllocateHeap(00110000,00000000,00001001) ret=7d0b38f9 0009:Ret ntdll.RtlAllocateHeap() retval=033bc618 ret=7d0b38f9 ... 0009:trace:seh:raise_exception code=c0000005 flags=0 addr=0xf7509d56 ip=f7509d56 tid=0009 0009:trace:seh:raise_exception info[0]=00000001 0009:trace:seh:raise_exception info[1]=033cc000 0009:trace:seh:raise_exception eax=00000003 ebx=7d0c1ff4 ecx=3fffc185 edx=001d1a8c esi=02a1e474 edi=033cc000 0009:trace:seh:raise_exception ebp=02a0ea48 esp=02a0e9f8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210206 0009:trace:seh:call_vectored_handlers calling handler at 0x7e0480e0 code=c0000005 flags=0 0009:trace:seh:call_vectored_handlers handler at 0x7e0480e0 returned 0 0009:trace:seh:call_stack_handlers calling handler at 0x1002610a code=c0000005 flags=0 --- snip ---
Deduced corresponding source:
WinHttpQueryDataAvailable -> query_data -> netconn_recv
--- snip dlls/winhttp/request.c --- static BOOL query_data( request_t *request, LPDWORD available, BOOL async ) { BOOL ret; DWORD num_bytes;
if ((ret = netconn_query_data_available( &request->netconn, &num_bytes ))) { if (request->content_read < request->content_length) { if (!num_bytes) { char buffer[4096]; size_t to_read = min( sizeof(buffer), request->content_length - request->content_read );
ret = netconn_recv( &request->netconn, buffer, to_read, MSG_PEEK, (int *)&num_bytes ); if (ret && !num_bytes) WARN("expected more data to be available\n"); } } else if (num_bytes) { WARN("extra data available %u\n", num_bytes); ret = FALSE; } } TRACE("%u bytes available\n", num_bytes); ... } --- snip dlls/winhttp/request.c ---
4097 bytes get allocated -> (sizeof( supplied stack buffer)+1):
--- snip dlls/winhttp/net.c --- BOOL netconn_recv( netconn_t *conn, void *buf, size_t len, int flags, int *recvd ) { *recvd = 0; if (!netconn_connected( conn )) return FALSE; if (!len) return TRUE;
if (conn->secure) { #ifdef SONAME_LIBSSL if (flags & ~(MSG_PEEK | MSG_WAITALL)) FIXME("SSL_read does not support the following flags: %08x\n", flags);
/* this ugly hack is all for MSG_PEEK */ if (flags & MSG_PEEK && !conn->peek_msg) { if (!(conn->peek_msg = conn->peek_msg_mem = heap_alloc( len + 1 ))) return FALSE; } else if (flags & MSG_PEEK && conn->peek_msg) { if (len < conn->peek_len) FIXME("buffer isn't big enough, should we wrap?\n"); *recvd = min( len, conn->peek_len ); memcpy( buf, conn->peek_msg, *recvd ); return TRUE; } else if (conn->peek_msg) { *recvd = min( len, conn->peek_len ); memcpy( buf, conn->peek_msg, *recvd ); conn->peek_len -= *recvd; conn->peek_msg += *recvd;
if (conn->peek_len == 0) { heap_free( conn->peek_msg_mem ); conn->peek_msg_mem = NULL; conn->peek_msg = NULL; } /* check if we have enough data from the peek buffer */ if (!(flags & MSG_WAITALL) || (*recvd == len)) return TRUE; } *recvd += pSSL_read( conn->ssl_conn, (char *)buf + *recvd, len - *recvd ); if (flags & MSG_PEEK) /* must copy into buffer */ { conn->peek_len = *recvd; if (!*recvd) { heap_free( conn->peek_msg_mem ); conn->peek_msg_mem = NULL; conn->peek_msg = NULL; } else memcpy( conn->peek_msg, buf, *recvd ); } if (*recvd < 1 && len) return FALSE; return TRUE; #else return FALSE; #endif ... } --- snip dlls/winhttp/net.c ---
The problem most likely starts with pSSL_read() but since there is no trace available it's only guessing. Could be a heap corruption/buggy native ssl call.
Please rerun the game in clean WINEPREFIX using following:
remove old log: $ rm log.txt
new log: $ WINEDEBUG=+tid,+seh,+winhttp,+heap wine Mercenaries2.exe >>log.txt 2>&1
Beware: due to heap checking enabled the game startup will be slow and the log produced might be large - be patient until it fails.
*** strip your private data from winhttp traces as described in previous comments ***
Compress and attach the resulting log.
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
http://bugs.winehq.org/show_bug.cgi?id=21828
--- Comment #20 from Juan Lang juan_lang@yahoo.com 2010-09-24 13:25:06 CDT --- (In reply to comment #19)
*recvd += pSSL_read( conn->ssl_conn, (char *)buf + *recvd, len - *recvd
);
This buggy line has been fixed. What's the status with current (1.3.3 or later) Wine?
http://bugs.winehq.org/show_bug.cgi?id=21828
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |RESOLVED URL| |http://www.fileplanet.com/1 | |92036/download/Mercenaries- | |2:-World-in-Flames-Demo Component|-unknown |winhttp Resolution| |FIXED Summary|Unable to launch |Mercenaries 2: World in |Mercenaries 2 |Flames fails to start
--- Comment #21 from Anastasius Focht focht@gmx.net 2011-06-14 09:12:12 CDT --- Hello,
--- quote --- This buggy line has been fixed. What's the status with current (1.3.3 or later) Wine? --- quote ---
seems fixed, can't reproduce with demo (whopping 1.6 GiB download).
Most likely fixed by this commit: http://source.winehq.org/git/wine.git/commitdiff/5fc17a280046346627661e17903...
$ sha1sum Mercs2_DemoSetup.exe a3b385c0d127f74c680cba641b903fe420a317bd Mercs2_DemoSetup.exe
$ wine --version wine-1.3.22-31-g98394f2
--- snip --- -=[ ProtectionID v0.6.4.0 JULY]=- (c) 2003-2010 CDKiLLER & TippeX Build 07/08/10-17:57:05 Ready... ...
Scanning -> H:.wine\drive_c\Program Files\EA Games\Mercenaries 2 World in Flames DEMO\Merc2-Demo.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 17118472 (01053508h) Byte(s) -> File Appears to be Digitally Signed @ Offset 01052000h, size : 01508h / 05384 byte(s) [File Heuristics] -> Flag : 00000000000000000000000100000101 (0x00000105) [!] SecuROM Detected - Version 07.38.0006 [!] Possible CD/DVD-Key or Serial Check -> Invalid serial [CompilerDetect] -> Visual C++ 8.0 (Visual Studio 2005) - Scan Took : 0.142 Second(s) --- snip ---
Reopen if problem still persists with retail version.
Regards
http://bugs.winehq.org/show_bug.cgi?id=21828
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Alexandre Julliard julliard@winehq.org 2011-06-24 17:45:24 CDT --- Closing bugs fixed in 1.3.23.
http://bugs.winehq.org/show_bug.cgi?id=21828
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5fc17a280046346627661e17903 | |d2cea473e7139