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

Multi-threading console lua leads to crashes #12

Closed
Vurv78 opened this issue Jul 26, 2021 · 2 comments · Fixed by #14
Closed

Multi-threading console lua leads to crashes #12

Vurv78 opened this issue Jul 26, 2021 · 2 comments · Fixed by #14
Labels
R-Bug Something isn't working S-High Severity: High

Comments

@Vurv78
Copy link
Owner

Vurv78 commented Jul 26, 2021

Edited: tdlr, I'm stupid and trying to run lua on a different thread which 'randomly' causes crashes

@Vurv78 Vurv78 added R-Bug Something isn't working S-High Severity: High labels Jul 26, 2021
@Vurv78 Vurv78 changed the title Lua stack corruption?!? Multi-threading console lua leads to crashes Jul 26, 2021
@Vurv78
Copy link
Owner Author

Vurv78 commented Jul 29, 2021

Since painttraverse is a pain in the ass I might just add a hook to the menu state that calls a c function where lua will be handled instead. Seems like it will work.

@Vurv78
Copy link
Owner Author

Vurv78 commented Jul 29, 2021

And I can't think of what to do about hooking newstate as it is much better than constantly checking and setting the lua state in loadbuffer but it wouldn't support for injecting autorun mid-menu screen. Will probably have to revert as to how it is on master and eventually replace it with LUA->GetState through vtable shit.. (still dunno how to work pelite and memflow)

@Vurv78 Vurv78 closed this as completed in #14 Aug 2, 2021
Vurv78 added a commit that referenced this issue Aug 2, 2021
Fixes #12

* -lua_run
* -lua_openscript
* +lua_run_cl
* +lua_openscript_cl
* +lua_run_menu
* +lua_openscript_menu

I can add lua_run/lua_openscript back but won't be adding it right now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R-Bug Something isn't working S-High Severity: High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant