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

[CC1.481] [SMP]Programs exiting to command line without error or terminate message

Started by nitrogenfingers, 09 February 2013 - 08:40 PM
nitrogenfingers #1
Posted 09 February 2013 - 09:40 PM
ComputerCraft Version Information: CLIENT: 1.481, SERVER 1.481, with RP2 installed

Description of Bug:
Using a custom term redirection program that outputs both to a terminal and an attached monitor, when operating programs, occasionally programs will quit to the command line, without stopping the terminal redirection. No error message or "terminate" is provided, and it is not tied to program logic, as the point of execution appears random.



Steps to Reproduce Bug:

Some experimentation with the bug suggests using programs that require large amounts of drawing be done in short spaces of time (scrolling edit too quicky, dragging the brush tool with NPaintPro etc.) is the best way to reproduce the bug.

1. Install and execute this program on an advanced computer: http://pastebin.com/bxptSxDN. The bug environment was adjacent to a 8 x 5 monitor.

2. Execute a program like paint or edit, and force the program to perform a large number of draws by dragging the mouse around or scrolling with a key pressed down. Operating NPaintPro with the brush tool and dragging quickly was one sure way to make this occur.
Lyqyd #2
Posted 12 February 2013 - 08:47 AM
To be honest, this sounds like a lua code bug. Have you tried using debug prints to an attached monitor to see if any specific portion of the code is causing issues? I know I had a hell of a time with a couple bugs while making LyqydOS. :)/>

Edit: For instance, should line 47 be using ldh instead of ldw? I don't imagine this is really the problem, though.
MudkipTheEpic #3
Posted 12 February 2013 - 11:33 AM
I normally find that when using the parallel API, and the function has a bug in it, the computer shuts down. Try debugging by not paralleling it and just run the function. Just my 2 cents… ;)/>

Edit: The pastebin link is broken, are you using the parallel API, or overriding term calls? Too much work per term call can do that sometimes. Other then that, I have no idea.

Edit for Edit: so the program is overriding the term calls. That might be the problem. I find that when using that kind of program, like multishell, programs take a long time to draw. Maybe a hidden "too long without yielding" in the term call? If term errors, (I think) the computer shuts down or the program exits..
Edited on 12 February 2013 - 10:42 AM
Lyqyd #4
Posted 12 February 2013 - 12:00 PM
No, this redirection script is fairly lightweight. Many of the yielding problems that fancier things run into are due to buffer manipulations, and are triggered when dealing with large sections of term operations. This doesn't override term, per se, it simply redirects it. There's no problem at all with redirection itself.