Save Game crashes GZDoom

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Save Game crashes GZDoom

Post by Tormentor667 »

Take a look at the public beta to test this directly:
http://forum.zdoom.org/potato.php?t=15110
When I play the map after getting the Moon Key and after launching script 3, I can't save anymore and GZDoom crashes (when I actually save). Others have the problem as well, and I have no idea if it is a GZDoom bug or a map bug :(
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia

Post by Nash »

Crash report, hopefully helpful.
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

The crash appears to be caused by an invalid skybox viewpoint actor. I have fixed the immediate cause of the crash but if a skybox is removed by force it may have other ugly effects. Better check that in the map.
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

I think I have an idea why this crash is actually happening....
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

Ok, please tell me if you find it.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia

Post by Nash »

So Torm, what exactly was the cause?
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

No... I just thought that I removed the skybox thing in some script or linedef but that didn't solve the problem. Here is the latest file and I still have no idea what's the cause:
http://rapidshare.com/files/65881001/tc ... a.zip.html
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

Okay, I got a bit closer. The problem seems to have something to do with one of the following 3 scripts but I can not determine which one's the evil one so here are all three:

Code: Select all

//SIREN SCRIPT
script 3 (void)
{
	SetMusic("D_NONE", 0, 0);
	AmbientSound("AMB30",255);
	delay(10*35);
	//acs_execute(333, 0, 0, 0, 0);
	Light_Fade(10, 40, 140);
	Thing_Deactivate(7);
	AmbientSound("LIGHTOFF",80);
	delay(35);
	Thing_Deactivate(8);
	AmbientSound("LIGHTOFF",80);
	delay(35);
	Thing_Deactivate(9);
	AmbientSound("LIGHTOFF",80);
	delay(35);
	thing_activate(12);
	delay(15*35);
	thing_spawnnofog(10, 247, 0, 11);
	thing_hate(11, 99, 4);
	delay(24*35);
	fadeto(0,0,0,1.0,5.0);
	delay(2*35);
	Thing_Deactivate(12);
	thing_remove(11);
	delay(4*35);
	thing_remove(11);
	delay(4*35);
	thing_remove(11);
	delay(2*35);
	thing_remove(11);
	fadeto(0,0,0,0.0,3.0);
	if (noaccess==0)
     {
           delay(1);
     }
     else
     {
           noaccess=0;
           delay(20);
           ambientsound("DSUHI", 90);
     }
	delay(10*35);
	acs_execute(255,0,0,0,0);
	Light_Fade(10, 200, 140);
	Thing_Activate(7);
	AmbientSound("LIGHTON",120);
	delay(35);
	Thing_Activate(8);
	AmbientSound("LIGHTON",120);
	delay(35);
	Thing_Activate(9);
	AmbientSound("LIGHTON",120);
	
	//Randomized Delay before Restart
	delay(random(360*35, 540*35));
	restart;
}

Code: Select all

//First Alarm
script 42 (void)
{
	thing_spawn(46, 219, 0, 99);
	thing_hate(99, 45, 6);
}

Code: Select all

//Countdown
script 53 (void)
{
	noaccess=1;
	delay(25*35);
	acs_execute(52,0,0,0,0);
}
Feel also free to take a look at the ingame scripts. The second script 42 is not that complicated so I doubt that it is responsible for the crash. LEft are the others.

I can save and load without any problems until I reach the passage where these 3 scripts were activated. When I save and load again, GZDoom crashes without a message.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

a) what's in script 52
b) the only potentially dangerous things in there are the Thing_Hate calls I'd say. You should try to eliminate those as the cause first. Maybe some thing has an incorrect tid and gets accidentally hated which could have bad effects for non-monsters.

If that doesn't help, reduce the scripts until you can pinpoint the cause.
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

Code: Select all

//Teleport and Stuff
script 52 (void)
{
	thing_remove(63);
	ambientsound("DSXHIT", 127);
	delay(10);
	fadeto(0,0,0,1.0,0.1);
	delay(15);
	doorclosed=1;
    Ceiling_LowerToFloor(11, 2);
    teleport(64);
    //thing_move(99, 64);
    thing_spawn(65, 216, 192, 133);
    thing_activate(69);
    setlinespecial(76, 80, 76, 0, 0, 0, 0);
}
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

Some explanation on the Thing_Hate stuff, maybe that's the cause for this: I have a script that assigns the Thing ID 99 to each player in the game that looks like this:

Code: Select all

//GIVE PLAYERS THING ID 99
script 300 ENTER
{
    Thing_ChangeTID(0, 99);
}

script 301 DEATH
{
    Thing_ChangeTID(0, 0);
}

script 302 RESPAWN
{
    Thing_ChangeTID(0, 99);
}
The spawned Nightmares hate exactly these TIDs (the player and some cultists). Maybe that's the problem?

Removing this code doesn't change anything, same goes to commenting out the Thing_Hate in script 3 :(
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

OK, since it's your map and you think it's related to one of these scripts, just comment out everything you suspect to be the cause and check if the map still runs. After that re-comment the code back in piece by piece and see what code being re-enabled causes the crash.
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

Finally!
After 3 hours of testing I found both bugs that were responsible for the crash. The first bug was the removal of 2 portal things through the script that wasn't intended, a TID conflict in this case. This made the savegames crash when you try to save the game after the first siren (things with tid were removed).
The second crash was due to a buggy DECORATE code for the Fleeing Cultist. His Melee state was not available and as soon as he reached the hate target in the shelter, he tried to attack and that made the game crash as well.
So, no GZDoom bug here but a better report of what has happened would have been better for me :P *hint* :)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Post by Graf Zahl »

Good to know. The first one is fixed. The engine forgot to NULL the skybox pointers in the sectors when the viewpoint was removed. That won't crash anymore.

The second one shouldn't crash either. Do you have a crash log of that one?
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Post by Tormentor667 »

Well, actually not, GZDoom crashed without any report, just returned to Desktop

Return to “Closed Bugs”