Dynamic light radius issue

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Talon1024

Dynamic light radius issue

Post by Talon1024 » Fri Dec 23, 2016 3:12

Something is causing GZDoom to crash, and it appears to be an assertion failure related to dynamic lights.

To reproduce the crash, load up a recent build of WolfenDoom: Blade of Agony, and watch the titlemap sequence until shortly after the "Realm667 Presents" screen.

Code: Select all

gzdoomd: /home/kevinc/Games/code/gzdoom/src/gl/dynlights/a_dynlight.cpp:421: void ADynamicLight::UpdateLocation(): Assertion `radius >= m_currentRadius * 2' failed.
My specs are:
Ubuntu 16.04 LTS (Unity desktop)
16 GB of RAM
Quad-core Intel Core i5-4690k CPU @ 3.50GHz
NVidia GeForce GTX 970
NVidia driver 367.57

I don't know if this bug affects only Linux or not.

BTW, the 'd' at the end of gzdoomd means it's a debug build of GZDoom.

_mental_
Developer
Developer
Posts: 254
Joined: Sun Aug 07, 2011 13:36

Re: Dynamic light radius issue

Post by _mental_ » Fri Dec 23, 2016 9:43

The same assertion failure was already reported here. But unlike with those steps to reproduce BoA intro indeed triggers the problem for me using Win32 Debug configuration. Tried with WolfenDoom: Blade of Agony version 1.0 and with GZDoom at this commit.

EDIT: Graf, is this assertion correct? I think it should be

Code: Select all

assert(radius >= m_currentRadius);

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Dynamic light radius issue

Post by Graf Zahl » Fri Dec 23, 2016 10:31

The *2 is needed. Just look one line above the assert.

_mental_
Developer
Developer
Posts: 254
Joined: Sun Aug 07, 2011 13:36

Re: Dynamic light radius issue

Post by _mental_ » Fri Dec 23, 2016 11:41

Yeah, I've got that code wrong.

It seems a pulse light's cycler contains old values. Shouldn't it be updated too in FLightDefaults::ApplyProperties() function like other light variables?

_mental_
Developer
Developer
Posts: 254
Joined: Sun Aug 07, 2011 13:36

Re: Dynamic light radius issue

Post by _mental_ » Fri Dec 23, 2016 14:14

Graf, could you please review this PR?

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Dynamic light radius issue

Post by Graf Zahl » Fri Dec 23, 2016 16:03

I already had been working on a fix myself. There's one thing your PR is missing: It shouldn't completely reset the cycler if it switches from one pulse light to another one - in that case the size needs to be updated but the cycle shouldn't be reset.

_mental_
Developer
Developer
Posts: 254
Joined: Sun Aug 07, 2011 13:36

Re: Dynamic light radius issue

Post by _mental_ » Sun Jan 01, 2017 17:30

This assertion failure still can happen. I just encountered it again occasionally by testing unrelated things.

Download Hades Elemental WAD and start with this command line

Code: Select all

-iwad doom2 -file Helemental.zip +map map01 +god +summon Helemental
Move away from the monster to activate its ranged attacks and wait a bit. After a few its shots assert() will trigger.

Locked

Return to “Closed Bugs”

Who is online

Users browsing this forum: No registered users and 1 guest