Anyway, steps to reproduce: start hth2.zip in GZDoom, go directly to MAP02, activate the switch to open the cargo bay door, and you get a crash. At least, I do.
The MSVC debugger tells me it happens here:
Code: Select all
unsigned int FMODSoundRenderer::GetSampleLength(SoundHandle sfx)
{
if (sfx.data != NULL)
{
unsigned int length;
--> if (((FMOD::Sound *)sfx.data)->getLength(&length, FMOD_TIMEUNIT_PCM) == FMOD_OK)
{
return length;
}
}
return 0; // Don't know.
}
Code: Select all
script 90
// entry doors -90
{
if (x90 == 1)
{
x90 = 2;
wait(20);
setcamera(283, 12, 142, 0);
timedtip(200, "radio: sorry,\n the gargo doors are not at use.");
wait(85);
setcamera(152, 175, 140, 0);
wait(50);
//startsectorsound(42, "amb50");
startsectorsound(49, "amb50");
linetrigger(26731, 42); // Floor SR HnF Norm Txtr Num Up No
tagwait(42);
lightlevel(151, 232);
silentteleport(329, 42);
wait(100);
timedtip(350, "use this teleporting\n device to enter the complex");
wait(100);
clearcamera();
x91 = 2;
wait(250);
timedtip(5, " ");
}
}
So at this point I thought that maybe there was something wrong with the sounds from that wad. I copy the sound lump in a test wad, identified as "problemsound" in SNDINFO, and I use this custom actor to test in a ZDoom-compatible way:
Code: Select all
Actor ProblemCauser : SwitchableDecoration 1337
{
Activation THINGSPEC_Switch
Radius 16
Height 32
+SOLID
+USESPECIAL
States
{
Spawn:
Inactive:
BAR1 AB 6
Loop
Active:
FCAN A 0 A_PlaySound("problemsound")
FCAN ABC 4 BRIGHT
Goto "Active"+1
}
}
Then I did a test of HTH in GZDoom, but by cleaning my autoload to keep only lights.pk3 and brightmaps.pk3. A half-victory: I could play past the switch, and even past the teleporter, but it crashed with that same error when picking up one of the SSGs. Encouraged by this result, I tried with nothing in the autoload at all: no crash.
And there I just don't understand what's the actual culprit.
Attached is a crash report obtained by autoloading just brightmaps.pk3. But I also get a crash at the same place (just after the teleport) with just lights.pk3.