So I’ve got a bit of an odd one I’m having trouble chasing down.
I’ve got a Glulx Inform game (Inform v6.33 Library v6.12.1 S) that has a mainwin, mapwin and compasswin as well as a sound channel.
Everything seems to work fine except after I replay a command script, even one of only one command. After doing that, if I issue an “undo” command, Git and Glulxe report:
Reference to non-existent Glk object
Lectrote is, as expected more helpful, showing:
Quixe run: glk_get_line_stream: invalid stream
If I take the same command, I can type it in, hit and then type ‘undo’ and nothing untoward happens.
Now, I’ve protected, in my code, all references to my windows to make certain the pointers are non-zero before I access them, but I can’t chase this down.
Has anyone ever see anything like or care to take a guess as to the cause?
I’ve got a minimal example (attached) that demonstrates this. Sorry the extension is .txt, but it’s really an INF file. Getting around some forum foolishness that blocks INF files.
If it is compiled with -~D in any way, then it crashes when you type undo after inputting a replay file.
If you compile with -D and -S on, undo works fine, but of course I can’t release this way as things like “purloin” are still available.
So again, compile this way:
inform6.exe -G -~D -~S +include_path=./,E:/devl/inform/lib,E:/devl/inform/lib/contrib testgame.inf
then “undo” after a replay input is broken.
But compile this way:
inform6.exe -G -D -S +include_path=./,E:/devl/inform/lib,E:/devl/inform/lib/contrib testgame.inf
then “undo” works after replay input.
testgame.txt (1.25 KB)