RandomSpawner Crash with No Monsters DMFlag

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.
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

A monster that drops a randomspawner, which in turn drops a custominventory item, for example, will cause a crash.
Spoiler: Here's where it crashes
I'm just trying to have a monster drop a random custominventory item, but when the "no monsters" flag is on, it crashes. If it's off, it doesn't.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48377
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Graf Zahl »

There's obviously a NULL pointer check for the class missing, caused by passing a non-existent class name.
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

It's strange, because the class isn't actually missing. No warnings of missing actors are thrown at all.

I copied and pasted all the names into the search through my mod files, and they match it perfectly.

Code: Select all

Actor AECyberWeaponDropper : RandomSpawner
{
	DropItem "AEoDRocketLauncherItem" 255 60
	DropItem "AEoDDevastatorItem" 255 50
	DropItem "AEoDMorserLauncherItem" 255 40 //Yes, this is spelled correctly.
	DropItem "AEoDHERocketLauncherItem" 255 30
	DropItem "AEoDPenetratorItem" 255 20
	DropItem "AEoDRedeemerItem" 255 15
}

//==================================================================================
//==================================================================================

//==================================================================================
//==================================================================================
ACTOR AEoDMorserLauncherItem : CustomInventory 6054
{
    +FLOORCLIP
    +INVENTORY.IGNORESKILL
    Scale 0.375
    Inventory.Amount 1
    Inventory.PickupMessage "You picked up the Mortar Launcher!"
    Inventory.PickupSound "reilsss/weappickup/heavyrocketlauncher"
    States
    {
    Spawn:
        R032 Q -1
        Loop
    Pickup:
	TNT1 A 0 A_JumpIfInventory("AEoDMorserLauncher",1,"Ammo")
	TNT1 A 0 A_JumpIf(CallACS("WeaponSlotLimitCheck",8) <= 0,"Nothing")
	TNT1 A 0 A_GiveInventory("Weapon8Count",1)
	TNT1 A 0 A_GiveInventory("MorserLauncherDrop",1)
	TNT1 A 0 A_GiveInventory("AEoDMorserLauncher",1)
	TNT1 A 0 //ACS_NamedExecute("s799",0,10,0,0)
	Stop
    Nothing:
	TNT1 A 0 A_JumpIfInventory("AEoDMorserLauncher",1,"Ammo")
	TNT1 A 0 A_JumpIfInventory("LimitScriptActive",1,1)
	Goto Pickup+2
	TNT1 A 0 ACS_NamedExecute("s798",0,8,0,0)
	Fail
    Ammo:
	TNT1 A 0 A_GiveInventory("AEoDMorserLauncher",1)
	Stop
    }
}
_mental_
 
 
Posts: 3787
Joined: Sun Aug 07, 2011 4:32 am

Re: RandomSpawner Crash with No Monsters DMFlag

Post by _mental_ »

I can take a look at this crash, but I need exact steps to reproduce including PWAD(s) you are using (or some test PWAD).
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

Alright, it might take a bit for me to bundle it all up together. Hang in there.
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

Sent you a PM, mental.
_mental_
 
 
Posts: 3787
Joined: Sun Aug 07, 2011 4:32 am

Re: RandomSpawner Crash with No Monsters DMFlag

Post by _mental_ »

Made a pretty straightforward fix for this crash three weeks ago.
Maybe it was missed for some reason. Please comment if something wrong with it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48377
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Graf Zahl »

No, nothing wrong with it, but you should have posted a note here right away.
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

Thus let it be known to people who claim "it doesn't matter if we post it on the forums or not, because they get a pull request email notification" that "it doesn't matter" part is bullshit.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48377
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Graf Zahl »

Of course it's bullshit. If you get pull requests for several projects where you are only a minor contributor you tend to move them to the trash in bulk (i.e. by automated settings.

Start a discussion on Github and it's very likely I'll miss it.

This forum should be the central hub where bugs and feature requests should be discussed.
User avatar
Major Cooke
Posts: 8096
Joined: Sun Jan 28, 2007 3:55 pm

Re: RandomSpawner Crash with No Monsters DMFlag

Post by Major Cooke »

FINALLY. Now I have proof to show others they NEED to do this. Thank you Graf!

Return to “Closed Bugs [GZDoom]”