[Fixed] RandomSpawner Crash with No Monsters DMFlag

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Mon Sep 07, 2015 12:39 pm

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
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Graf Zahl » Mon Sep 07, 2015 1:06 pm

There's obviously a NULL pointer check for the class missing, caused by passing a non-existent class name.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Mon Sep 07, 2015 4:14 pm

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 allExpand view
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
    }
}
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: RandomSpawner Crash with No Monsters DMFlag

Postby _mental_ » Thu Sep 17, 2015 7:03 am

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).
_mental_
 
 
 
Joined: 07 Aug 2011

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Thu Sep 17, 2015 7:53 pm

Alright, it might take a bit for me to bundle it all up together. Hang in there.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Sat Sep 19, 2015 7:10 am

Sent you a PM, mental.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: RandomSpawner Crash with No Monsters DMFlag

Postby _mental_ » Sat Oct 10, 2015 6:13 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Graf Zahl » Sat Oct 10, 2015 8:12 am

No, nothing wrong with it, but you should have posted a note here right away.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Sun Oct 11, 2015 5:30 am

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
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Graf Zahl » Sun Oct 11, 2015 7:53 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: RandomSpawner Crash with No Monsters DMFlag

Postby Major Cooke » Sun Oct 11, 2015 8:13 am

FINALLY. Now I have proof to show others they NEED to do this. Thank you Graf!
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007


Return to Closed Bugs

Who is online

Users browsing this forum: MauiBot and 0 guests