Page 1 of 2

[bfbf7ff9c]Crash on start-up

PostPosted: Sat Jan 05, 2019 5:14 pm
by Major Cooke
In the most recent commits, trying to just start the game causes a crash. It happened from this commit.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sat Jan 05, 2019 5:31 pm
by Major Cooke
Strangely enough, it doesn't crash with debug builds... Pinning it down is proving to be a bit more difficult. However the crash says "illegal instruction".

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sat Jan 05, 2019 6:28 pm
by Major Cooke
Found it. It's the "turbo" cvar that's causing a crash when introduced during that commit. Trying to multiply by the defined "scale" double in there is an illegal instruction.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sat Jan 05, 2019 6:32 pm
by Graf Zahl
What's your CPU?`

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sat Jan 05, 2019 6:37 pm
by Major Cooke
Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 CPUs), ~2.6GHz

I'm attaching my DxDiag if it can help.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 4:58 am
by PlayerLin
I got same crash(code:C000001D -- illegal instruction -- Address: 000000013F892F7C) after using g3.8pre-83-ga0ad4ea19 x64 of dev. build from DRDTeam dev. builds site, start the game, crashed immediately with GZDooM's very fatal crash error window.

For some reasons...x86 build from the same place just working fine.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 6:11 am
by phantombeta
For some reasons...x86 build from the same place just working fine.

That's because this is certainly a problem with the JIT. The JIT doesn't support x86, only x86_64, so it won't crash, since it won't be running in the first place.

EDIT: Hmmmm, maybe not... Though if it isn't this will be hell to figure out.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 6:24 am
by Graf Zahl
Since I do not get the crash, someone with an affected CPU needs to run the release build in a debugger and tell us what instruction it crashes on. My guess is something with floating point conversions.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 6:42 am
by phantombeta
I can reproduce this with the latest DRD Team build, but not with a self-built build. Something's VERY fucky there.
Also this:
Image

EDIT: Oh, and it's definitely not the JIT. It's crashing inside GZDoom's own code.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 6:48 am
by Enjay
Happening with me too with gzdoom-x64-g3.8pre-83-ga0ad4ea19.7z from DRD. Unfortunately, I have nothing to add other than my crash report.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 7:02 am
by Graf Zahl
Since I don't get this, it may be a compiler bug. I am using the latest VC++ 2017. MC uses 2015, AFAIK, but what are the devbuilds compiled with?

@phantombeta: That image is a bit small, can you post something with more lines of code? I'd like to match this with the compiler's assembly output.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 7:15 am
by phantombeta
Gladly.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 7:36 am
by drfrag
AFAIR Blzut3 is using VS 2015.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 7:43 am
by Graf Zahl
Definitely a code generation error.

Here's the assembly output of the first bad section:

Code: Select allExpand view
   0f 5a d1    cvtps2pd xmm2, xmm1
  00055   f2 0f 59 15 00
   00 00 00    mulsd    xmm2, QWORD PTR __real@3f847ae147ae147b


You can see the first instruction being fully there, but the second one is garbled (but still locatable), there's 3 bytes of garbage in between. To be honest, I don't know how to handle it, someone with a broken compiler needs to do this.
Or we may simply unsupport VC++ 2015 for being buggy.

Re: [bfbf7ff9c]Crash on start-up

PostPosted: Sun Jan 06, 2019 7:44 am
by phantombeta
Yeah, this is definitely a compiler bug. AppVeyor's VS2015 builds crash too, while the VS2017 builds don't.