[1.0.22] Crash report

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Vaecrius
Posts: 53
Joined: Fri Jan 05, 2007 10:40

[1.0.22] Crash report

Post by Vaecrius »

This crash happens with a mod that contains the following weapon:
[spoiler]

Code: Select all

ACTOR Rifle : Weapon replaces Pistol
{
	Weapon.SelectionOrder 1400
	Weapon.AmmoGive 30
	Weapon.AmmoUse1 1
	Weapon.AmmoType1 Clip
	Weapon.AmmoUse2 1
	Weapon.AmmoType2 Clip
	+weapon.alt_ammo_optional
	weapon.kickback 20
	weapon.sisterweapon GRifle
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "You got the rifle!"
	radius 20
	height 16
	Decal "BulletScratch"
	AttackSound "weapons/rifle"
	Obituary "%o was penetrated by %k's supersonic rounds."
	States 
	{
	Ready:
		RIFG A 1 A_WeaponReady
		Loop
	Select:
		RIFG B 1 A_GiveInventory ("Underslung", 1)
		RIFG B 1 A_Raise
		RIFG B 0 A_Raise
		Goto Select+1
	Deselect:
		RIFG B 0 A_TakeInventory ("Underslung", 1)
		RIFG B 0 A_TakeInventory ("PowerWeaponLevel2", 1)
		RIFG B 1 A_Lower
		RIFG B 0 A_Lower
		Goto Deselect+2
	Fire:
		RIFG A 0 A_GiveInventory("FirstBullet", 1)
		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (0, 0, 3, 4, "BulletPuff")
		RIFG A 12 A_Refire
		Goto Ready
	Hold:
		RIFG A 0 A_JumpIfInventory("FirstBullet", 1, 7)

		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (1, 2, 1, 6, "BulletPuff")

		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (2, 3, 1, 6, "BulletPuff")

		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (2.5, 4, 1, 6, "BulletPuff")

		Goto Hold+12

		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (0.5, 1, 1, 8, "BulletPuff")

		RIFG A 2 A_GunFlash
		RIFG B 1 A_FireBullets (1, 2, 1, 7, "BulletPuff")
		RIFG A 0 A_TakeInventory("FirstBullet", 1)

		RIFG BA 4
		RIFG A 6 A_Refire
		Goto Ready
	Flash: 
		RIFG F 0 A_FireCustomMissile ("Tracer", random(-4, 4), 0)
		RIFF A 2 BRIGHT A_Light1
		RIFF B 0 A_Light0
		Stop
	Spawn:
		RIFL A -1
		Stop
	AltFire:
		RIFG A 0 A_JumpIfInventory ("Clip", 1, 1)
		goto Ready
		RIFG A 2 A_GunFlash
		RIFG B 2 A_FireBullets (3, 4, 1, 6, "BulletPuff")
		RIFG A 12 A_Refire
		Goto Ready
	AltHold:
		RIFG A 0 A_JumpIfInventory ("Clip", 1, 1)
		goto Ready
		RIFG A 2 A_GunFlash
		RIFG B 2 A_FireBullets (5, 6, 1, 6, "BulletPuff")
		RIFG A 0 A_Jump (196, 2)
		RIFG A 0 A_Recoil (1)
		RIFG A 12 A_Refire
		Goto Ready
	}
}

ACTOR FirstBullet : Inventory
{
	Inventory.Amount 0
	Inventory.MaxAmount 1
}

ACTOR GRifle : Rifle
{
	+powered_up
	+weapon.noalert
	Weapon.AmmoGive 0
	Weapon.AmmoType1 RocketAmmo
	Weapon.AmmoType2 RocketAmmo
	weapon.sisterweapon Rifle
	Obituary "%o fragged by %k."
	States 
	{
	Fire:
		RIFG A 4 A_JumpIfInventory ("RocketAmmo", 1, 3)
		RIFG A 0 A_Print ("No rockets, switching back to rifle.")
		RIFG A 0 A_TakeInventory ("PowerWeaponLevel2", 1)
		goto Ready
		RIFG B 4 A_FireCustomMissile ("Rocket", random(-2,2), 1, 0, random(-3,0))
		RIFG A 0 A_JumpIfInventory ("RocketAmmo", 1, 3)
		RIFG A 0 A_Print ("No rockets, switching back to rifle.")
		RIFG A 0 A_TakeInventory ("PowerWeaponLevel2", 1)
		goto Ready
		RIFG A 8 A_GiveInventory ("PowerWeaponLevel2", 1)
		RIFG B 6 A_PlayWeaponSound ("weapons/sshoto")
		RIFG BBBB 2 A_Lower
		RIFG B 14
		RIFG B 6 A_PlayWeaponSound ("weapons/sshotc")
		RIFG BBBB 2 A_Raise
		RIFG B 8
		goto Ready
	Altfire:
		RIFG A 0
		goto Fire
	}
}

