crash while playing Lithium

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.
Guest

crash while playing Lithium

Post by Guest »

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: crash while playing Lithium

Post by Graf Zahl »

Can you please verify that you are using the correct version of libsndfile-1.dll and not one that came with an older version of GZDoom or even from the official download site? It crashes inside that DLL with an "invalid instruction" exception and there were known problems with bad code in that DLL in the past.
It may also be some bogus sound but it's impossible to tell from the crash log.

In any case, there's nothing we can do here because the code that crashes is outside our control.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: crash while playing Lithium

Post by _mental_ »

pmovzxdq instruction is not supported by such old CPU. It's quite strange that SSE 4.1 instruction appeared in that library though.
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: crash while playing Lithium

Post by Graf Zahl »

That's why I was asking where the file came from. It's unlikely it is our own binary. AFAIK that was built with MSVC.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: crash while playing Lithium

Post by _mental_ »

The given library from gzdoom-bin-3-5-0.zip contains not only this but also bunch of AVX instructions.
It seems like when I built this library, code optimized via intrinsics from libFLAC was enabled by default.
Curiously enough, it was build on my very old notebook that doesn't support AVX for sure.
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: crash while playing Lithium

Post by Graf Zahl »

So this only happens when decoding FLAC? No wonder it wasn't noticed earlier...
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: crash while playing Lithium

Post by drfrag »

If i remember right the usage of AVX was due to a bug in the compiler, i read something about that.
For my ports i had to use /Oi- to build without SSE2 in VS.
Then i'll need to replace libsndfile-1.dll as well for the vintage build (it runs on a P4 tough).
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: crash while playing Lithium

Post by Graf Zahl »

Does it? Have you actually decoded some FLACs?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: crash while playing Lithium

Post by drfrag »

No, i guess it will crash with FLACs that's why i'll need to replace the dll (it's the same as in the modern package).
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: crash while playing Lithium

Post by _mental_ »

FLAC has some routines optimized by hand to use SSE 4.1 and AVX 2.

The thing is those optimized functions should not be called if CPU has no support for such instruction sets.
Detection of CPU features seems to be correct in FLAC source code.
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: crash while playing Lithium

Post by Graf Zahl »

_mental_ wrote: Detection of CPU features seems to be correct in FLAC source code.
Apparently this one CPU disagrees with you. The question is, why?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: crash while playing Lithium

Post by drfrag »

_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: crash while playing Lithium

Post by _mental_ »

No, it's unrelated problem.
_mental_ wrote:FLAC has some routines optimized by hand to use SSE 4.1 and AVX 2.

The thing is those optimized functions should not be called if CPU has no support for such instruction sets.
Detection of CPU features seems to be correct in FLAC source code.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: crash while playing Lithium

Post by _mental_ »

32-bit DLL with SSE 4.1 and AVX forcibly disabled is here. It was built from the same source code as DLL supplied with in the stable versions.
As I have no AMD CPU, I cannot check if the issue is fixed or not.
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: crash while playing Lithium

Post by Graf Zahl »

Copied to my base archive for making distributions. Of course the current 32 bit downloads should also be updated.
Post Reply

Return to “Closed Bugs [GZDoom]”