This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Paul17041993's profile picture

[CC1.65] Computer reboots on movement via frames

Started by Paul17041993, 17 December 2014 - 02:39 AM
Paul17041993 #1
Posted 17 December 2014 - 03:39 AM
VERSION:
1.65 for mc 1.7.10

DESCRIPTION:
When a computer is running a script, if it is moved by a frame machine of some sort, it will restart and loose it's progress in the script, but not shutdown however, nor print any errors in the console.

EXPECTED RESULT:
The computer should continue the script as normal, possibly pausing while the computer is mobile and resuming when back in the world. This worked perfectly in the days of Redpower2.

REPRODUCTION STEPS:
Funkylocomotion, CC and a mod to power the frame machine.
> a bit of frame, something to move it and a computer attached
> code a script (not startup) to do something in a loop, eg; " while true do print("test") end "
> run said script
> move frame at least a block in any direction, moving the computer with it
> observe the computer is nolonger running the script


I have no idea really what was changed in CC's backend to develop this issue, and/or whether Redpower2 frames were doing some other trickery to trick the VM to keep the computer running, if there's some extra calls required for correct functionality then list them and I'll forward to the FunkyLocomotion dev.
Bomb Bloke #2
Posted 17 December 2014 - 08:14 AM
This thread may be worth a read, jakj's post in particular.

In a nutshell, it worked the way you're asking for in RP2 because Eloraam did indeed perform some "trickery" (which had side-effects, and may or may not be possible to perform under later versions of MineCraft). Apparently the only other way it's going to happen is if ComputerCraft computers gain the ability to retain their state after being reloaded (something which is unlikely to happen in the near future, if ever).

To memory, movement via frames had a side-effect in that the computers would not be aware of their new location - causing issues when they attempted to work with other blocks (communication over wireless networks, in particular, being the specific issue I remember seeing posts about). It was a good idea to reboot computers moved by frames manually anyways, or use turtles instead (which could move themselves).

To my understanding, OpenComputers systems should not reboot when moved by frames or similar.
theoriginalbit #3
Posted 17 December 2014 - 08:42 AM
To my understanding, OpenComputers systems should not reboot when moved by frames or similar.
they would also be susceptible to the location based issue however.
Paul17041993 #4
Posted 17 December 2014 - 11:27 PM
should the instance not be retained due to the VM still being loaded? and for positional errors shouldnt the machine's entity variables be checked and updated accordingly on an update?