LemADEC / WarpDrive

A warp drive mod for minecraft
71 stars 40 forks source link

OpenComputers GPU lost(?) after chunk reloading or jump #265

Closed nosknut closed 6 years ago

nosknut commented 7 years ago

After a jump the computer stops operating, cant b ineracted with and must be rebooted with the power button inside the commputercase

LemADEC commented 7 years ago

Please specify which mods version are involved. Try previous versions of OpenComputers too. Also, specify which LUA scripts you are using for which blocks.

Le jeudi 25 mai 2017, nosknut notifications@github.com a écrit :

After a jump the computer stops operating, cant b ineracted with and must be rebooted with the power button inside the commputercase

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LemADEC/WarpDrive/issues/265, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjgYHqYWpYLkOOlDaf3w2xFXTLGIVX2ks5r9UAjgaJpZM4NmHnK .

nosknut commented 7 years ago

OpenComputers-1.6.2.12 WarpDrive-1.3.30 Scripts: not anything speceal. just using the dimmension and movement "settings" ans calling jump() and after jump the computer freezes

Elanis commented 7 years ago

Same bug here. OpenComputers-1.6.2.12 WarpDrive-1.3.30

We're using the basic script given with ship controller in /mnt/

LemADEC commented 7 years ago

I heard of 2 bugs in OpenComputers: 1- display doesn't reconnect properly with OpenOS after reloading chunk or jumping 2- function pointers are lost are reloading chunk or jumping The latest is preventing you to change pages or see it refreshing. The only workaround I have access to is to "reset the computer after each jump". Some players have patched their OpenOS but didn't share the fix as of now.

nosknut commented 7 years ago

If you change the openos version to one that works during load of the mod, that should do it.

LemADEC commented 7 years ago

Again, nobody shared the fix for it.

nosknut commented 7 years ago

Change the openos version. Thst is the fix

nosknut commented 7 years ago

I just did

LemADEC commented 7 years ago

Change to what version?

nosknut commented 7 years ago

1.5 should be fine

LemADEC commented 7 years ago

1.5 of what the mod or the OpenOS script?

nosknut commented 7 years ago

mod OpenComputers

nosknut commented 7 years ago

but i am pretty shure just changing the openos version from 1.5 should fix it too

teevik commented 7 years ago

@nosknut Is it fixed then?

KyeDuo commented 7 years ago

ok....here is my examination of this. Breaking and replacing the screen updates it and reveals that the OC goes back to the basic OS after jumping, the program state isn't preserved. you can restart the program by running it without restarting the computer

nosknut commented 7 years ago

dossent mean that the problem is solved

KyeDuo commented 7 years ago

@nosknut just trying to help with more information

LemADEC commented 7 years ago

As far as I know, function pointers are lost during the reloading, which prevents updating the pages or handling key strokes in the mod provided LUA scripts. It's a regression in OC 1.6. Multiple players say they have a patch for it, nobody shared it.

KyeDuo commented 7 years ago

@LemADEC once you replace the monitor the computer works fine.

NovaLynxie commented 7 years ago

Well after a lot of searching, it finally comes to an end. The bugs mentioned by LemADEC describes what I've experienced with Opencomputers after every jump.

I heard of 2 bugs in OpenComputers: 1- display doesn't reconnect properly with OpenOS after reloading chunk or jumping 2- function pointers are lost are reloading chunk or jumping The latest is preventing you to change pages or see it refreshing. The only workaround I have access to is to "reset the computer after each jump". Some players have patched their OpenOS but didn't share the fix as of now.

Has there been any news of a fix for this yet? Also if it's possible, where can one retrieve the older version of OpenOS, such as v1.5?

LemADEC commented 7 years ago

You can install an older version of OpenOS 1.5, put it on a floppy, reinstall latest OC and install from that 'golden' floppy. Or just stick to the older version of OC Or convince them to fix the bug

nosknut commented 7 years ago

Replacing the screen wont fix it. The computer must be rebooted.

KyeDuo commented 7 years ago

@nosknut it works for me, you have to restart the program

nosknut commented 7 years ago

Aka rebooting the computer

nosknut commented 7 years ago

