Page 1 of 1

[g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Mon Jan 21, 2019 7:23 pm
by drako
Download zip from https://github.com/Realm667/WolfenDoom .

[copied from viewtopic.php?f=19&t=47801&p=1088261#p1088261]

I have just downloaded the newest GitHub wolfendoom-master.zip and tried to run it with the newest gzdoom x64 (Jan 19 version). It crashes with access violation error when I try to play a map (either by using console MAP CxMy or by using "new game"). Is it just problem on my side or some of you have similar problems?

EDIT: It seems that x32 build (Jan 21, 251) works better, It crashes when I go to c1m1 (command map c1m1) but it does not crash on map c1m2-c1m5 (I did not test others). x64 crashes on all the above.

Error: Access Violation C00000005 tried to write address

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 2:23 am
by Graf Zahl
I just tested it and did not get any crash. And since you did not even bother to attach the crash log (the entire Zip, please, and not just some extracted parts!) I have no idea what's up. It may be a bug, it may be an issue with your system or it may just be the alignment of the stars when you ran it.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 6:53 am
by drako
I assumed (incorrectly) that the problem is replicable. I attach the crash report. My system: MS Surface Book 2 15''.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 1:55 pm
by Ozymandias81
Best way to replicate it is to run TEST_ACT map using console commands or from GZDoomBuilder test: 80% of times crashes, and may also happen when shooting at enemies. This happens as well with r228 on both 32-64bit, and r338 is not runnable at all
On c1m1 happens when you skip the introduction sequence via console command (map c1m1 then press Use to skip intro)

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 2:04 pm
by _mental_
Crash on loading is most likely a duplicate of this report.
Crash while shooting is something different. Is it purely random?

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 2:18 pm
by Ozymandias81
_mental_ wrote:Crash on loading is most likely a duplicate of this report.
Crash while shooting is something different. Is it purely random?
While 64bit builds are quite impossible to run (228 and 251 32bit runs vanilla Doom btw), on TEST_ACT map random crashes happen oftenly, specially while shooting at Guard actors... Since the map has intentionally numerous portals and actors which uses zscript-decorate complex inheritances, I assume something may come from these sides. Not possible being specific unfortunately.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 6:02 pm
by AFADoomer
It's entirely likely that this is another uninitialized variable issue... I'll try to scrub all of the BoA ZScript to eliminate those tonight.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Tue Jan 22, 2019 8:25 pm
by drako
Maybe the following helps. In x86 build 251, when I map c1m2 I get the message in the log (in red, without crash): "Script error, "script00.lmp"line 1: Map does not define a namespace. The same message I get in map c1m5, map c3m1, map c3m2.
I observe the same behavior in x86 build 257.
x64 build 257 crashes on map c1m1 with access violation error (I attach the crash report).
It is quite strange that x86 and x64 builds behave differently.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Wed Jan 23, 2019 5:27 am
by _mental_
drako wrote:It is quite strange that x86 and x64 builds behave differently.
32-bit build has no JIT. If the crash is caused solely by it, running 64-bit GZDoom with +vm_jit 0 command line will "fix" it.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Wed Jan 23, 2019 9:03 am
by _mental_
I found one code generation issue that causes implicit initialization to fail.
Spoiler: Script
Spoiler: Generated code
Looks like we have incorrect register allocation somewhere. Moving testActor declaration before Array.Copy() fixes the problem. Registers used in the function no longer overlap.

Re: [g3.8pre-251-g4eea540a3] Blade of Agony crashes

Posted: Wed Jan 23, 2019 9:05 am
by Graf Zahl
This is no register allocation error, it's just the old and known problem that a reused register doesn't get cleared for the reuse.