Received AL Error Invalid Value (0XA003)
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.
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.
Received AL Error Invalid Value (0XA003)
When playing Brutal Doom 64, if a heavy weapon shot hits water then four identical Open AL errors are generated and shown at the top of the screen. The affected weapons are the Rocket Launcher, BFG and Unmaker and the error only seems to happen when they hit water. The error generated is below and is always repeated four times:
>>>>>>>>>>>> Received AL Error Invalid Value (0XA003)' OALSOUND.CPP:2066
I've tested this error with both GZDoom 3.1.0a and 3.2pre-438 and it can easily be replicated by going to MAP14 on Brutal Doom 64 (which starts in an area of water) and using IDKFA to get all weapons so that you can shoot the water with each of them.
I haven't been able to replicate it within the standard Doom/Doom 2 levels, and I've not seen it in any other mods either, so it seems to be something about BD64 that causes the OpenAL error.
>>>>>>>>>>>> Received AL Error Invalid Value (0XA003)' OALSOUND.CPP:2066
I've tested this error with both GZDoom 3.1.0a and 3.2pre-438 and it can easily be replicated by going to MAP14 on Brutal Doom 64 (which starts in an area of water) and using IDKFA to get all weapons so that you can shoot the water with each of them.
I haven't been able to replicate it within the standard Doom/Doom 2 levels, and I've not seen it in any other mods either, so it seems to be something about BD64 that causes the OpenAL error.
Re: Received AL Error Invalid Value (0XA003)
Those errors are caused by invalid water splash actor positions: +Inf's or/and NaN's in WaterSplashBase2 actors.
I guess FMOD Ex simply ignored those incorrect values but OpenAL backend reports them as errors.
Messages themselves could be probably hidden by default.
Although this won't fix presumably wrong math in BD64 which leads to bad actors' positions.
I guess FMOD Ex simply ignored those incorrect values but OpenAL backend reports them as errors.
Messages themselves could be probably hidden by default.
Although this won't fix presumably wrong math in BD64 which leads to bad actors' positions.
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Received AL Error Invalid Value (0XA003)
Why? If they were hidden, who knows how long it would have taken before someone realized invalid values (infs and/or nans) were being generated, creating undefined behavior. For UpdateSoundParams3D that means the sound stays at its previous location since the new one was invalid, and for StartSound3D that means the sound doesn't play at all since the source didn't initialize properly. Having things like that happen without warning would just leave the problem to fester, until someone finally spots it and wishes it could've been spotted sooner._mental_ wrote:Messages themselves could be probably hidden by default.
Re: Received AL Error Invalid Value (0XA003)
Because people have a tendency to blame OpenAL for those errors as there were no messages with FMOD.
I agree that errors should be reported but in this case they are not informative but repetitive.
To figure out what the problem is I needed to debug modified source code. Most of content creators have no ability to do this.
I agree that errors should be reported but in this case they are not informative but repetitive.
To figure out what the problem is I needed to debug modified source code. Most of content creators have no ability to do this.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Received AL Error Invalid Value (0XA003)
Better to respond late than never.
I have to agree with _mental_ here. OpenAL needs to be less noisy with errors that come from user data but cannot print some concise and helpful message for the modder.
This one gives the impression of "Internal system error. Please contact support". And all OpenAL messages look like this one because all there is is a generic catch-all, i.e. they make people post a bug report instead of trying to fix the actual cause in their mod. For that it lacks any kind of usable information and needs some less generic handling.
I have to agree with _mental_ here. OpenAL needs to be less noisy with errors that come from user data but cannot print some concise and helpful message for the modder.
This one gives the impression of "Internal system error. Please contact support". And all OpenAL messages look like this one because all there is is a generic catch-all, i.e. they make people post a bug report instead of trying to fix the actual cause in their mod. For that it lacks any kind of usable information and needs some less generic handling.
- Chris
- Posts: 2942
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Received AL Error Invalid Value (0XA003)
That's basically what it is, since GZDoom either failed to validate its input, or generated invalid values, that then got passed on to OpenAL. Or the OpenAL backend behaved incorrectly and tried to use something it shouldn't have. Given that the invalid values survived going through the higher-level audio code, the lower-level audio code, and finally to OpenAL, who knows what subtle side effects it was leaving in its wake.Graf Zahl wrote:This one gives the impression of "Internal system error. Please contact support".
If you want to silence or change the verbosity level of those messages though, the changes needed are non-intrusive as they're all printed through the checkALError and checkALCError functions in oalsound.cpp. The two Printf's in those functions can be changed to DPrintf(DMSG_whatever, ...) for whatever verbosity level you think is appropriate for them.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Received AL Error Invalid Value (0XA003)
I'd rather do a careful review of the entire code and print more useful messages. But that will take more time. Definitely not for the next release.
Re: Received AL Error Invalid Value (0XA003)
I propose to validate sound position and velocity before passing them to OpenAL. Here is my implementation. One thing that may be adjusted is valid values range.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Received AL Error Invalid Value (0XA003)
The valid value range should go to 32768 on both sides. Although unlikely, values between 32767 and 32768 can be expressed as 16.16 fixed point which should be the reference.
Re: Received AL Error Invalid Value (0XA003)
OK, I will update the change to use [-32768, 32768] as a valid range. How about the approach in general?
Re: Received AL Error Invalid Value (0XA003)
Added validation of sound position and velocity in 4f6a853.