Wich can only be done manually

KyeDuo commented 7 years ago

@nosknut restarting the program =/= rebooting the comp steps: break screen replace screen go to home directory if not already there run the startup file may be faster than rebooting the comp depending on tool

nosknut commented 7 years ago

The point of using oc is automation and remote applications

nosknut commented 7 years ago

If manual action is required, its no longer a remote application is it ....

LemADEC commented 7 years ago

OC team was able to reproduce it here apparently: https://github.com/MightyPirates/OpenComputers/issues/2503

LemADEC commented 7 years ago

Probably related with https://github.com/MightyPirates/OpenComputers/issues/2302 which provides a LUA patch

LemADEC commented 7 years ago

@KyeDuo @nosknut can you guys confim the LUA patch fix the issue for you?

nosknut commented 7 years ago

changing to a prevous openos makes it work again

KyeDuo commented 7 years ago

as written, that code doesn't work to fix this problem. and using openOS 1.5 does not work with the beta branch WD. the code will appear to run, but it crashes every time you try to access one of the programs functions. edit: ok...further testing with servers and remote terminals allows a sort of work-around....it still gets the number keys options don't update the screen when you jump/restart world issue, but it does still work...will test out more and provide information. edit 2: server/remote terminal doesn't need the code to behave as described. edit 3: it seems that the ships position doesn't get updated on the screen when you use a server....I'll try to add in a manual refresh trigger for the main screen....If I can figure out how.

LemADEC commented 7 years ago

There's already a timer to refresh the screen every few seconds, it might be bugged by OC during chunk reloading. I wonder if there's an easy way to detect the bug from LUA, that way we could force a computer restart to recover.

KyeDuo commented 7 years ago

the screen still refreshes, but the coords don't update. The core cool down finished text does come up and leave in the remote terminal after a jump without rebooting. considering it almost always bugs out after a jump, perhaps a timer tied to the jump warmup timer so that it will reload every time, after it jumps.

LemADEC commented 7 years ago

Cooldown showing up means GPU is still accessible and events are working, somehow. Coordinates not updating could be intended in WD LUA itself, I'll have to check.

It also gets stuck on chunkloading, hence the need to detect it.

KyeDuo commented 7 years ago

the server working, mostly, may be because the screen and kb are virtual and something about a real one screws it up. I wonder if a pause in the program while jumping would do anything. Maybe a pause with a reconnecting the screen.

LemADEC commented 7 years ago

OpenComputers was updated with some fixes regarding GPU handling at chunk loading. Try it out, see if it fixes that one.

KyeDuo commented 7 years ago

it is a dev build right now. I will wait till it is a formal release.

KyeDuo commented 7 years ago

ok, tried out the new one, didn't fix it. still locks up after jumping, even tried with the new open OS.

LemADEC commented 7 years ago

Sadly, they've closed all tickets related to the issue. I've added comments, let's see if we need to reopen one.

payonel commented 7 years ago

Hello all, OC dev here I'm happy to continuing working on fixing this issue, I just need a new ticket with some ambiguities clearly resolved. There have been numerous bugs that sound similar but were actually due to different issues. I have a list of some of the things I need clarified in my last comment this OC issue: https://github.com/MightyPirates/OpenComputers/issues/2503#issuecomment-339150077

Thanks!

LemADEC commented 7 years ago

new issue have been created here: https://github.com/MightyPirates/OpenComputers/issues/2598

LemADEC commented 6 years ago

Issue has been confirmed in an OC dependency here: fnuecke/eris#29 Now that we understand better what's going on, I should be able to add a workaround for it.

payonel commented 6 years ago

@LemADEC

As far as I know, function pointers are lost during the reloading

I just want to point out (as I did in the OC and eris bug reports) that it isn't the function pointers, but instead the upvalue reference to a local variable shared between global and local functions - which isn't a good choice, but also probably unintentional I would consider the selectPage function improperly (implicitly) declared global, and should be local -- which also saves you from this bug

LemADEC commented 6 years ago

selectPage was initially local but wouldn't always work, forgot to comment on why it's global. I'll have to redo some test, and remove that ugly hack.