Breaking Inky out of an infinite loop

As I continue to find my feet in Ink, I ran into an unfortunate situation. I’d created a fully intentional loop, with a choice in it: click this to go back to the main menu.

Then I accidentally deleted the + before that choice, creating an infinite loop without a choice.

At this point my laptop started to overheat as Inky consumed more and more CPU and RAM, running through the loop over and over, and the editor was unresponsive so I couldn’t put the + back in. I had to kill the process from the terminal, open the file in a normal text editor, and fix the mistake before opening Inky again.

Now, of course the best way to avoid this is just not to make that sort of mistake. But if it does happen due to user error (like by accidentally deleting a + and turning a choice into just another line of text), is there a better way to stop the interpreter? I know the Inform IDE provides a button to halt the interpreter if something goes wrong, but I haven’t seen anything like that in Inky.

5 Likes

It’s an Electron app, I believe, so in the version I have you can Control+Shift+i to open the developer tools… dunno if you could do something from there?

3 Likes

It is a known issue and it has not been adressed by anyone yet.

The underlining compiler (inklecate in its own subprocess) will be shutdown and relaunch everytime you type something in the ink source (left panel)

Just writing a random “~” in the ink source will result in a parse error and effectively stops it right there, giving you a chance to rewind everything and find the bug in your code.

If you’re a tech savvy linux user you may be able to find the abovementioned inklecate process and kill it

5 Likes