Closed soundasleep closed 8 months ago
OK, the FMOD_ERR_INVALID_PARAM can occur when the window is focused, too. So I'm not sure what's going on 😢
I think I worked it out... a misbehaving int was being used for listenerID
so sometimes I was trying to set the properties for listenerID = 1 when I only have a single listener. (see FMOD_Studio_System_GetNumListeners
)
Version
3.3.3
Platform
Windows x64
JDK
OpenJDK 64-Bit Server VM v16.0.2+7-67 by Oracle Corporation
Module
FMOD or LWJGL
Bug description
Hello! I'm trying to integrate FMOD into my libgdx game and it's mostly going really well, except I've come across a weird and difficult to reproduce error where FMOD is returning
FMOD_ERR_INVALID_PARAM
sometimes. It seems to only occur when the application does not have focus, and it's extremely difficult to reproduce, so I'm wondering if it's a memory thing.This is essentially the code I'm using:
And
MyFMODImpl
, where I create single FMOD_VECTOR instances that I then set and reuse on every method call (since it's called every frame):I've tried just ignoring the
FMOD_ERR_INVALID_PARAM
but once it happens, it's constantly happening.I've also tried reinitialising all of the vectors on the first
FMOD_ERR_INVALID_PARAM
but it still fails.Am I using MemoryStack correctly? Is there anything about switching context on Windows that could cause my malloc'd vectors to become invalid? Could it be a bug in FMOD? Could it be a Hotspot or JVM thing? Thank you 🙏
Stacktrace or crash log output
No response