[closed] Mysterious Crashing

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Deathsong12
Posts: 129
Joined: Mon Sep 05, 2005 22:31

[closed] Mysterious Crashing

Post by Deathsong12 »

Gr! GZDoom crashes with my upgradeable weapons!

[spoiler]

Code: Select all

ACTOR DSPunchDagger : PunchDagger -1
{
    Inventory.Icon "KNFEA3A7"
    Weapon.SelectionOrder 3900
    Weapon.AmmoType2 "DSKnives"
    Weapon.AmmoGive2 3
    Weapon.AmmoUse2 1
    Weapon.UpSound "Knife/Up"
    +MELEEWEAPON
    +NOALERT
    +ALT_AMMO_OPTIONAL
    States
    {
    Select:
      PNCH A 1 A_Raise
      Loop
    Deselect:
      PNCH A 1 A_Lower
      Loop
    Ready:
      PNCH A 0 A_JumpIfInventory ("KnifeXP",10,2)
      PNCH A 1 A_WeaponReady
      Loop
      PNCH A 0
      PNCH A 1 A_Print ("You've upgraded your Throwing Knives")
      PNCH A 1 A_GiveInventory ("DSPunchDaggerA")
      PNCH A 2 A_SelectWeapon ("DSPunchDaggerA")
      Goto Deselect
    AltFire:
      KNIF A 0 A_JumpIfNoAmmo (23)
      KNIF ABCDEF 1
      TNT1 A 2
      KNIF GHI 1
      KNIF J 1 A_PlayWeaponSound ("Knife/Throw")
      KNIF KMP 1
      KNIF R 1 A_FireCustomMissile ("Knife_Throw",0+random(-10,10),1)
      KNIF TVX 1
      KNIF DCB 1
      KNIF A 1 A_GiveInventory ("KnifeXP",1)
      Goto Ready
      KNIF A 0
      Goto Fire
    }
}

ACTOR DSPunchDaggerA : DSPunchDagger
{
    Spawn 0
    Inventory.Icon "LVLKA0"
    States
    {
    Select:
      PNCH A 0 A_TakeInventory ("DSPunchDagger")
      PNCH A 1 A_Raise
      Loop
    Deselect:
      PNCH A 1 A_Lower
      Loop
    Ready:
      PNCH A 0 A_JumpIfInventory ("KnifeXP",25,2)
      PNCH A 1 A_WeaponReady
      Loop
      PNCH A 0
      PNCH A 0 A_Print ("You've upgraded your Throwing Knives")
      PNCH A 0 A_GiveInventory ("DSPunchDaggerB")
      PNCH A 4 A_SelectWeapon ("DSPunchDaggerB")
      Goto Deselect
    AltFire:
      KNIF A 0 A_JumpIfNoAmmo (23)
      KNIF ABCDEF 1
      TNT1 A 2
      KNIF GHI 1
      KNIF J 1 A_PlayWeaponSound ("Knife/Throw")
      KNIF KMP 1
      KNIF R 1 A_FireCustomMissile ("Knife_Throw",0+random(-5,5),1)
      KNIF TVX 1
      KNIF DCB 1
      KNIF A 1 A_GiveInventory ("KnifeXP",1)
      Goto Ready
      KNIF A 0
      Goto Fire
    }
}
[/spoiler]

It gets as far as the A_Print Codepointer and then crashes me. An older version of this code worked just fine. The only difference was that code played a sound and required more XP.
Attachments
CrashReport.tar.gz
The evil crash!
(13.12 KiB) Downloaded 98 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

It crashes in

A_GiveInventory ("DSPunchDaggerB")

But I can't see why. Is there any chance you could send me the WAD?
User avatar
Deathsong12
Posts: 129
Joined: Mon Sep 05, 2005 22:31

Post by Deathsong12 »

Sure. Rapidshare link headed your way.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

I'm sorry to say that with the debugger this WAD is causing even more problems due to heap corruption. These can easily be the cause for your crashes but finding them won't be easy. Try do remove some of the DECORATEs inside to see wheher it makes a difference. My guess is that it's some minor hard to find issue but if it can get narrowed down to a specific actor I might get lucky.
User avatar
Deathsong12
Posts: 129
Joined: Mon Sep 05, 2005 22:31

Post by Deathsong12 »

Okay. Thanks for your help. Perhaps if I moved everything to a new WAD?
Deathlike2
Posts: 233
Joined: Sat Oct 29, 2005 0:40

Post by Deathlike2 »

You could probably do that.. but he's just suggesting that you probably cut+paste stuff out of the scripts or whatever in an attempt to isolate the problem... so just do what he asks.
User avatar
Deathsong12
Posts: 129
Joined: Mon Sep 05, 2005 22:31

Post by Deathsong12 »

Already have. These actors seem to crash no matter what I do, forcing me to re-write them.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

So can you post a minimal WAD that still crashes?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

I won't bother with this any further. The most recent version doesn't even load this WAD due to DECORATE errors and I have no desire to go through all the definitions.
Locked

Return to “Closed Bugs”