VorpleStartPlaylist() causing I6+Vorple to freeze? What am I missing here

EDIT: I think it’s a bug in VorpleStartPlaylist() and I think I sorted out the fix. See the next reply in this topic for details.

VorplePlaySoundEffect() works fine, but VorpleStartPlaylist() causes the interpreter to freeze outright, no error, no console output. Perhaps I’m setting up the table incorrectly? Please advise :slight_smile:

Online example showing the problem, type “sing” to hear a sound, type “jump” to crash the terp:
Vorple Sound Test

The source code:

Constant Story "Hello, Inform 6 Vorple World";
Include "vorple.h";
Include "parser.h";
Include "verblib.h";
Include "vorple-multimedia.h";
Include "grammar.h";

Array jump_table table 1;
Array sing_string string "sing.mp3";

[ Initialise ;
    location = room;
    jump_table-->1 = "jump.mp3";

Object room "The Room"
    with description "You're in a nondescript room.",
    before [;
        "Command successful.";
        "Command successful.";
has light;

[ JumpRoutine;
  VorpleStartPlaylist(jump_table, PLAYLIST_FROM_START);

[ SingRoutine;


After the call to VorpleStartPlaylist, no more output, no more input…

Best I can tell, the following snippet in the VorpleStartPlaylist causes the terp to hang:

    for (i=0: i<len: i++) {
        print "'"; print (string) VorpleEscape(playlist-->i); print "',";

…and if I change it to the following, the problem goes away:

    for (i=0: i<len: i++) {
        print "vorple.options.resource_paths.audio+'";
        print "',";

print (string) really doesn’t like the return value of VorpleEscape, while VorpalEscape understandably likes playlist–>(i+1) a lot more than playlist–>i

I’m new to this community, I don’t know the process or the etiquette for raising the possible bug and/or the possible solution. I’ll look into that next.

Posted issue here: