Exponents via ** Cause Crash on GZDoom Load

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Exponents via ** Cause Crash on GZDoom Load

Re: Exponents via ** Cause Crash on GZDoom Load

by Graf Zahl » Sun Sep 24, 2017 12:17 pm

This is a remnant of how the format came to be. Back in 2003 it made sense being able to omit the 'stop' for simple decorations.

Re: Exponents via ** Cause Crash on GZDoom Load

by Xaser » Sun Sep 24, 2017 12:06 pm

Beats me why it is what it is, though it's amusing forgetting to put a Stop at the end of a projectile Death state and watching it blink back into existence for all eternity. :P

Re: Exponents via ** Cause Crash on GZDoom Load

by Gez » Sun Sep 24, 2017 11:38 am

For some reason I assumed the fallback was "just stop existing, you buggy piece of [c|t]rash".

Re: Exponents via ** Cause Crash on GZDoom Load

by Xaser » Sun Sep 24, 2017 11:28 am

It's missing a Stop directive, so it falls back to the "go to the next state in the list" behavior. The line of code that handles this has a fallback where if it's the very last state in the list, it goes to the first state. Unfortunately, in the posted example, the last state and the first state are one and the same, and the duration is zero. Welcome to Loopville, population: infinity.

Re: Exponents via ** Cause Crash on GZDoom Load

by Gez » Sun Sep 24, 2017 6:23 am

_mental_ wrote:As a side note: next time it will be nice if example won't contain infinite loops.
There's no "loop" instruction, so shouldn't the next state be 0 and the actor get destroyed?

Re: Exponents via ** Cause Crash on GZDoom Load

by dpJudas » Sat Sep 23, 2017 5:19 pm

I pushed a fix for this bug.

I fixed it by setting the ValueType to TypeFloat64 directly instead of calling Promote. Mainly because the code above already ensures that the value type can only be a float at this point. Calling Promote would have produced the same outcome, but that would have implied this code could have situations where one of the operands wasn't already a float.

Re: Exponents via ** Cause Crash on GZDoom Load

by _mental_ » Sun Sep 03, 2017 12:59 am

Am I right that call to FxBinary::Promote() is missing at the end of FxPow::Resolve() function?
Most likely this is the only reason for nullptr value of FxPow::ValueType.

As a side note: next time it will be nice if example won't contain infinite loops.

Exponents via ** Cause Crash on GZDoom Load

by Kom » Sat Sep 02, 2017 9:17 am

Was looking for a way to calculate exponents with double values and came across this: https://mantis.zdoom.org/view.php?id=513

I tried using this syntax but noticed gzdoom 3.1.0 stable and the latest 3.2.0 pre-495-g7195af4 beta would both crash on load.

Code: Select all

class TestPuff : BulletPuff {
	
	double dist;
	
	States {
		Spawn:
			TNT1 A 0 NoDelay {
				dist = 2.0 ** GetDistance(true);
			}
	}
}
Attachments
exponent_crash.pk3
(274 Bytes) Downloaded 30 times

Top