Our low level PS3 programmer has been soaking our game overnight and a couple times he has gotten a floating point exception in ChannelRealManual3D::set2DFreqVolumePanFor3D when it does the acos:
[code:rpqzsw2d]mAngleToListener = FMOD_ACOS(fbpan_base) * (180.0f / FMOD_PI);[/code:rpqzsw2d]
I have put asserts for any FMOD_ERR_INVALID_FLOAT or FMOD_ERR_INVALID_VECTOR and they were not hit so he thinks it is due to floating-point roundoff and just needs a clamp like this:
// Clamp the dot product — minor floating-point roundoff can push
// the value slightly outside the range [-1,1].
if (fbpan_base < -1.0f)
fbpan_base = -1.0f;
else if (fbpan_base > 1.0f)
fbpan_base = 1.0f;
mAngleToListener = FMOD_ACOS(fbpan_base) * (180.0f / FMOD_PI);[/code:rpqzsw2d]
Does that make sense? Can we get this added?
- lwellbrock asked 9 years ago
No this is not the same bug, that was a one off.
Your calls to fmod functions are most likely passing invalid floats to fmod (nan/inf). Use the fmodexL version (logging version) which has extra error checking and look for FMOD_ERR_INVALID_FLOAT. The usual culprits are Channel::set3DAttributes System::set3DAttributes
[quote="FX-Racer":2kpj36qa]It seems that versions 4.18.03 and 4.19.03 for 32-bit Linux also have this bug.[/quote:2kpj36qa]
This error happens when glibc 2.8 is installed.
racer trap divide error ip:f7b749b5 sp:ff9551d0 error:0 in libfmodex.so.4.19.03[f7b29000+11b000]
It doesn’t happen with glibc 2.5 or 2.7.
Please login first to submit.