[GZD 3.2.1 32bit] AL error

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
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

[GZD 3.2.1 32bit] AL error

Post by Fishytza »

Tested wth GZDoom 3.2.1 32bit

Entering an area that has sound reverb makes this message appear.
>>>>>>>>>>>> Received AL error Invalid Value (0xa003), oalsound.cpp:2462
EDIT: Test map removed.

Walk into the green area and the message should appear. (This doesn't happen in the 64bit version.)
Last edited by Fishytza on Thu Nov 02, 2017 2:40 am, edited 1 time in total.
User avatar
Korell
Posts: 439
Joined: Sun May 28, 2017 1:01 pm

Re: [GZD 3.2.1 32bit] AL error

Post by Korell »

That's the same error as the one I mentioned in this thread: viewtopic.php?f=104&t=57632
I wonder if it's related.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZD 3.2.1 32bit] AL error

Post by _mental_ »

No, it’s indeed something with applying of reverb parameters. Cannot say more without debugging it.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZD 3.2.1 32bit] AL error

Post by _mental_ »

This is yet another issue with MinGW code generation involving SSE instructions. This time the game doesn't crash but screw up floating point values.
When I replaced supplied OpenAL Soft 1.18.1 DLL with the same version but built by MSVC 2015 the error is gone.

To avoid such problems in the future I see two solutions: build most/all dependencies with Visual Studio or drop 32-bit Windows version.
The first is relatively complex depending on what libraries we about to replace. The second will cause some whining.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [GZD 3.2.1 32bit] AL error

Post by Rachael »

The second is doable, if we still compile but with the caveat "it probably won't work properly, please upgrade to a 64-bit system."

It would leave us in the same state as OpenGL 2.0.

This is a relatively minor error and should not necessitate dropping an entire architecture over - although it does further the case of doing so in the future.

At the same time, we should not go completely out of our way to support an architecture that's been deprecated for a while, now, so that's why I see no reason to recompile the libraries under MSVC, either, unless you really want to. 32-bit will be almost nearly non-existent in 10 years, and in 5 years there's barely going to be any mentions of it, anyway.
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: [GZD 3.2.1 32bit] AL error

Post by Graf Zahl »

_mental_ wrote:This is yet another issue with MinGW code generation involving SSE instructions. This time the game doesn't crash but screw up floating point values.
When I replaced supplied OpenAL Soft 1.18.1 DLL with the same version but built by MSVC 2015 the error is gone.

Can you post that DLL? Then we can create a working replacement download.
For the other two remaining DLLs we'll have to see - from the looks of it they were both built with MinGW but I have no idea what settings were used.

All I can say here is Thank God that 64 bit ABI specs are so strict that violating them is not an option. But it seems the end of 32 bit and XP will come faster than anyone might have expected.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZD 3.2.1 32bit] AL error

Post by _mental_ »

DDL is here.

There was some progress with libsndfile regarding these code generation issues. The next release should be good, hopefully with optimization turned on.
Author just added -mstackrealign switch for MinGW, probably Chris can try to do the same.
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [GZD 3.2.1 32bit] AL error

Post by Chris »

_mental_ wrote:This is yet another issue with MinGW code generation involving SSE instructions. This time the game doesn't crash but screw up floating point values.
When I replaced supplied OpenAL Soft 1.18.1 DLL with the same version but built by MSVC 2015 the error is gone.
There was a fairly nasty bug in 1.18.1 that caused the FPU rounding mode to get modified on the caller's threads, which was fixed in 1.18.2. It for sure affected the MinGW-w64 builds, but I'm not sure if it also affected MSVC (the fegetenv/fesetenv functions provided by MinGW fail to save/restore the rounding mode like the standard says it's supposed to; I don't know if MSVC's versions of those functions have the same flaw and MinGW was just replicating it for compatibility, or if it is a real bug on their end).

I don't know why it would only affect the 32-bit version though, or what exactly is being tripped. Invalid Value suggests a value is out of range, but (G)ZDoom is careful to clamp the reverb property values to the same limits OpenAL will check against, so it should be able to be out of range regardless. I can only guess that maybe 32-bit MinGW generates slightly different float values for the min and max constants than 32-bit MSVC (without support for C99's hex floats, almost any specified floating-point value that's not a whole number will be inexact and need conversion to some bit representation), so even though the MSVC code clamps it, the MinGW code could be one bit stricter on something so it's seen as out of range. That's just a guess, though.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [GZD 3.2.1 32bit] AL error

Post by _mental_ »

It looks like this issue is caused by incorrect stack alignment, 32-bit Debug build of GZDoom works fine while Release generates this error.
To be sure I need to debug OpenAL DLL but honestly this requires lots of effort.

The value passed to alEffectf() in this call is the same and correct in both cases.
props.ReverbDelay is equal to 0.0109999999, should be 0.011 but its type is float so no surprise.
Post Reply

Return to “Closed Bugs [GZDoom]”