https://bugs.winehq.org/show_bug.cgi?id=51829
Bug ID: 51829 Summary: Roblox Player: Long freeze during loading Product: Wine Version: 6.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: a0939712328@gmail.com Regression SHA1: 7ef35b33936682c01f1c825b7d1b07567a691c12 Distribution: ---
Since a update, Roblox Player has been constantly freezing for more than 10 seconds before loading the game. With help from git bisect, the faulty commit should be 7ef35b3 (ntdll: Reimplement file system redirection using NT pathname comparisons.)
Steps to reproduce: 1. Install and set up Roblox using Grapejuice (https://gitlab.com/brinkervii/grapejuice/-/wikis/home) 2. Open any experience through Roblox website 3. Look for long graphical freeze during game loading
Expected behavior: The game freezes briefly and loads the game.
Actual behavior: The game freezes for more than 10 seconds before loading the game, the graphics are not updated in the process.
https://bugs.winehq.org/show_bug.cgi?id=51829
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=51829
Paul Gofman pgofman@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pgofman@codeweavers.com
--- Comment #1 from Paul Gofman pgofman@codeweavers.com --- I've debugged the issue.
The part of the blamed commit which changed things for Roblox Player is the change to env.c:create_startup_info(). After the commit the NT path ("\??\C:\...") provided for image name started being converted to DOS path ("C:\..."). Actually before the commit if the path provided to RtlCreateUserProcess() in RTL_USER_PROCESS_PARAMETERS was an NT path the process creation was failing. Things worked in Wine because the higher level Wine create functions are providing DOS path and the direct use of lower level creation functions is very rare. Windows instead fails process creation if DOS path instead of NT path is provided there. So this change is not a bug but an improvement.
After the start Roblox player process tries to create another instance of Roblox launcher (the two previous instances of the launcher started before the Player launch exit soon). That is done by calling RtlCreateUserProcess() with process parameters previously initialized with RtlCreateProcessParameters() with NT path for image (which is actually correct on Windows). Before the blamed commit the new launcher process creation was just failing and somehow Player is fine with that and goes on without delay. Now when the process creation succeeds the process start but exits immediately before completing initialization with intriguing Wine message saying that the executable "is a dll, not an executable". When the process creation succeeded but process does not proceed Player gets stuck for 20 seconds waiting for something before outputting debug messages "WARNING: Infinite yield possible..." and going on.
What is now breaking the process start is the trickery Player does on the newly launcher process before its initialization completed and before the process is resumed. Player preserves the contents of the launcher's main exe image section, unmaps main image sections, allocates anonymous virtual memory at the same address and puts the data back. That all works fine with Wine except for when it gets to ntdll/loader.c:build_main_module() and gets SECTION_IMAGE_INFORMATION for main exe through NtQueryInformationProcess(ProcessImageInformation) it receives the information for ntdll.dll instead of main exe which of course has that DLL flag and fails initialization. That happens because the way of how wineserver's get_process_info() works. When the image mapping is added for the .exe module it is put at the head of views list on the server. All the dll mappings are put at the tail. When process image info is required the first view in the list is taken and the image info is copied from it. But in the present case the main exe view was removed before the user part of initialization was finished.
Storing pe_image_info_t directly in the process structure (put there on first arrival) fixes the issue. The launcher process is created successfully and stays alive through the tormenting by Player process and the game load proceeds without delay.
I am going to do some Windows testing and approach a patch for that.
https://bugs.winehq.org/show_bug.cgi?id=51829
Ethan ethanbudiantodev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ethanbudiantodev@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51829
--- Comment #2 from Paul Gofman pgofman@codeweavers.com --- Should be fixed in Wine 7.0-rc4 by 8eacd3e50792925cbd209f8a1940f3e96b725137
https://bugs.winehq.org/show_bug.cgi?id=51829
penguinbotonline@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |penguinbotonline@protonmail | |.com
--- Comment #3 from penguinbotonline@protonmail.com --- Thank you, i tested 7.0 rc4 (although staging, but the changes appear in Wine's git log), and it is indeed fixed.
https://bugs.winehq.org/show_bug.cgi?id=51829
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |8eacd3e50792925cbd209f8a194 | |0f3e96b725137 Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Marking fixed, thank you Paul!
https://bugs.winehq.org/show_bug.cgi?id=51829
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.0-rc5.