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
computer freezes after jumping with Warp Drive mod #2598
Comments
Using: In single player: Press Esc > Save and quit to title Press 1, expecting page changing => NOK, page does not change (1) Break/replace the screen The event (2) and pages (1) handlers are both implemented through an array of functions. local function page_register(index, callbackDisplay, callbackKey)
page_handlers[index] = { display = callbackDisplay, key = callbackKey }
end
local function event_register(eventName, callback)
event_handlers[eventName] = callback
end Event registry is a straight array of functions. According to players, using the legacy OpenOS (from OC1.5) with OC1.6 doesn't reproduce the issue. |
In other words, you don't need to jump, just reloading the chunk or restarting the game is enough. |
Issue is also reproduced:
|
Thanks for all the details! |
Any hope for a fix on this? |
this does repro for me, you provided a very simple repro, thank you I've confirmed all the components retain the same address, and no components are removed nor added to the system when the world reloads -- so proxies should be fine the part of the screen that correctly updates the percentages ... works, that's interesting I set up an all-events listener that sends modem messages to another machine, to monitor behavior when things go bad - i suggest using a similar methods to debug remotely :) |
for example, this rc program broadcasts all signals on port 1
Then i could use |
so while debugging ... the reactor core exploding and broke through the bedrock (i'm in a flatworld) ... and i fell to the nether? ... and lost the machines i was testing... anyways, that's not helping :) |
TLDR: make Side note: there is nothing used with the NOW FOR THE BUG
no warpdrive mod needed, just write a little script like this:
That's it Now, openos and all is still running just fun. Do a hard interrupt (alt+control+c) to abort the program, and you're right back to shell, everything is fine The issue appears to be that What is ALSO interesting to me, is that you can write code to detect the desync of the upvalues:
This shows us that the 2 global functions are sharing the SAME upvalue after the restore of the lua state, while the local functions are using a different one. So. .... are we going to fix this? Probably not at this time. I'll discuss this finding with others, but wow -- what a weird one. I'll leave this ticket open for now By the way, this isn't an issue with all local values captured in global functions Testing the warpdriveCommons.lua code, when I added a local table and tested its address in the global function and outside -- it was shared, while other local variables were not (specifically, |
This won't be fixed in OC (we don't handle lua state restore in our OC code) |
Nice catch! Sounds like changing the selectPage() method to local will change the refresh variable to only local usage, not global, hence working around the issue at hand. |
I use Warp Drive 1.3.34 for MC 1.7.10 with OC 1.7.0.1085 and Forge .1614 I get the following behaviors all in SP:
Using a T3 computer with T3 parts and screen the computer will seemingly freeze and become unresponsive after performing a warp jump of any distance. At the very least the screen freezes. Breaking the screen and replacing it will cause the program to reload restoring responsiveness.
Using a server, T3 parts, remote terminal and jumping, the number key tied commands will not update the screen but the program will still respond to the inputs. letter triggered commands still work fine and will update the screen.
First loading into the world also has this behavior.
The text was updated successfully, but these errors were encountered: