https://bugs.winehq.org/show_bug.cgi?id=55798
Bug ID: 55798 Summary: Unreal Engine 5.2: Wine minidumps take hours to load into a debugger Product: Wine Version: 8.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: dbghelp Assignee: wine-bugs@winehq.org Reporter: aiden.deloryn@tensorworks.com.au Distribution: ---
=== Overview === When attempting to load a Wine generated minidump from an Unreal Engine application using a debugger (such as Visual Studio or VS Code), it takes a number of hours for the file to load. If left uninterrupted during this time, the process does eventually complete and all of the expected debug data becomes visible within the IDE. This behaviour has only been observed for minidumps of type MiniDumpNormal. When working with a Wine generated minidump of type MiniDumpWithFullMemory, the debugger is able to load the file within a few seconds.
=== Steps to Reproduce === 1. Build this minimal sample application https://github.com/TensorWorks/BuggyFirstPersonDemo.git on a Windows machine with Unreal Engine 5.2.1 using the following command:
C:<UE_INSTALL_DIR>\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -utf8output -clientconfig=DebugGame -project="C:<PATH_TO_PROJECT_DIR>\BuggyFirstPersonDemo.uproject" -noP4 -cook -build -stage -prereqs -pak -archive -archivedirectory="C:<PATH_TO_PROJECT_DIR>\GameBuilds" -platform=Win64
2. Copy the build directory (C:<PATH_TO_PROJECT_DIR>\GameBuilds) to a Linux machine and run the application using Wine (DXVK required):
wine ./GameBuilds/Windows/BuggyFirstPersonDemo/Binaries/Win64/BuggyFirstPersonDemo-Win64-DebugGame.exe -windowed -ResX=800 -ResY=600
3. Trigger a crash by picking up the gun and shooting the large white cube. Note: hold down the right mouse button to aim/look, and press the left mouse button to shoot.
4. Copy the crash dump from ./GameBuilds/Windows/BuggyFirstPersonDemo/Saved/Crashes/<CRASH_ID>/UEMinidump.dmp to a Windows machine and attempt to load it using Visual Studio or VS Code (for VS Code you will need the C/C++ extension from Microsoft installed).
=== Actual Results === The minidump takes hours to load into Visual Studio and VS Code. MemoryListStream contains over 950,000 memory ranges (see additional information below).
=== Expected Results === The minidump takes less than a minute to load into Visual Studio and VS Code, which is true for full memory minidumps generated under Wine and any minidump generated under Windows.
=== Build Date & Hardware === wine-8.14 on Ubuntu 22.04.3 LTS x86-64
=== Additional Builds and Platforms === Also reproducible on wine-8.17 and wine-8.0.2
=== Additional Information === When analysing and comparing minidumps generated under Wine versus those generated under Windows using the Microsoft Crash Dump File Checker tool “DumpChk” (https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/dumpchk), a significant discrepancy can be observed in the normal minidump generated under Wine. In particular, the number of memory ranges in MemoryListStream is substantially higher, as can be seen in the excerpts below. Note that full memory minidumps have also been included from both Windows and Wine for additional context and comparison.
Windows - MiniDumpNormal: Stream 3: type MemoryListStream (5), size 00000804, RVA 0006FF09 128 memory ranges [OMITTED] Total memory: 463cc
Wine - MiniDumpNormal: Stream 4: type MemoryListStream (5), size 00EA0FF4, RVA 0002986B 958719 memory ranges [OMITTED] Total memory: 15bd62e
Windows - MiniDumpWithFullMemory: Stream 5: type Memory64ListStream (9), size 0000EAC0, RVA 000C8D45 3755 memory ranges [OMITTED] Total memory: a74c1000
Wine - MiniDumpWithFullMemory: Stream 7: type Memory64ListStream (9), size 0000E260, RVA 0006ADFB 3621 memory ranges [OMITTED] Total memory: 7ab14000
Note: You can generate a full memory minidump using the provided sample application by specifying the -fullcrashdumpalways flag. For example:
wine ./GameBuilds/Windows/BuggyFirstPersonDemo/Binaries/Win64/BuggyFirstPersonDemo-Win64-DebugGame.exe -windowed -ResX=800 -ResY=600 -fullcrashdumpalways
https://bugs.winehq.org/show_bug.cgi?id=55798
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |eric.pouech@gmail.com CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Created attachment 75479 --> https://bugs.winehq.org/attachment.cgi?id=75479 patch for digging
thanks for looking into this and doing a first analysis from the number of memory ranges, the most probable explanation is: - you're running on 64bit - with a large number of threads (unreal engine likely does); hence generating a bunch of unwind information
if you could try this patch; it may have a positive impact (just to be sure the problem comes from here).
is it possible to share the minidump? (may be quite large though) (I would need to gather more information on the ranges stored)
TIA
https://bugs.winehq.org/show_bug.cgi?id=55798
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |819d8692c6dad09315673988ff9 | |4dcfc11f11304 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- fixed by ref:ed SHA1
https://bugs.winehq.org/show_bug.cgi?id=55798
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.14.