No, what I was really getting at is that there is something stuck in the regions list, possibly in a script that has been disposed (i.e. a dangling pointer). If so, the next step would be to find out what that is (check before entering the faulty room). From the debugger. press 'g' (inspect global variable) and select number 6. Then press 'c' to step through the list. Then repeat after the crash dumps you in the debugger. (oh, but I don't think it does, does it?)
Yes, if you launch SCIV.EXE with "-d" it'll drop you into the debugger on a crash before it exits to DOS. That's how I got that send stack list. I'll do that.
The only regions I have in the game are waterRegions and beachRegions. The game starts off on a screen on the beach so right off the bat you're in a region. The BeachRegion is used to control ego's change in view resources as he moves deeper into the water until he's swimming via control colours painted into the Picture. It also has custom said statement responses. waterRegions are the same except they don't have unique said statement handling and they don't handle control colours that get deep enough to swim in.
I tested navigating through the game and avoiding all waterRegions to enter the room that crashes and it still crashes.
Also, global variable 6 in my game's case is gIntro (the introduction sequence). gRegions is number 8, is that the right one? It just says "regions" when I look at it in the debugger both before and after the crash.
I tried removing the setRegion line in the first room and then navigating to the crash room and it still crashes. gRegions still says "regions" in debugger.
Come to think of it, if you have leftover files from the SCI Studio era, you may need to delete some of them to make sure you are really compiling from scratch. Some variable numbers were out of sync between Brian's template game and the SCI Companion one (the current room number being a notable example; the usual methods for room teleportation didn't work with Studio games).
Ok, which files should I delete? Does it not convert over every script in the game to Sierra Script when making the conversion?
EDIT: This seems to be inconsistent. Before I distinctly remember removing the setLocales line in the previous room would avert the crash. Now it's crashing regardless but it's giving a different error this time: "$52" instead of "$4e". I even removed all regions and locales from the beginning of the game to the crash room and it still crashes. Same send stack. I've recompiled a few times since so this may point to a compilation error of some kind after all?
EDIT 2: Something residual is definitely going on. I just painstakingly removed all lines of code that sets regions and locales and it still crashes on this one room alone with the same error. No regions or locales anywhere in the game.