Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the crash handler work on wine properly #1636

Merged
merged 11 commits into from
Feb 11, 2024

Conversation

marzent
Copy link
Contributor

@marzent marzent commented Feb 11, 2024

This includes a few fixes to make injector arg passing properly work (and passes in everything XL does).

VEH has been fully functional on wine 7+ from what I could gather (and the original Dalamud crash was into a VEH semi-stub on wine 6), however it currently chokes on std::chrono::zoned_time, which is only really used for debug logging and so it should be fine.
In any case will try to get it fixed upstream.

@marzent marzent requested a review from a team as a code owner February 11, 2024 00:14
@marzent
Copy link
Contributor Author

marzent commented Feb 11, 2024

Saving a tspack should now also work correctly on wine.
There was another std::chrono issue (replaced by win32 calls) and moved towards std::filestream to save the tspack since the COM use with IShellItem_BindToHandler did not work as expected too (returns REGDB_E_CLASSNOTREG).

@KazWolfe
Copy link
Member

KazWolfe commented Feb 11, 2024

Tested OK on Windows.

Linux test failing for now on stock Steam Deck + XLCore config. Current state is an apparent bug in Wine >= 8.5 that causes a crash reading PDBs leading to no VEH screen and the game instead hanging indefinitely. Tested OK with Wine 7.10.r3.

Crash screen on Steam Deck takes about 30 seconds to pop, though this is likely environmental. Works fine in Gamescope, we have plenty of room to add a "generate tspack" button should we want it, though it does clip if anyone makes the mistake of opening the stacktrace log screen. Restart tested OK. Crash files are generated in logs/ folder, they otherwise seem fine.

@marzent
Copy link
Contributor Author

marzent commented Feb 11, 2024

Yeah the pdb issue on Wine >= 8.5 is a bit annoying and not something I initially tested for.
In the meantime the last commit should fix it (as in properly run into the next crash handler), until we update our wine to fix that and then it should automagically start working.
As a side bonus, if for whatever reason the crash handler dies on windows as well, the game will no longer hang and continue with the next crash handler similarly.

@KazWolfe
Copy link
Member

Windows tested OK.

Wine 7.10 tests OK, VEH pops up.

Stock wine does not pop VEH (as expected); Wine's own exception handler pops instead. (Is this intended?)

@marzent
Copy link
Contributor Author

marzent commented Feb 11, 2024

Wine's own exception handler pops instead.

This should greatly help debugging native crashes (plus the managed stack, if useful, will also be logged)

@KazWolfe
Copy link
Member

KazWolfe commented Feb 11, 2024

Also of note: on Windows, forcefully killing DalamudCrashHandler.exe after the game crashes will now cause FFXIV to quit after a few seconds. Prior behavior was to hang indefinitely. Windows will also generate a dump file for us at %LOCALAPPDATA%\CrashDumps in this case.

I think this is fine, so +1ing.

@KazWolfe KazWolfe merged commit 386e5f2 into goatcorp:master Feb 11, 2024
3 checks passed
@marzent marzent deleted the wine-crash-handler branch February 11, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants