crash question

Hey all got a question for everyone. I am currently playtesting my game and have come across a bug, the problem is that I cannot really pinpoint if the bug lies in inform 7 or in the interpreter I am using to play the game (gargoyle). Here is what happens , if you are playing a saved game you get an error stating “Glulxe fatal error: reference to nonexistent Glk object” and the game crashes. This only happens with a saved game and as best I can tell it has something to do with sound files. Unless I figure out how to fix it I may have to scrap the ability to save your game which is not what I want to happen. Anyway if anyone has dealt with this issue before or has any suggestions then fire away

Pasting answer from newsgroup:

This is a bug in your program. Unfortunately it’s a bug that the
Inform IDE interpreter skips over silently, so you don’t see it until
you test on another interpreter. (This is a bad quality of the Inform
IDE interpreter, yes.)

You’re probably saving a sound channel reference in a global variable.
When you restore the game in a different session, no sound channel
exists with that address, so referring to it is an error.

There’s an Inform 6 hook to check the environment (right after a
start/restore/restart) and determine what sound channels exist, so you
can set up your globals correctly. Are you using an I7 extension to
handle sound data? Ideally the extension should handle this for you,
but I’m not sure what the state of the art is.

thank you for the quick response, I am using the extension Multiple Sounds by Massimo Stella.

think I have isolated the problem causer. With the extension you have a foreground and background channel to play sounds simultanioulsy. but you can also create a midground channel via a when play begins: create midground channel command. it is the midground channel sounds that cause the crash.

I haven’t looked at the extension yet, but that sounds right. Creating a channel without a way to recover it at restore time will cause this problem.