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

Pointers are not always reset #20

Open
YaLTeR opened this issue Aug 25, 2021 · 0 comments
Open

Pointers are not always reset #20

YaLTeR opened this issue Aug 25, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@YaLTeR
Copy link
Owner

YaLTeR commented Aug 25, 2021

Pointers are reset in Host_Shutdown(), however there's a code path in the engine that calls Memory_Init() and then exits out with an error without ever calling Host_Shutdown()—particularly, when it fails setting the OpenGL video mode and displays an error dialog with a button to restart in Software (specifically, this is not due to GL_SetMode() failing, because that happens before Memory_Init()). When this happens, pointers are not reset, which means that when sw.dll loads, all pointers that aren't found in it are kept as stale, invalid values. bxt-rs then crashes when trying to hook them.

To fix this, we need to figure out how this early exit can happen and reset pointers there too.

@YaLTeR YaLTeR added the bug Something isn't working label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant