Kerkerkruip dies in Quixe

If I try to play Kerkerkruip online using Quixe (link) then I get a fatal error:

Any idea what could be causing this?

The error console shows some app-proxy JSON errors, but I think that’s a red herring. (Under Safari.) Although it’s a couple of thousand JSON errors, so maybe somebody ought to look at that end of things.

The error console also shows a raw stack trace:

VM stack dump: 0x3c, 0xb7d3, 0x7a521, 0x7a521, 0xb81d, 0xc73, 0xdb9, 0x2a8, 0x7a3b9, 0x7a521, 0x7a521, 0x35a47, 0x7a3b9, 0x7a521, 0x16736, 0x8a8ee, 0x79ed0, 0x79814

If you compile with debug output, you should be able to figure out what functions these addresses correspond to. (You may have to re-run the i6 compile step by hand.)

The root cause of this error is essentially always a use of an uninitialized (or already-closed, or zero) value as a Glk window or stream. The IDE interpreter lets this slide, but it is an error and Quixe will catch it. (Yes, this is a bad state of affairs.)

Another way this might happen is to print text before any window is set as the current output stream.

(glk_put_jstring is an internal call which is used by many of the printing functions in GlkOte/Quixe.)