ACTOR Underslung : CustomInventory
{
	inventory.maxamount 1
	inventory.amount 0
	-invbar
	States
	{
	Use:
		RIFG A 0 A_JumpIfInventory ("PowerWeaponLevel2", 1, 2)
		RIFG A 0 A_Jump (256, 3)
		RIFG A 0 A_TakeInventory ("PowerWeaponLevel2", 1)
		RIFG A 0 A_Print ("Now using rifle.")
		fail
		RIFG A 0 A_JumpIfInventory ("RocketAmmo", 1, 3)
		RIFG A 0 A_TakeInventory ("PowerWeaponLevel2", 1)
		RIFG A 0 A_Print ("No rockets.")
		fail
		RIFG A 0 A_GiveInventory ("PowerWeaponLevel2", 1)
		RIFG A 0 A_Print ("Now using rocket launcher.")
		fail
	}
}
[/spoiler]
The weapon is an assault rifle with three modes of fire: single, burst, and auto. Single and burst are handled by primary while auto takes up the altfire. I wanted to add a grenade launcher onto this, so I created a sister weapon, "GRifle", that launches the grenade. The powerup allowing the sister weapon use is activated and deactivated by using an item, "Underslung". This item is given to the player when the rifle is selected. To keep things clean and easy to use, both the powerup and the "Underslung" item are removed from the player while the rifle is being lowered.

The crash happens if I do the following in order:
  1. Acquire some rockets;
  2. Activate the grenade launcher (console command "use Underslung");
  3. Fire;
  4. Switch weapons (EDIT: Anything BUT the fist);
  5. Quit.
The crash never occurs during play, only when I quit. It doesn't happen in ZDoom 2.1.7.
Attachments
CrashReport.zip
(14.92 KiB) Downloaded 84 times
Last edited by Vaecrius on Sun Feb 04, 2007 10:25, edited 1 time in total.
Vaecrius
Posts: 53
Joined: Fri Jan 05, 2007 10:40

Post by Vaecrius »

I should probably upload the rifle wad as well...
Attachments
rif.zip
(14.04 KiB) Downloaded 112 times
User avatar
Betanol
Posts: 61
Joined: Mon Jan 22, 2007 17:24
Location: Brasil

Post by Betanol »

this is a pretty nice weapon..

I hate myself because I dont know anything about decorate.. :(

I think it would be nicier if the rifle only shoot single and brust fire in primary attack, and shoot a grenade instead of rocket in secondary attack. Then the "use underslung" thing would not be needed anymore and you wuld have a more realist gun ^^

but anyway it's your work so let me shut up...

;)

OBS: I did not experienced any glitches or errors with your rifle.. Latest GZDOOM
Vaecrius
Posts: 53
Joined: Fri Jan 05, 2007 10:40

Post by Vaecrius »

Thanks. So you don't get the crash?

Also: I just noticed that the crash doesn't happen if I don't start the map with the rifle. Might this be related to the font bug that's already been fixed? EDIT: Seeing that it makes no difference if I get rid of the messages warning you whether you're using an explosive weapon, I guess not.

As well, switching to the fist apparently doesn't cause the bug to happen, although switching to the chainsaw does.
User avatar
Betanol
Posts: 61
Joined: Mon Jan 22, 2007 17:24
Location: Brasil

Post by Betanol »

Exactly, I did not get the crash here, in neither situations above.
Vaecrius
Posts: 53
Joined: Fri Jan 05, 2007 10:40

Post by Vaecrius »

...well, I'm still stumped on what might be causing this crash. I've ended up having three versions of this rifle: the one attached above, a burst-only variant of that one, and an auto-only version that works off of a 30-round magazine.

I'm still curious as to why I get this crash on GZDoom - and by extension I suspect the current ZDoom SVN, which for reasons I'd rather not leave a written record of I can't compile. The crash never happens to me at all under the same circumstances in 2.1.7 (which was a surprise, since I mostly worked on and tested this thing on GZDoom).
Vaecrius
Posts: 53
Joined: Fri Jan 05, 2007 10:40

Post by Vaecrius »

Whatever was causing this, it's gone in ZDoom SVN r490, so I suppose this thread could be closed.
Locked

Return to “Closed Bugs”