Thanks for the extra info.

I haven't gotten to the crash code yet. The crash happens much later than I expected, so I set a breakpoint at what seems to be the guilty function, which I call Play(). It handles init of a channel and starts playback. BUT ...

I'm dealing with another issue: the debug module is enforcing assignment of the error code to a variable in the INI_SETKEY command. That is, it throws an "expecting a =" error. I assume that means I have to reform those lines to

local succeed as dword
succeed = INI_SETKEY(blah blah blah)

Only debug in 1.9.7.0 enforces this. I know that it's good practice to check these sorts of actions, but I think this requirement is excessive.

But anyway, I'll fix it and eventually get to my crash condition.