0
0

Hello,

I get a access violation in fmodex.dll 0x1001ca28 when calling the function getEventByIndex, here is my code

SFXEventGroup->getNumEvents(&numOfSFX);
for (Sint32 eachSFX = 0; eachSFX < numOfSFX; ++eachSFX) {
FMOD::Event* event = NULL;
SFXEventGroup->getEventByIndex(eachSFX, FMOD_EVENT_DEFAULT, &event);

            if (event)
                event-&gt;setPaused(bPause);

} // end for each SFX
[/code]

In what situation the geEventByIndex will crash? Thanks!

  • You must to post comments
0
0

Is it possible your handle is invalid?
Do you have error checking on all of your functions.

  • You must to post comments
0
0

Hello, what do you mean the handle? Do you mean I should do an error check when I call

SFXEventGroup->getEventByIndex(eachSFX, FMOD_EVENT_DEFAULT, &event);

?
But the problem is as long as I call this function, it crash.

  • You must to post comments
0
0

Yes the handle is the object you call the member function on.
SFXEventGroup sounds like it is invalid to me.

  • You must to post comments
0
0

So, is there any way to check if the SFXEventGroup is valid. What I do is I have a global variable pointer for this event group, but it seems some how it become invalid.

Thanks!

  • You must to post comments
0
0

If you used getGroup to retrieve it, it shoudnt be that hard to see if it changed afterwards.
make sure getGroup is returning FMOD_OK.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.