Parsing (?) crash with simulated array array

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.
Post Reply
stan423321
Posts: 32
Joined: Tue Mar 25, 2014 2:35 pm

Parsing (?) crash with simulated array array

Post by stan423321 »

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 65 times
bad.pk3
(349 Bytes) Downloaded 73 times
good.pk3
(359 Bytes) Downloaded 71 times
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Parsing (?) crash with simulated array array

Post by Major Cooke »

Does this issue still persist?
stan423321
Posts: 32
Joined: Tue Mar 25, 2014 2:35 pm

Re: Parsing (?) crash with simulated array array

Post by stan423321 »

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.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Parsing (?) crash with simulated array array

Post by _mental_ »

No, it was not fixed because ideally both file should do the same.
User avatar
phantombeta
Posts: 2084
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Parsing (?) crash with simulated array array

Post by phantombeta »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Parsing (?) crash with simulated array array

Post by Graf Zahl »

Thanks
Post Reply

Return to “Closed Bugs [GZDoom]”