Page 1 of 1

RandomSpawner Crash with No Monsters DMFlag

PostPosted: Mon Sep 07, 2015 12:39 pm
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.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Mon Sep 07, 2015 1:06 pm
by Graf Zahl
There's obviously a NULL pointer check for the class missing, caused by passing a non-existent class name.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Mon Sep 07, 2015 4:14 pm
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 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
    }
}

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Thu Sep 17, 2015 7:03 am
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).

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Thu Sep 17, 2015 7:53 pm
by Major Cooke
Alright, it might take a bit for me to bundle it all up together. Hang in there.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sat Sep 19, 2015 7:10 am
by Major Cooke
Sent you a PM, mental.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sat Oct 10, 2015 6:13 am
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.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sat Oct 10, 2015 8:12 am
by Graf Zahl
No, nothing wrong with it, but you should have posted a note here right away.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sun Oct 11, 2015 5:30 am
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.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sun Oct 11, 2015 7:53 am
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.

Re: RandomSpawner Crash with No Monsters DMFlag

PostPosted: Sun Oct 11, 2015 8:13 am
by Major Cooke
FINALLY. Now I have proof to show others they NEED to do this. Thank you Graf!