[Bug 34687] New: Port Royale 2 crashes on startup (SymGetLineFromAddr() returns unix-style path for source file)
http://bugs.winehq.org/show_bug.cgi?id=34687 Bug #: 34687 Summary: Port Royale 2 crashes on startup (SymGetLineFromAddr() returns unix-style path for source file) Product: Wine Version: 1.7.3 Platform: x86 OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: dbghelp AssignedTo: wine-bugs(a)winehq.org ReportedBy: focht(a)gmx.net Classification: Unclassified Hello folks, as the summary says ... The game bundles a native version of 'dbghelp.dll' which is used in their exception handling/stack analysis library code living in 'Walhalla.dll' to provide more information. Wine builtin is of course preferred/loaded. The game engine uses custom C++ exception classes which retrieve some context information using dbghelp. After calling dbghelp.SymGetLineFromAddr(), strrchr() is used on the returned IMAGEHLP_LINE64.FileName member. This obviously won't work because Wine returns a unix-style path, leading to crash. 'strrchr' returns NULL -> input to STL basic_string() ctor --- snip --- 0025:Call dbghelp.SymGetModuleInfo64(ffffffff,7bc8d47f,00000000,0033ad20) ret=00af4ad6 0025:Call KERNEL32.WideCharToMultiByte(00000000,00000000,00339794 L"ntdll",ffffffff,0033a44c,00000020,00000000,00000000) ret=7e5a69c2 0025:Ret KERNEL32.WideCharToMultiByte() retval=00000006 ret=7e5a69c2 ... 0025:Ret dbghelp.SymGetModuleInfo64() retval=00000001 ret=00af4ad6 0025:Call ntdll.RtlAllocateHeap(00dd3000,00000000,00000020) ret=7c3416b3 0025:Ret ntdll.RtlAllocateHeap() retval=00e29e78 ret=7c3416b3 0025:Call dbghelp.SymGetSymFromAddr64(ffffffff,7bc8d47f,00000000,0033ad18,0033abe8) ret=00af4b41 0025:Ret dbghelp.SymGetSymFromAddr64() retval=00000001 ret=00af4b41 0025:Call ntdll.RtlAllocateHeap(00dd3000,00000000,00000020) ret=7c3416b3 0025:Ret ntdll.RtlAllocateHeap() retval=0e9fefb0 ret=7c3416b3 0025:Call dbghelp.SymGetLineFromAddr64(ffffffff,7bc8d47f,00000000,00000000,0033ab70) ret=00af4b9d 0025:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7e5c219e ip=7e5c219e tid=0025 0025:trace:seh:raise_exception info[0]=00000001 0025:trace:seh:raise_exception info[1]=00000000 0025:trace:seh:raise_exception eax=00000000 ebx=7e5d9000 ecx=0000000e edx=0000000e esi=0033ab3c edi=0033ab04 0025:trace:seh:raise_exception ebp=0033aae8 esp=0033aa90 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210202 --- snip --- The actual code: --- snip --- ... 0113D393 MOV DWORD PTR SS:[ESP+40],EDX 0113D397 MOV DWORD PTR SS:[ESP+30],14 0113D39F CALL DWORD PTR DS:[11E627C] ; dbghelp.SymGetLineFromAddr 0113D3A5 TEST EAX,EAX 0113D3A7 JE SHORT Walhalla.0113D3DE 0113D3A9 MOV EDX,DWORD PTR SS:[ESP+2C] 0113D3AD PUSH 5C 0113D3AF PUSH EDX 0113D3B0 CALL DWORD PTR DS:[11E61C0] ; MSVCR71.strrchr 0113D3B6 ADD ESP,8 0113D3B9 INC EAX 0113D3BA PUSH EAX 0113D3BB LEA ECX,DWORD PTR SS:[ESP+44] 0113D3BF CALL DWORD PTR DS:[11E63BC] ; stlport_.?assign@?$basic_string(a)DV?$char_traits(a)D@_STL@@V?$allocator(a)D@2@@_STL@@QAEAAV12(a)PBD@Z ... --- snip --- Dump of IMAGEHLP_LINE64 structure returned by dbghelp.SymGetLineFromAddr: --- snip --- 0033EF6C 0000000E 0033EF70 00000014 0033EF74 106AA4B4 0033EF78 0000035A 0033EF7C 0E62914C ASCII "/home/focht/projects/wine/wine-git/dlls/ntdll/thread.c" 0033EF80 7BC8D471 ntdll.7BC8D471 --- snip --- Source: http://source.winehq.org/git/wine.git/blob/878ea7d9ea4bbb924a539ec2808867468... --- snip --- 1435 BOOL symt_fill_func_line_info(const struct module* module, const struct symt_function* func, 1436 DWORD64 addr, IMAGEHLP_LINE64* line) 1437 { ... 1456 if (found) 1457 { 1458 line->FileName = (char*)source_get(module, dli->u.source_file); 1459 return TRUE; 1460 } ... --- snip --- Starting the game with 'WINEDLLOVERRIDES=dbghelp=n' works around 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.
http://bugs.winehq.org/show_bug.cgi?id=34687 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.fileplanet.com/1 | |44434/140000/fileinfo/Port- | |Royale-2-Demo-%5BEnglish%5D --- Comment #1 from Anastasius Focht <focht(a)gmx.net> 2013-10-08 17:05:05 CDT --- Hello folks, filling fields... $ du -sh pr2_english_demo.exe 235M pr2_english_demo.exe $ sha1sum pr2_english_demo.exe wi80cf15e36cc20cf502da4659d5d22cd1081eeba3 pr2_english_demo.exe $ wine --version wine-1.7.3-313-gf46137f 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.
http://bugs.winehq.org/show_bug.cgi?id=34687 GyB <gyebro69(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69(a)gmail.com --- Comment #2 from GyB <gyebro69(a)gmail.com> 2013-10-09 09:25:33 CDT --- This could be the same issue as bug #21915. Setting dbghelp.dll to native works around the problem for me as well in PR2. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=34687 --- Comment #3 from Anastasius Focht <focht(a)gmx.net> 2013-10-09 16:44:05 CDT --- Hello GyB, --- quote --- This could be the same issue as bug #21915. Setting dbghelp.dll to native works around the problem for me as well in PR2. --- quote --- well, I actually opened this bug while trying to reproduce/investigate bug 21915 The crash/exception presented there was clearly different hence I created a separate bug. If the workaround makes the game fully running/playable (I didn't went further into actual game) then this is indeed a dupe. Can you play the commercial (full) version of PR2 with the workaround? 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.
http://bugs.winehq.org/show_bug.cgi?id=34687 --- Comment #4 from GyB <gyebro69(a)gmail.com> 2013-10-09 19:29:13 CDT --- (In reply to comment #3)
Hello GyB,
--- quote --- This could be the same issue as bug #21915. Setting dbghelp.dll to native works around the problem for me as well in PR2. --- quote ---
well, I actually opened this bug while trying to reproduce/investigate bug 21915 The crash/exception presented there was clearly different hence I created a separate bug. If the workaround makes the game fully running/playable (I didn't went further into actual game) then this is indeed a dupe.
Can you play the commercial (full) version of PR2 with the workaround?
Regards
Hi Anastasius, I tested the gog.com version of the game, and got the same result either with Wine 1.2.3 or 1.7.3 when using the built-in dbghelp.dll: the game throws an error message 'Could not find translation files' then it crashes. With 'dbghelp=n' the game starts fine with both Wine versions for me. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=34687 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adrian(a)hoehne.tk --- Comment #5 from Anastasius Focht <focht(a)gmx.net> 2013-10-10 00:33:26 CDT --- *** Bug 21915 has been marked as a duplicate of this bug. *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com, | |super_man(a)post.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 georg_mueller(a)safe-mail.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |georg_mueller(a)safe-mail.net --- Comment #6 from georg_mueller(a)safe-mail.net ---
I tested the gog.com version of the game, and got the same result either with Wine 1.2.3 or 1.7.3 when using the built-in dbghelp.dll: the game throws an error message 'Could not find translation files' then it crashes. With 'dbghelp=n' the game starts fine with both Wine versions for me.
I also own PR2 from GOG $ md5sum PR2.exe 22546195b669394f651c96521d39d238 PR2.exe $ env WINEDLLOVERRIDES="dbghelp=n" wine PR2.exe Will result sometimes in a crash with the following messsage: 'Could not find translation files' Distro: Debian Jessie with own compiled Wine 1.9.,1 Any ideas? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |p.beutner(a)gmx.net, | |winetest(a)luukku.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.com --- Comment #7 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Created attachment 56841 --> https://bugs.winehq.org/attachment.cgi?id=56841 Patch Does this help? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 --- Comment #8 from winetest(a)luukku.com --- (In reply to Alistair Leslie-Hughes from comment #7)
Created attachment 56841 [details] Patch
Does this help?
Yes it seems to help. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 --- Comment #9 from winetest(a)luukku.com --- I am deleting old downloads and retested this game. Without a patch crash, loads just fine with the patch. I started a game and it loads quite slowly with modern hardware. There is some issue drawing water, but other than that everything seemed just fine. wine 2.0-git. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang(a)codeweavers.com --- Comment #10 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- (In reply to Alistair Leslie-Hughes from comment #7)
Created attachment 56841 [details] Patch
Does this help?
Hi Alistair, how come this didn't get submitted to patch? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 --- Comment #11 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- (In reply to Zhiyi Zhang from comment #10)
(In reply to Alistair Leslie-Hughes from comment #7)
Created attachment 56841 [details] Patch
Does this help?
Hi Alistair, how come this didn't get submitted to patch?
https://www.winehq.org/pipermail/wine-devel/2017-February/116170.html -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |4aa7fbe0561e6a27f098a05a63c | |5a7d12397e678 Status|NEW |RESOLVED --- Comment #12 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=4aa7fbe0561e6a27f098a05a6... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.11. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=34687 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.fileplanet.com/1 |https://web.archive.org/web |44434/140000/fileinfo/Port- |/20210718180607/http://down |Royale-2-Demo-%5BEnglish%5D |load.fileplanet.com/ftp1/08 | |2004/pr2_english_demo.exe?s | |t=mosNWaEYCEe6WZeTJGnPow&e= | |1626642309 -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla