A case of infinite loop in A_BrainDie

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

A case of infinite loop in A_BrainDie

Post by Blue Shadow »

Tested with: 3.2.5 (64-bit)
Proposed fix


Here is the case: the boss brain spawns a RandomSpawner which spawns a BOSS- or BOSSDEATH-flagged monster. In this case, the spawner stays until the spawned monster dies (to call A_BossDeath). If the boss brain is killed while the spawner is around. A_BrainDie will try and kill the spawner (that is, if the sv_killbossmonst CVAR is set to true), only to fail in doing so, because RandomSpawners can't be killed. Basically, each time the engine iterates through the actors to kill, the spawner will always meet the conditions to trigger a loop to kill more monsters.

To test, run the attached file with Doom 2 on MAP30. Set the sv_killbossmonst CVAR to true. Wait for the boss brain to spawn a baron of hell. Kill the boss brain. Shortly after, the engine will lock up.
braindie.pk3
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A case of infinite loop in A_BrainDie

Post by Rachael »

Post Reply

Return to “Closed Bugs [GZDoom]”