0
0

I’m a bit confused about the meaning of the error message "An invalid object handle was used". The thing is that I keep getting it every now and then when I try to apply 3d attributes to certain events but I can’t figure out why. If I for instance have an event and execute event->getState it won’t complain and it returns a valid value but if the following execution is event->set3DAttributes (with a valid position for instance) it will say "An invalid object handle was used". Why is this? What am I missing here? I have read somewhere that the message should be more informative in future releases of FMOD but nevertheless I wonder why I sometimes can’t apply my 3d attribs. Worth noting is that before I try to apply 3d attribs I make sure that the event has mode=FMOD_3D which rules out the possibillity that I try to set 3d attribs to a 2d sound.

  • You must to post comments
0
0

I have reproduced this again.

I call getEventByIndex – it returns ok
I call getInfo (to check if sound is looped) – it returns ok
I call getPropertyByIndex and it fails.
First fail occurs on 2242 call.
Hm… after that some calls ok, and at 2340 call it starts to fail always.

May be problem in multiple projects, that I use?.. Anyway, getEventByIndex doesn’t fail.
It must work, right? Or there is some condition when it can fail?..

ps
I think, engine can know – is sound 2d or 3d, even on sound loading…
May be you will put this info in event info..?

  • You must to post comments
0
0

On loading I call getEventByIndex for each event and
check if sound 3d, after some calls fmod begins fail on getPropertyByIndex(FMOD::EVENTPROPERTY_MODE, &mode).

It returns FMOD_ERR_INVALID_HANDLE.
May be it’s same problem… Anyway why this occurs and what to do to avoid this?

  • You must to post comments
0
0

I still haven’t got a satisfying answer to my original question why I keep getting FMOD_ERR_INVALID_HANDLE on some calls and not others using the very same handle. Is it just pure luck, or is there some more logical explaination to it? For some reason it occurs to set3DAttributes 99% of the cases so a not very wild guess would be that there is some kind of connection to the sound being 2D or 3D. Please, help me out here cause as long as I get these kinds of errors I can’t expect FMOD to be working correctly and thus can’t really see if the problems that appear apart from this one is caused by FMOD or the code using it.

  • You must to post comments
0
0

I also get this message under similar conditions:

The specified channel has been reused to play another sound

I do catch and handle the callbacks EVENT_CALLBACKTYPE_STOLEN and EVENT_CALLBACKTYPE_EVENTFINISHED. Is there anything else I should check for to be certain I’m not using a "dead" event.

  • You must to post comments
0
0

My guess is that the handle is perfectly valid otherwise it would complain on all functions and that another error message is supposed to be spammed but isn’t for some reason. I know that the error messages have been updated recently so if I would have tried the latest version I might have got another message. Why I’m not updating right now is because we are in the middle of an important deliverable and it’s a no-can-do to update any middleware whatsoever right now.

  • You must to post comments
0
0

I noticed a little detail that might be of some help. One of the events that are spamming FMOD_ERR_INVALID_HANDLE when trying to set 3d attribs consists of three layers. In the game, when the error appears, they aren’t panned as a unit but instead the third layer (consisting of a tiny little sound) always appear in the wrong speaker. We have tried using both compressed and uncompressed data so I don’t think its one these XMA related errors but rather something related to pan-level which we are using for the event.

  • You must to post comments
0
0

I do have an idea about some of these messages. I have tracked one of the sound that are spamming and it seems like it spams "An invalid object handle was used" when the sound is outside max-distance. Could this be correct? Does this mean that I have to check if an event is outside max-distance before I try to set3DAttributes? Should I even stop the event? Or is this done automatically and if so then how do I catch it?

  • You must to post comments
0
0

[quote="torin_duboshit":17b3pq91]On loading I call getEventByIndex for each event and
check if sound 3d, after some calls fmod begins fail on getPropertyByIndex(FMOD::EVENTPROPERTY_MODE, &mode).

It returns FMOD_ERR_INVALID_HANDLE.
May be it’s same problem… Anyway why this occurs and what to do to avoid this?[/quote:17b3pq91]

have you verified that your max playbacks is high enough for the number of times you called getEventByIndex? If you call it more than that it will steal the other slots you got previously, and the old handles that got stolen will return FMOD_ERR_INVALID_HANDLE, that is the whole point of it.

  • You must to post comments
0
0

Guys? Can you please help me out here? These issues are really stalling my work…

  • You must to post comments
0
0

[quote="Ljudas":5s8rawod]I’m a bit confused about the meaning of the error message "An invalid object handle was used". The thing is that I keep getting it every now and then when I try to apply 3d attributes to certain events but I can’t figure out why. If I for instance have an event and execute event->getState it won’t complain and it returns a valid value but if the following execution is event->set3DAttributes (with a valid position for instance) it will say "An invalid object handle was used". Why is this? What am I missing here? I have read somewhere that the message should be more informative in future releases of FMOD but nevertheless I wonder why I sometimes can’t apply my 3d attribs. Worth noting is that before I try to apply 3d attribs I make sure that the event has mode=FMOD_3D which rules out the possibillity that I try to set 3d attribs to a 2d sound.[/quote:5s8rawod]

