Parsing (?) crash with simulated array array

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: Parsing (?) crash with simulated array array

Re: Parsing (?) crash with simulated array array

by phantombeta » Wed Mar 13, 2019 1:56 am

This is marked as a duplicate, but I can't find the original report, so I'll use this one instead.
I made a pull request to fix this bug.

Re: Parsing (?) crash with simulated array array

by _mental_ » Tue Apr 10, 2018 1:17 pm

No, it was not fixed because ideally both file should do the same.

Re: Parsing (?) crash with simulated array array

by stan423321 » Tue Apr 10, 2018 12:54 pm

Retested on the same computer, Windows 10 Home updated to 1709 16299.334, 32-bit to GZDoom 3.4pre-50-g3dd7f17de, 64-bit to GZDoom 3.4pre-55-g80f57dfaf (latest on DRD Team at time of testing).

I don't know ZScript specs by heart, so I don't know if this is a bug being completely fixed, it is however a definite improvement. Both "bad" versions error out with "Script error, "bad.pk3:zscript.txt" line 14:", "Internal error when generating code for array access". Please state whether this is an example of expected behavior (what I would expect first would be mostly identical behavior to the "good" file, but, again, this is no crash at least). The testing file was not changed.

Re: Parsing (?) crash with simulated array array

by Major Cooke » Mon Apr 02, 2018 6:19 pm

Does this issue still persist?

Parsing (?) crash with simulated array array

by stan423321 » Mon Sep 18, 2017 10:58 am

Tested on 3.2-pre557 on Windows 10 Home 1703 15063.608, 64-bit and 32-bit. The "bad" version crashes before menu with report request. A very similar "good" version doesn't. A crash report is generated (attached is 64-bit version).

"Good" code:

Code: Select all

version "2.5"

class Foo : Object {
	Array<int> fu;
}

class Bar : ZombieMan replaces ZombieMan {
	Array<Foo> bru;
	States {
		Spawn:
			TNT1 A 0 NoDelay {
				bru.push(new('Foo'));
				let hq = bru[0];
				hq.fu.push(4);
				hq.fu[0] = hq.fu.size();
			}
			goto Super::Spawn;
	}
}
"Bad" code:

Code: Select all

version "2.5"

class Foo : Object {
	Array<int> fu;
}

class Bar : ZombieMan replaces ZombieMan {
	Array<Foo> bru;
	States {
		Spawn:
			TNT1 A 0 NoDelay {
				bru.push(new('Foo'));
				bru[0].fu.push(4);
				bru[0].fu[0] = bru[0].fu.size();
			}
			goto Super::Spawn;
	}
}
Attachments
CrashReport.zip
(18.85 KiB) Downloaded 68 times
bad.pk3
(349 Bytes) Downloaded 78 times
good.pk3
(359 Bytes) Downloaded 77 times

Top