Jump to content




Program stops runnning


  • You cannot reply to this topic
4 replies to this topic

#1 serbaut

  • Members
  • 3 posts

Posted 25 April 2014 - 07:23 AM

I have a program feeding 20 MFR BioReactors that randomly stops running after a while. The program is not terminated, I have to terminate it with Ctrl-T.

It often (always?) seems to hang in a call to a peripheral.wrapped call to the BioReactor:
local stacks = br.getAllStacks()

I have tried different chunk loaders, closing off the area from Wrath Lamps but nothing helps. It stops even if there are players online.

Direwolf20 1.0.19 (ComputerCraft 1.57).

#2 serbaut

  • Members
  • 3 posts

Posted 25 April 2014 - 05:46 PM

Adding os.sleep(0.1) after the turtle has moved in position (just before the getAllStacks() call) seems to resolve the problem.

#3 CCJJSax

  • Members
  • 262 posts

Posted 25 April 2014 - 06:43 PM

Adding code will help us figure out more precisely what is going on with your code.

#4 serbaut

  • Members
  • 3 posts

Posted 25 April 2014 - 08:02 PM

https://gist.github....erbaut/11301320

It stopped at line 67 until I added the sleep at line 109

It has been running for a couple of hours now without any issues. Previously it stopped after a random time, up to an hour maybe.

If you want to try to reproduce the problem you need a set up like http://i.imgur.com/8QbdDwB.jpg


X X X X X
X X X X X
X X X X X
X X X X X
X X X X X
%

X = BioReactor
% = turtle on top of me interface facing north

You probably need at least 9 valid fuels in the ae system too.

Edited by serbaut, 25 April 2014 - 09:09 PM.


#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 25 April 2014 - 11:56 PM

I suspect there are some bugs related to peripherals in that build. Or perhaps in whatever mod is offering the peripheral functions for the reactor. Or perhaps both.

I found that I had a similar issue with Factorization barrels (using the same build). If I had the turtle move in front of one, wrap it and then start calling functions: I frequently got an error telling me that the "computer" was "not next to the peripheral" or somesuch. Sleeping for any amount of time before using the peripheral's functions dealt with that, and I suspect that's your only real option here.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users