-
Notifications
You must be signed in to change notification settings - Fork 383
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
KopiLua IO should print a warning on first use #1677
Comments
see also #995 — try |
Hm... I tried LuaInterface a while back, but I haven't tested it for this specific issue. I had used it for a while but eventually turned it back off because I seemed to be running into the same memory leaks that caused KopiLua to be added as default in the first place. It didn't really seem especially prone to crashing per se, but that's only because my Windows "page file" (what Linux would call the swap) is big enough to turn memory issues into disk thrashing slowdowns instead of crashes. Still, I should probably check to see if this bug is reproducible under that engine. EDIT: Yeah, I just switched back to LuaInterface and it seems like this bug doesn't exist there. I was able to remove and restart a script without losing the ability to open its log file. |
I'm going to leave this duplicate open as a reminder to at least add a warning for the next release, if not remove NLua+KopiLua. Also move the engine selection to LuaConsole. |
Defaulting to NLua makes absolutely no sense at this point. |
we default to luaitnerface now |
Tested on 2.3.2
When I restart a script that uses a specific file (not generating a unique file name for each run) opened in "w+" mode, the file doesn't get initially truncated to a zero-length file like it's supposed to. If I manually delete it, it won't get recreated no matter how many times I restart the script, instead the file writes fail silently with no indication anything went wrong until I go to check on the file and it's not there. If I restart bizhawk then it will work.
I believe this is due to the file locks from the initial run of the script not getting cleaned up if the script is interrupted before calling
io.close()
, interfering with later runs of the script trying to open the file.This seems very closely related to #455, except it happened to me when a script was stopped and restarted, not when the whole lua console was closed. Since that bug looks like it was fixed by adding a line of code to the function that gets called when the window is closed (e281950), it's possible this is the exact same bug which was not sufficiently fixed for all cases. So it might make more sense to close this ticket and reopen that one, but IDRK.
The text was updated successfully, but these errors were encountered: