Skip to content

Fix overlay rendering issues that lead to crashing when other overlays are present#1003

Merged
maximegmd merged 4 commits intomaximegmd:masterfrom
Kaldaien:crash_fix
Feb 18, 2025
Merged

Fix overlay rendering issues that lead to crashing when other overlays are present#1003
maximegmd merged 4 commits intomaximegmd:masterfrom
Kaldaien:crash_fix

Conversation

@Kaldaien
Copy link
Copy Markdown
Contributor

I have been getting several reports from Special K users of crashes when using this mod, and finally had some time to investigate.

Primary issues found:

  1. Code to show/hide the hardware cursor does not handle pathological case where something is preventing the cursor's state from changing -- infinite loop.
  2. DisableThreadLibraryCalls (...) used in a DLL that uses MSVCRT managed thread_local storage.
  3. A single command allocator/list was being used for all frame contexts, despite creating per-context allocators.
  4. The game's window title was being used to find the main window, but this is highly volatile; use window class name instead.

Handle WM_WINDOWPOSCHANGED correctly for SWP_NOMOVE and SWP_NOSIZE cases
…dual frame contexts instead of sharing frame context 0's allocator for all command lists
@maximegmd
Copy link
Copy Markdown
Owner

Thank you very much for the contribution.

I also believe there was a discussion regarding our hooking methodology not handling the SL proxy correctly but did not investigate more.

@WSSDude
Copy link
Copy Markdown
Collaborator

WSSDude commented Feb 18, 2025

Seems good to me, but dont think this really resolves any fencing issues we currently have and I am trying to fix. Or does it? Would be suprised considering issues I found, including leaking SRV heap and such...

But should be an improvement I believe still for now. I am rewritting whole hook, had this fixed there among other things, no need necessarily I suppose to do anything on your part with this, just for a note. This is definitely not everything we do wrong atm unfortunately.

@maximegmd maximegmd merged commit 9714275 into maximegmd:master Feb 18, 2025
1 check passed
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.

3 participants