-
Notifications
You must be signed in to change notification settings - Fork 394
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
client.reboot_core() causes System.InvalidOperationException error #2571
Comments
Call stack (repro'd w/ 26fb9b9):
edit: I caused this regression with cf90175. |
I don't know if it is better to open another issue, but after getting this error and removing the lua from the lua console, trying to load any other working lua (which doesn't have client.reboot_core() inside its code) will always make you get the error. It is like BizHawk saves the previous lua exectution. |
…SEmulators#2571) Wrapping draw calls in DrawNew/DrawFinish is the responsibility of the script author. This removes the feature which allowed scripts to draw as soon as they became enabled.
fixes TASEmulators#2571 again `gui.DrawNew("native")` now throws (I will replace this with something better). `gui.DrawNew("emu")` and `gui.DrawFinish()` do nothing but print warning messages, for backwards compatibility. This removes the feature which allowed scripts to draw as soon as they became enabled. It also removes the feature to draw without clearing the surface, though that wasn't working (I will try to reimplement that as well).
fixes TASEmulators#2571 again `gui.DrawNew("native")` now throws (I will replace this with something better). `gui.DrawNew("emu")` and `gui.DrawFinish()` do nothing but print warning messages, for backwards compatibility. This removes the feature which allowed scripts to draw as soon as they became enabled. It also removes the feature to draw without clearing the surface, though that wasn't working (I will try to reimplement that as well).
fixes #2571 again `gui.DrawNew("native")` now throws (I will replace this with something better). `gui.DrawNew("emu")` and `gui.DrawFinish()` do nothing but print warning messages, for backwards compatibility. This removes the feature which allowed scripts to draw as soon as they became enabled. It also removes the feature to draw without clearing the surface, though that wasn't working.
* Refactor how the "emu" drawing surface is automatically opened/closed fixes #2571 again `gui.DrawNew("native")` now throws (I will replace this with something better). `gui.DrawNew("emu")` and `gui.DrawFinish()` do nothing but print warning messages, for backwards compatibility. This removes the feature which allowed scripts to draw as soon as they became enabled. It also removes the feature to draw without clearing the surface, though that wasn't working. * Reimplement drawing to "client" surface (see desc.) Changed surface names in APIs to "emucore" and "client" (not in DisplayManager yet because I can't be bothered). Via ApiHawk, `IGuiApi.WithEmuSurface(Action)` has been replaced with `IGuiApi.WithSurface(DrawingSurfaceID, Action)`, the first param being an enum. Via Lua (or ApiHawk), pass an extra string param (`DrawingSurfaceID` enum for ApiHawk) to each `gui.draw*` call. To make it less verbose, omitting the param is treated as using the default "emucore" surface, *unless* the helper `gui.use_surface("client")` had been called, which persists the chosen surface until Lua restarts or it's overwritten. (The same is done when using `WithSurface` in ApiHawk, though it's cleared once `WithSurface` returns.) Along with the new surface names, the old names are still valid in the `surface` params and `gui.use_surface` for now. * Propogate enum to DisplayManager, s/Lua/ApiHawk/ in DisplayManager
I just tested the last commit (253a24e) and the problem is still there. Game boot but the lua window always print the error causing a big lagging. |
actually properly fixes TASEmulators#2571 for real this time
Summary
When you run BizHawk and load any lua script with
client.reboot_core()
inside the code, it will make you get this error:Repro
Output
Host env.
The text was updated successfully, but these errors were encountered: