I suspect that the path forward involves a lot of commenting out big chunks of code and narrowing down which rule is causing the error, but I was kind of hoping that someone has a more direct suggestion.
What I’ve found, having reached a point in development where I want to verify that what I’ve written lately is actually doing what it’s supposed to even when I’m out of the room, is that a lot of the internal “not for release” commands documented in Writing with Inform 24.2–4 cause the interpreter to lock up completely. This is true both in the Inform 7 IDE, using both Git and Glulxe as interpreters, and in both Gargoyle and Glulxe-with-CheapGLK in a terminal, if I test using a “Release for Debugging” .ulx
build. In some cases, when running in the Inform IDE, the 'terp locks up so badly that the Inform IDE itself becomes non-responsive—this happens with both Git and Glulxe at the back end, and most frequently when I try to use the “Stop” button after the interpreter has locked up.
What does work, rather than locking up the interpreter:
-
TEST [a test script]
(thank goodness) -
ACTIONS
(andACTIONS OFF
) -
RULES
(andRULES OFF
) -
SCENES
(andSCENES OFF
) RANDOM
RELATIONS
-
RESPONSES
(andRESPONSES ALL
) VERIFY
-
TREE
(but see below) SCOPE
SHOWVERB [a verb]
SHOWHEAP
-
TRACE
(plusTRACE 2
throughTRACE 6
).
What locks up the interpreter:
-
SHOWME [object]
(whether or not there is any in-game object that the parser understands the[object]
text to match) PURLOIN [object]
ABSTRACT [something] TO [somewhere]
GONEAR [object]
TREE [object]
Debugging commands that cause different problems:
-
SHOWVERB
with no verb name crashes the interpreter immediately. In Glulxe-on-CheapGLK, it gives the “Glulxe fatal error: Memory access out of range,” followed by what I take to be a hex memory address, and then exits with exit value 1. If running in the Inform 7 IDE, the Inform 7 IDE itself segfaults. (I have anstrace
log of this happening if this is helpful.)SHOWHEAP
right before doing this shows that the heap is more than 99% free, so I don’t think it’s an out-of-memory error.
In short, it seems that any of these Old High Magic commands fail in this case whenever they try to identify an in-game object.
I’ve tried tracing through the relevant actions and rules with ACTIONS
and RULES
, but this hasn’t helped: when I run the debug release in Glulx with CheapGLK, to avoid text buffering between outputs, and it does in fact tell me the name of a rule being processed right before the lock-up … but what I find is that if I comment out that rule, then try again, the 'terp will still lock up on a previous rule. And if I comment out that previous rule, why, the 'terp will still lock up on some other rule.
A search ran across this old thread, and tried commenting out the single instance of scope-changing in the game, but that didn’t solve the problem.
So I am mystified, and am probably just going to start commenting out big chunks of code until I eliminate the problem, then try to narrow it down from there. But I’m kind of hoping that someone else may have run across something similar before, and has a suggestion for where to start aside from that.