http://bugs.winehq.org/show_bug.cgi?id=28271
Summary: Regression: League of Legends installer now crashes on startup. Product: Wine Version: 1.3.25 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: scott@open-vote.org
In 1.3.24 and prior, the freely downloadable League of Legends game would install, though it ran into issues later. As of 1.3.25, launching the installer causes it to crash on startup without displaying its "cancel/forward" screen.
Running a regression test, this seems to be the culprit:
3d81e97c753a73646081b1084ad64c88b71f4cc8 is the first bad commit commit 3d81e97c753a73646081b1084ad64c88b71f4cc8 Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed Jul 20 01:41:12 2011 +0900
kernel32: Add a test how PE section characteristics get mapped into memory page access, make it pass under Wine.
The app is a free download, and can be found here: http://signup.leagueoflegends.com/en/signup/redownload (no actual signup required)
http://bugs.winehq.org/show_bug.cgi?id=28271
Scott Ritchie scott@open-vote.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression URL| |http://signup.leagueoflegen | |ds.com/en/signup/redownload CC| |scott@open-vote.org
http://bugs.winehq.org/show_bug.cgi?id=28271
--- Comment #1 from Scott Ritchie scott@open-vote.org 2011-09-03 20:48:38 CDT --- Also, I can confirm that reverting the patch in latest git fixes the issue.
http://bugs.winehq.org/show_bug.cgi?id=28271
Scott Ritchie scott@open-vote.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |3d81e97c753a73646081b1084ad | |64c88b71f4cc8
http://bugs.winehq.org/show_bug.cgi?id=28271
Scott Ritchie scott@open-vote.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry@baikal.ru
http://bugs.winehq.org/show_bug.cgi?id=28271
Scott Ritchie scott@open-vote.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26924
http://bugs.winehq.org/show_bug.cgi?id=28271
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Regression: League of |League of Legends installer |Legends installer now |crashes on startup |crashes on startup. |
http://bugs.winehq.org/show_bug.cgi?id=28271
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|kernel32 |ntdll
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru 2011-09-06 22:04:05 CDT --- Does the following patch help?
http://source.winehq.org/patches/data/78433
http://bugs.winehq.org/show_bug.cgi?id=28271
Matej Spindler spindler.matej@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spindler.matej@gmail.com
--- Comment #3 from Matej Spindler spindler.matej@gmail.com 2011-09-07 00:52:25 CDT --- (In reply to comment #2)
Does the following patch help?
NO doesn't work here.
http://bugs.winehq.org/show_bug.cgi?id=28271
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-28 03:51:18 CDT --- I think the problem is related to how the sections of swt-win32-3349.dll (extracted into the user's temp directory) get mapped into memory. swt-win32-3349.dll is packed with UPX, so I first suspected its extraction mechanism to fail map the sections same way as it's done under Windows, but investigating UPX sources and playing with unpacked DLL shows the same behaviour.
First of all i did all my investigations with the following commit reverted, since the tests show that it's clearly wrong:
commit 33b0f0edffa0c8a06b4ee8831c92fdc373f83ece Author: Alexandre Julliard julliard@winehq.org Date: Fri Sep 9 12:29:20 2011 +0200
ntdll: Fix protection flags for uninitialized sections.
Here are the results of my investigation with unpacked swt-win32-3349.dll and a test app which does LoadLibraryEx with various flags and then dumps the resulting virtual memory of the loaded PE image. Loading the DLL under XP with DONT_RESOLVE_DLL_REFERENCES or LOAD_LIBRARY_AS_DATAFILE flags result in the same view, and matches the result under Wine with any flags used:
wine: ======== Loading swt-win32-unpacked.dll... loaded at 10000000 base 10000000, alloc base 10000000, prot 0002, alloc prot 0080, size 00001000, state 1000, type 1000000 base 10001000, alloc base 10000000, prot 0020, alloc prot 0080, size 00029000, state 1000, type 1000000 base 1002A000, alloc base 10000000, prot 0002, alloc prot 0080, size 00018000, state 1000, type 1000000 base 10042000, alloc base 10000000, prot 0008, alloc prot 0080, size 00007000, state 1000, type 1000000 base 10049000, alloc base 10000000, prot 0002, alloc prot 0080, size 00006000, state 1000, type 1000000
xp: ======== Loading swt-win32-unpacked.dll... loaded at 10000000 base 10000000, alloc base 10000000, prot 0002, alloc prot 0080, size 00001000, state 1000, type 1000000 base 10001000, alloc base 10000000, prot 0020, alloc prot 0080, size 00029000, state 1000, type 1000000 base 1002A000, alloc base 10000000, prot 0002, alloc prot 0080, size 00018000, state 1000, type 1000000 base 10042000, alloc base 10000000, prot 0008, alloc prot 0080, size 00002000, state 1000, type 1000000 base 10044000, alloc base 10000000, prot 0004, alloc prot 0080, size 00001000, state 1000, type 1000000 base 10045000, alloc base 10000000, prot 0008, alloc prot 0080, size 00001000, state 1000, type 1000000 base 10046000, alloc base 10000000, prot 0004, alloc prot 0080, size 00003000, state 1000, type 1000000 base 10049000, alloc base 10000000, prot 0002, alloc prot 0080, size 00006000, state 1000, type 1000000
The differences start from address 10042000. There are 2 regions with PAGE_READWRITE access (0x0004) injected into PAGE_WRITECOPY (0x0008) region.
Here is what winedump tells about the interesting section:
.data VirtSize: 0x00006380 VirtAddr: 0x00042000 raw data offs: 0x00042000 raw data size: 0x00003000 relocation offs: 0x00000000 relocations: 0x00000000 line # offs: 0 line #'s: 0 characteristics: 0xc0000040 INITIALIZED_DATA MEM_READ MEM_WRITE
The tests show that INITIALIZED_DATA | MEM_READ | MEM_WRITE section is supposed to be have PAGE_WRITECOPY access. With 33b0f0edffa0c8a06b4ee8831c92fdc373f83ece reverted Wine behaviour matches what Windows does. To test whether it's the loader who does something wrong I patched the DLL entry point to either return 1 or simply zero out the entry in the PE header. Both of them result in DLL having same virtual memory map like it was loaded as a data file or without deps. So, it looks like the DLL entry does something in the attach handler? Tracing it under Wine shows nothing interesting. Fortunately there the sources available of the swt.win32.extenstion project, but there are nothing enteresting there either, and the DLL binary distributed by the project differs from our win32-swt one. The offending section contents dumped by winedump look like some delay load data, with imported DLL names and APIs. Perhaps the section access gets changed once delay loaded APIs get resolved, but I'm not sure who is responsible for that: is it the OS loader, injected linker code, or custom application code?
I dare to add AF to the cc: list, perhaps if he has some interest and free time he could shed some light on this.
http://bugs.winehq.org/show_bug.cgi?id=28271
--- Comment #5 from Anastasius Focht focht@gmx.net 2011-10-30 10:40:56 CDT --- Hello,
actually I can't reproduce this - where/when exactly does it crash?
$ sha1sum LeagueofLegends.exe 075fa57d23a979f057fb4c51ce183cf6731f0853 LeagueofLegends.exe
$ wine --version wine-1.3.31-172-g7df0245
The download URL points to a 2 MiB Pando-based installer (Pando Media Booster). When running these type of installers you must apply my workaround from bug 22152 otherwise you get unpredictable results/crashes.
$ GC_DONT_GC=1 wine ./LeagueofLegends.exe
With that workaround the installer loads and churns some time while processing multi-language EULA content (edit control -> ScriptStringAnalyse) - might be performance regression.
When the EULA has been accepted one crash is encountered after downloading/installing additional "Pando media booster" components while registering npPandoWebPlugin.dll. Other crashes are directly related to unimplemented msvcp90.dll functions. These can be prevented by using native MSVC runtime (winetricks vcrun2008).
The game itself is about 2 GiB and Pando uses bittorrent protocol to download it.
Regards
http://bugs.winehq.org/show_bug.cgi?id=28271
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-30 11:40:31 CDT --- Thanks Anastasius,
sha1sum LeagueofLegends.exe 74355286693112eb3de8b45ecb3c4ce67080f4a7 LeagueofLegends.exe
I'll test tomorrow whether they have updated it, and see how it goes here.
http://bugs.winehq.org/show_bug.cgi?id=28271
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | Status|NEW |RESOLVED Resolution| |DUPLICATE Regression SHA1|3d81e97c753a73646081b1084ad | |64c88b71f4cc8 |
--- Comment #7 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-30 22:13:16 CDT --- I have redownloaded the installer, but it's still the same:
sha1sum LeagueofLegends.exe 74355286693112eb3de8b45ecb3c4ce67080f4a7 LeagueofLegends.exe
Perhaps the server provides different versions depending on the IP address.
Prepending GC_DONT_GC=1 to the command line makes LeagueofLegends.exe run for me (although as Anastasius has noticed with huge delay in displaying the license text).
Difference in section mapping of swt-win32-3349.dll between Windows and Wine seems to be unrelated, but still might be interesting to investigate.
Marking as a duplicate, my patch just changed something that provoked an old problem.
Once again thanks Anastasius for your invaluable help.
*** This bug has been marked as a duplicate of bug 22152 ***
http://bugs.winehq.org/show_bug.cgi?id=28271
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Austin English austinenglish@gmail.com 2011-11-02 12:39:37 CDT --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=28271
--- Comment #9 from Dmitry Timoshkov dmitry@baikal.ru 2011-11-22 04:54:28 CST --- (In reply to comment #7)
Difference in section mapping of swt-win32-3349.dll between Windows and Wine seems to be unrelated, but still might be interesting to investigate.
The following test case explains what is going on: http://www.winehq.org/pipermail/wine-patches/2011-November/109092.html