I am also getting this error incessantly.

  • You must to post comments
0
0

I collect info about sounds and call getEventByIndex with flag EVENT_INFOONLY. Sounds count is about 10000, of course max playbacks smaller than 10000 (it’s 1024). I expect that INFOONLY allows me get info from each sound. For info, functions start to fail on 2000+ call (not on 1025).

  • You must to post comments
0
0

Get the latest version – .49 is already available and we’ll be releasing .51 probably sometime today. I’m fairly sure your problem was fixed in .45 – if you can reproduce it using either .49 or .51 then we’ll need to dig deeper.

  • You must to post comments
0
0

[quote="Ljudas":wq5n1tpp]I’m a bit confused about the meaning of the error message "An invalid object handle was used". The thing is that I keep getting it every now and then when I try to apply 3d attributes to certain events but I can’t figure out why. If I for instance have an event and execute event->getState it won’t complain and it returns a valid value but if the following execution is event->set3DAttributes (with a valid position for instance) it will say "An invalid object handle was used". Why is this? What am I missing here? I have read somewhere that the message should be more informative in future releases of FMOD but nevertheless I wonder why I sometimes can’t apply my 3d attribs. Worth noting is that before I try to apply 3d attribs I make sure that the event has mode=FMOD_3D which rules out the possibillity that I try to set 3d attribs to a 2d sound.[/quote:wq5n1tpp]

I found the source of my issue. We had max playbacks set to 1 and consequence set to steal next, and were creating two instances. It looks to me like FMOD steals OLDEST when there is no "next" to steal from because it was the older instance of the Event that was invalid. Anyway, a solution is to just boost the max instance number. I hope this helps.

  • You must to post comments
0
0

wait, 1024 maxplaybacks for a single event? Do you realize the amount of memory that will be allocating? There is no way you would play 1 event 1024 times … right? The reason there is a maxplaybacks is so that FMOD can allocate memory up front for that number of simultaneous instances of a particular event. If you’re not playing it more than 1 or 2 times, dont set it to anything higher than 1 or 2.

Sounds count has nothing to do with this (you mean wave files right?), it is purely maxplaybacks in each event, or the other option is you are playing the events, and it ran out of virtual voices to use (EventSystem::init) which i’ve already covered. If you dont think it is either show me how you are reproducing this.
The last option is that you have simply corrupted the handle somehow.

  • You must to post comments
0
0

torin – I made some changes to EVENT_INFO_ONLY events recently which will probably fix your problem too. These changes will be available in .51 which will probably be released today.

Cheers,

  • You must to post comments
0
0

I am handling EVENT_CALLBACKTYPE_STOLEN so there should never be a case where I do something with a stolen an thus invalid event. Before I implemented this my code crashed almost instantly since alot of event got stolen here and these so I’m pretty sure I have it all covered up now since it’s a stable as FMOD. What I’m a bit suspcious about is that a channel not an event gets stolen and I can’t seem to find a way of catching this and settings the event as invalid. Also, I’m a bit confused about how to handle 3d attributes with respect to min/max distance. I read somewhere that it was a bad idea to have a low max-distance and we do have that on one of the spamming events. Maybee that’s the reason but if so why should it? Why can’t I have a low max-distance? I though that was a smart idea if I want to really silence some sounds outside a ceratin radius.

  • You must to post comments
0
0

No, not maxplaybacks for single event, but max virtual voices.

  • You must to post comments
0
0

We are in the middle of a delivery here and I’m not allowed to update FMOD until it’s done so I can’t verify that yet. If you missed it in my earlier posts we are using 4.4.41 so I guess alot of things may have been fixed since then. Is it possible for you to verify that this is a known bug that has been fixed or should I just hope for the best the day I upgrade :)

  • You must to post comments
0
0

[quote="Ljudas":3cpesimj]Also, I’m a bit confused about how to handle 3d attributes with respect to min/max distance. I read somewhere that it was a bad idea to have a low max-distance and we do have that on one of the spamming events. Maybee that’s the reason but if so why should it? Why can’t I have a low max-distance? I though that was a smart idea if I want to really silence some sounds outside a ceratin radius.[/quote:3cpesimj]

If this is obvious forgive me, but if you are using Logarithmic volume fall-off and setting a low max-distance, no matter how far away the sound is it will sound as though it is at max distance. We had a problem with this because the logarithmic fall-off didn’t get quiet fast enough and our sound designer said it is standard to have a radius of sound, beyond which you hear nothing. So, we use a Linear fall-off. With linear your max distance IS a distance beyond which you can’t hear the source.

  • You must to post comments
0
0

Ok you actually said ‘max playbacks’ which is exactly the term in the event properties, thats why i thought that.

Do you have a problem then? You aren’t really giving much info here, all i know is that you have got an error, i’ve explained a few times why you get it, is it ringing any bells?

  • You must to post comments
Showing 1 - 20 of 28 results
Your Answer

Please first to submit.