GZDoom hangs when shooting a monster

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
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

GZDoom hangs when shooting a monster

Post by SPZ1 »

I was working on my game and I came to a snag in this one map. It is a somewhat easy to replicate bug where GZDoom will completely hang. All you have to do is shoot the "Triple Element Spell" weapon at the "Minotaurs" while moving around. It should happen after just a few Minotaurs and not even need a restart of the map. When it happens though, you'll have to CTRL+ALT+DEL out of it. I can't reproduce it with any other weapon or enemy combination. I can't make it happen just by shooting at thin air either. I can't find anything wrong with my definitions and it happens almost randomly at different places in the code. Here are the links to my demo:

Check newer post for demo in attachment
Last edited by SPZ1 on Sun Sep 22, 2024 10:25 am, edited 1 time in total.
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

I just had this happen again on a separate map! Shooting a Minotaur with the Triple Element Spell is what does it. :evil:

EDIT: I just got the game to freeze again by shooting Minotaurs with the Ugly Wand. What is it about the railgun that causes the game to freeze? I'm thinking that I just caught it happening with the triple element because it shoots 3 railguns which increases the likelihood of the freeze happening. Maybe the problem is SPF_REPLACE?
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

One more update: I found that the "Number of Particles" setting is directly proportional to how often the game will lock. 100 means it happens very frequently and 10000 means it happens much, much less. Also, why isn't there a setting to just completely turn particles off?
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

I'll just leave this here...

Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: GZDoom hangs when shooting a monster

Post by Blue Shadow »

The demo file is very large (730 MB). Can't you create a smaller one?
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

Here you go.. I just made this much smaller demo. The rate at which it hangs can vary from just a few seconds to having to restart the map a couple times. Turn your particle limit all the way down to see it much more frequently. I made this because gzdoom hanging is getting in the way of me testing my own project. :railgun:
You do not have the required permissions to view the files attached to this post.
Heisanevilgenius
Posts: 54
Joined: Wed Dec 15, 2021 8:38 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: GZDoom hangs when shooting a monster

Post by Heisanevilgenius »

Without looking too deeply, whenever I have an issue where the game completely freezes and has to be closed, it's because an actor has an infinite loop of frames with 0 tics each.
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

I've had that issue too and this isn't that one. There is no zero length state in my DECORATE. It is just one modified imp that spawns particles when it dies. This problem is seemingly random. It also only happens with railgun weapons and when SPF_REPLACE is used.
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: GZDoom hangs when shooting a monster

Post by Blue Shadow »

I did manage to get the freeze, by reducing the max number of particles to the lowest possible value (100) with GZDoom 4.12.2 and a fairly recent dev build. Unfortunately, I don't know why it's freezing.

One weird thing I noticed is that after a while of killing those imps, the railgun attack produces no particles or hardly any, even though there aren't any live particles in the level (as far as I could see, anyway).

I requested the topic to be moved to the bugs sub-forum to bring the issue to the developers' attention.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1109
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: GZDoom hangs when shooting a monster

Post by Jekyll Grim Payne »

Moved to the Bugs subforum. Please remember we have it for bugs :)
User avatar
Redneckerz
Spotlight Team
Posts: 1090
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: GZDoom hangs when shooting a monster

Post by Redneckerz »

Apparently still current as of 4.13 judging by this seperate thread by the OP (could have just updated this one): viewtopic.php?t=79661
User avatar
SPZ1
Posts: 362
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois

Re: GZDoom hangs when shooting a monster

Post by SPZ1 »

I wasn't sure if anyone was paying attention so I made that thread...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GZDoom hangs when shooting a monster

Post by Graf Zahl »

Ok, I just had a look.

I can't see how this code could ever work - the 'oldest' particle is only set if there are no active ones when one gets spawned.
The code never accounts for a case where this particle expires while others are still active - if it then later gets reused and THEN be replaced, the game is over...

Return to “Closed Bugs [GZDoom]”