http://bugs.winehq.org/show_bug.cgi?id=22044
Summary: Builtin msvcr80 not sufficient for running WoW and SCII Beta, missing about 19 functions Product: Wine Version: 1.1.40 Platform: x86 OS/Version: Linux Status: NEW Keywords: download Severity: enhancement Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Now that we have a spiffy new msvcr80, I tested it on two real apps: World of Warcraft and Starcraft II Beta, by removing their bundled copies of msvcr80 (or equivalently by marking msvcr80 as builtin only). This failed with
wine: ... unimplemented function msvcr80.dll._initterm_e, aborting (imported by Battle.net.dll).
_initterm_e is supposedly a version of _initterm that returns 0 on success, and adding a version that simply calls _initterm and returns 0 gets us on to the next problem.
wine: ... unimplemented function msvcr80.dll._encode_pointer, aborting (imported by Battle.net.dll).
This is probably just a cdecl version of EncodePointer; implementing _encode_pointer and _decode_pointer as simple cdecl wrappers gets us to the next problem,
wine: ... unimplemented function msvcr80.dll._controlfp_s, aborting (imported by d3dx9_41.dll)
That function's actually documented in msdn, and is probably easy to fake-implement as a wrapper around control87, but needs tests. That's where I stopped adding wrappers, and started using winedump to see if I could get a more complete list of missing functions. winedump -j import Battle.net.dll plus a little text munging shows that file imports the following additional functions listed as stubs in msvcr80.spec:
?_open@@YAHPBDHH@Z ?_type_info_dtor_internal_method@type_info@@QAEXXZ @_malloc_crt@4 __clean_type_info_names_internal __sys_nerr _create_locale _crt_debugger_hook _encoded_null _except_handler4_common _free_locale _iswalpha_l _malloc_crt _strtoi64 _strtoui64 strnlen
http://bugs.winehq.org/show_bug.cgi?id=22044
Detlef Riekenberg wine.dev@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.dev@web.de
--- Comment #1 from Detlef Riekenberg wine.dev@web.de 2010-03-19 06:47:37 --- Send a patch to implement _initterm_e in msvcr90: http://source.winehq.org/patches/data/59477 and a forward for msvcr80: http://source.winehq.org/patches/data/59462
Tests are available, but mainifest/assembly magic is needed for XP and above.
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #2 from Detlef Riekenberg wine.dev@web.de 2010-03-19 08:05:39 --- I have no WoW to check.
I used Osiris from bug 6591 (http://osiris.kodeware.net/)
Next for Osiris is memcpy_s: http://msdn.microsoft.com/library/wes2t00f%28VS.80%29.aspx
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #3 from Dan Kegel dank@kegel.com 2010-03-19 10:43:58 --- I bet you can use the free trial of WoW once you finish fixing Osiris...
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #4 from Piotr Caban piotr.caban@gmail.com 2010-04-08 11:51:49 --- Only 4 functions are missing now, namely:
?_type_info_dtor_internal_method@type_info@@QAEXXZ __clean_type_info_names_internal _crt_debugger_hook _except_handler4_common
Three of them should not be executed in most programs (executed in case of an error). So to make the game running probably only __clean_type_info_names_internal is needed. Because this function is not documented and I was not able to write a program that is correctly using it, can you check if it's truly used? (I prefer not to download WoW because it's quite big).
http://bugs.winehq.org/show_bug.cgi?id=22044
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=22044
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #5 from Piotr Caban piotr.caban@gmail.com 2010-04-09 08:27:20 --- I checked the WoW trial with builtin msvcr80 and it's working with newest git. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #6 from Austin English austinenglish@gmail.com 2010-04-09 20:09:56 --- (In reply to comment #5)
I checked the WoW trial with builtin msvcr80 and it's working with newest git. Please retest.
Starcraft still fails: austin@midna:~/.wine/drive_c/Program Files/StarCraft II Beta$ wine: Call from 0x7edef716 to unimplemented function msvcr80.dll.memcpy_s, aborting wine: Call from 0x7edef716 to unimplemented function msvcr80.dll.__CxxFrameHandler3, aborting austin@midna:~/.wine/drive_c/Program Files/StarCraft II Beta$ wine --version wine-1.1.42-182-g8f77dd8
http://bugs.winehq.org/show_bug.cgi?id=22044
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22200
http://bugs.winehq.org/show_bug.cgi?id=22044
Pierre pierre42d@9online.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pierre42d@9online.fr
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #7 from Detlef Riekenberg wine.dev@web.de 2010-04-14 12:46:14 --- (In reply to comment #2)
I used Osiris from bug 6591 (http://osiris.kodeware.net/)
Next for Osiris is memcpy_s: http://msdn.microsoft.com/library/wes2t00f%28VS.80%29.aspx
memcpy_s is implemented (Thanks Piotr).
Next for Osiris is _findfirst64i32: http://msdn.microsoft.com/en-us/library/zyzxfzac%28v=VS.100%29.aspx
wine: Call from 0x682a47d2 to unimplemented function msvcr80.dll._findfirst64i32, aborting 001a:fixme:msvcr90:__clean_type_info_names_internal (0x14ebe70) stub
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #8 from Austin English austinenglish@gmail.com 2010-04-15 03:24:55 --- Starcraft II now crashes on: wine: Call from 0x7ede9f36 to unimplemented function msvcr80.dll._vsnprintf_s, aborting
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #9 from Austin English austinenglish@gmail.com 2010-04-20 19:20:18 --- In wine-1.1.43-132-g7746136, Starcraft II fails with: wine: Call from 0x7edebbda to unimplemented function msvcr80.dll.sscanf_s, aborting wine: Call from 0x7edebbda to unimplemented function msvcr80.dll._wfopen_s, aborting
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #10 from Austin English austinenglish@gmail.com 2010-04-21 03:39:35 --- I ran a +relay on Starcraft with native msvcr80, and did a grep for 'msvc'. Sorting that list out and getting unique entries, seems these are the functions used up until the login screen:
msvcrt.??2@YAPAXI@Z msvcrt.??3@YAXPAX@Z msvcrt.atof msvcrt._CIatan msvcrt._CIsqrt msvcrt._clearfp msvcrt._controlfp msvcrt.__dllonexit msvcrt._finite msvcrt.floor msvcrt._fpclass msvcrt.free msvcrt._initterm msvcrt.isalnum msvcrt.isalpha msvcrt.isdigit msvcrt._lock msvcrt.malloc msvcrt.__set_app_type msvcrt.setlocale msvcrt._strdup msvcrt._unlock
of course they seem to checking for more..
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #11 from Piotr Caban piotr.caban@gmail.com 2010-04-22 12:45:46 --- Fixed by commit ca3cb9e2f5c6e6a8134b88f400ba6ae0f43767d9. Please close this bug.
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #12 from Austin English austinenglish@gmail.com 2010-04-22 21:04:21 --- (In reply to comment #11)
Fixed by commit ca3cb9e2f5c6e6a8134b88f400ba6ae0f43767d9. Please close this bug.
Starcraft II now launches, but fails quickly with: fixme:msvcrt:_controlfp_s (0x3d9f3c0 0 0) semi-stub fixme:msvcrt:_controlfp_s (0x3d9f408 65536 196608) semi-stub fixme:msvcrt:_controlfp_s (0x3d9f334 655391 196608) semi-stub fixme:msvcrt:_controlfp_s (0x3d9dddc 131072 197376) semi-stub fixme:msvcrt:_controlfp_s (0x419ea3c 131072 197376) semi-stub
and exits silently, no crash. Doesn't occur with native. If you'd like, I can close this and make a new bug...
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #13 from Piotr Caban piotr.caban@gmail.com 2010-04-23 06:25:28 --- Today (maybe yesterday) there was an update to the game. Which version where you testing on? (version 0.10.0.14803 (English) was working for me).
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #14 from Piotr Caban piotr.caban@gmail.com 2010-04-23 07:16:03 --- I've downloaded the update, the game is working for me. Can you tell me the version you were testing on? I am currently using:
Game version: 0.10.0.15097 Launcher version: 2.1.2.1533 (check in Logs/Launcher.log) Downloader: 2.2.0.1118
Also please make sure you're running on clear prefix with only SCII installed and msvcr80 set to builtin.
http://bugs.winehq.org/show_bug.cgi?id=22044
--- Comment #15 from Austin English austinenglish@gmail.com 2010-04-23 09:43:50 --- This is with the latest update. It's not a clean WINEPREFIX though, I'll have to test that this afternoon (9 hours or so from now).
http://bugs.winehq.org/show_bug.cgi?id=22044
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #16 from Dan Kegel dank@kegel.com 2010-05-05 18:39:14 --- Starcraft II seems to work now, thanks.
http://bugs.winehq.org/show_bug.cgi?id=22044
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org 2010-05-07 13:30:02 --- Closing bugs fixed in 1.1.44.