Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug FMOD returns error code 36 (FMOD_ERR_INVALID_HANDLE) executing setRelativeAudibility

Discussion in 'Audio & Video' started by AllenAtFortis, Dec 22, 2022.

  1. AllenAtFortis

    AllenAtFortis

    Joined:
    Apr 8, 2022
    Posts:
    2
    Our project
    WebGL
    Unity 2022.1.23f1

    Things were going well as we started adding audio to our project, but we recently started getting this error when we tried to call Play() on any AudioSource.

    FMOD returns error code 36 (FMOD_ERR_INVALID_HANDLE) executing setRelativeAudibility

    I have tried updating to Unity 2022.2.1f1, but i still get the error.
    Funny thing, when I went back to 2021.3.16f1, I stopped having that issue and everything seems fine. Is there something different in 2022 that I need to account for when using Audio in WebGL? We are currently just using mp3 files.
     
  2. elit

    elit

    Joined:
    Aug 11, 2012
    Posts:
    3
    Up, need help too. After 3 days of test i don't have solution. This add memory and crash app after many time

    WebGL
    Version 2022.2.2f1
     
  3. melnikov0220

    melnikov0220

    Joined:
    Aug 10, 2019
    Posts:
    2
  4. Microph

    Microph

    Joined:
    Apr 9, 2016
    Posts:
    5
    up +1

    still happening on WebGL
    Version 2022.2.3f1
     
  5. VgReborn_2

    VgReborn_2

    Joined:
    Apr 17, 2020
    Posts:
    4
    up + 1

    Version 2022.2.1f1
    Interestingly sometimes the bug calls, sometimes it doesn't in my case
     
  6. Microph

    Microph

    Joined:
    Apr 9, 2016
    Posts:
    5
    up +1

    still happening on WebGL
    Version 2022.2.4f1
     
  7. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    23
    It happens on WebGL in 2022.2.5, 2022.2.6 and 2023.1.b3, the audio is fine it's working but I just get spammed with this error in build

    The game works fine in 2021.1.28 but I wanted decals and rendering layers

    EDIT: It happens when you play something after an audio source was destroyed or the scene was reloaded
     
    Last edited: Feb 23, 2023
  8. Noonf

    Noonf

    Joined:
    Dec 27, 2020
    Posts:
    1
    I also get this error in versions 2022.2.5, 2022.2.6 . Tried a lot of things, but the problem remains
     
  9. AdionN

    AdionN

    Joined:
    Nov 6, 2019
    Posts:
    16
    Have anyone made bug report about this?
     
  10. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    54
  11. Suranjan_RedTailFox

    Suranjan_RedTailFox

    Joined:
    Mar 6, 2020
    Posts:
    3
  12. Aoedipus

    Aoedipus

    Joined:
    Jan 31, 2019
    Posts:
    25
    same. 2022.2.7f1 URP WebGL

    In my case it always occurs on the second time played, and forever after. First time sound is called it plays as expected.

    Perhaps someone from Unity's WebGL team can tell us the path to where in the codebase we can comment the offending line until there's an actual fix? I'm having a tough time locating it and would prefer not having to roll back again...
     
    Last edited: Feb 20, 2023
    Noonf likes this.
  13. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Same issue for us. Is there a bug report for this?
     
  14. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    Hi everyone,

    I find no report on the public issue tracker or in our internal backlog. I'm really sorry about this. :oops:

    Some of you seem to say that it's more of an inconvenience but @elit says it's leaking memory which is a serious concern. Please you submit a bug report, the most helpful thing you can do is to provide a sample project highlight a reproduction of the issue.

    Thank you all for your help!

    edit: typo
     
  15. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    23
    I've sent a bug report last week with a small project and instructions attached CASE IN-32105
     
  16. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    Hi @Laur3nt1u ,

    Strangely I cannot find it on the public (or internal) issue tracker... Maybe it is still processing or something went wrong during the submission. Did you receive a url to track you issue that you could share?

    Thanks!
     
  17. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    23
    SeventhString likes this.
  18. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    I tried to use the FMOD plugin to try to bypass the issue but I had no luck. It is too convoluted. I could not figure out how to use it without changing the audio listeners and the audio sources, and worst installing their Studio. :(

    A temp way to comment out the error would be ideal since it does not seem to cause any issues otherwise.
     
  19. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    It seems like there is an issue according to this reply. The bug report as been created, and we'll eventually get to it! The WebGL platform audio support is the most interesting challenge we have in my opinion. Can't wait to see how it will evolve ;)
     
    xucian likes this.
  20. AdionN

    AdionN

    Joined:
    Nov 6, 2019
    Posts:
    16
    I also created bug report for it. IN-32364

    Thank you for your hard work :) WebGL 2.0 must be hard as it is ages old code and it does have too many limitations for Unity to shine.
     
    SeventhString likes this.
  21. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    23
  22. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    There you go! :cool:
    Thank you for submitting the issue and also for the follow up!
     
  23. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    H
    Hang on, sorry, but that’s not even REMOTELY a valid response. It’s a regression, but the only solution is to upgrade to a current alpha? Am I reading that correctly and that there will be no fix for 2022.2? And what about 2022.3 (when it’ll be released)?
     
    Unifikation and xucian like this.
  24. hMark

    hMark

    Joined:
    Oct 16, 2013
    Posts:
    16
    I agree with VOTRUBEC, this has to be fixed in 2022.2 as well.
     
    xucian likes this.
  25. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    Hi @VOTRUBEC & @hMark ,

    I hear you. I also wish we could fix everything on all the available releases. It's obviously not my call, I will make sure to report your input to the appropriate people.

    Don't quote me here, but I think the reason why it's not also put in 2022 is because it's not an LTS version, and thus there is no kind of guarantee that fixes are backported. This being said, I have no idea why there is no 2022 LTS version available...
     
    xucian likes this.
  26. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    Hi! Good news on that matter.

    Poking around we figured that this was related to another internal issue, a fix deeper in FMOD for which backports should include 2022.2.
     
  27. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    Thank you and the team for digging around. It sounds like a fix should be possible, as I'd hate to have to backport the project to 2021 just because of this one issue. I'm sure there's a few people here that would appreciate any update and news when it comes to hand. I understand the commitment to the LTS release, and I'm also curious as to when 2022 will enter LTS. But for the time being, again, thank you for your efforts.
     
  28. moserchristian

    moserchristian

    Joined:
    Dec 12, 2021
    Posts:
    3
    Please fix this issue in 2022.1/2, as it issues thousand of error messages per minute.
     
  29. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Has anyone tried 2022.2.10f1 by any chance?
     
  30. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    803
    Did the fix arrive in any 2022.1/2022.2 version?
    2022.2 was unusable last time I checked, but I'd give it another try if it has the bugfix
     
  31. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    Also having this message spammed after upgrading from 2021 to 2022. Currently running 2022.2.11. I'm not sure if it's having negative effects on the game or not, but the spammed error log surely doesn't help for tracking other bugs.

    I def don't want to upgrade to 2023 since it's in alpha, so a real fix for 2022 would surely be nice.
     
    bradshep and xucian like this.
  32. AndrewAlexArt

    AndrewAlexArt

    Joined:
    Aug 23, 2019
    Posts:
    4
    Same bug in 2022.2.12f1. One of the solutions do not use Unity AudioSource and switch it to FMOD because looks like Unity used very old FMOD technology.
     
    SeventhString likes this.
  33. cybernetsurfer7

    cybernetsurfer7

    Joined:
    May 21, 2015
    Posts:
    4
    Thanks to you and your team for looking into this. Is there a bug report posted somewhere that we could track the progress on this? Will this one be updated with the new fix or is there another place to track: https://issuetracker.unity3d.com/is...e-scene-reload-or-an-audiosource-is-destroyed

    Thanks again.
     
  34. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    I got this. Backports are probably already in progress. Sadly I can't provide any version or ETA regarding the fix delivery :(
     
  35. cybernetsurfer7

    cybernetsurfer7

    Joined:
    May 21, 2015
    Posts:
    4
    @SeventhString Thanks for the update that they're likely in progress. Would you be able to post an update when there is any news? I and I'm sure others are watching this thread.
     
  36. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    In patch notes for 2022.2.13 it says this:
    • WebGL: Fixed FMOD console errors when a scene is reloaded. (UUM-19241)
    I'm assuming this may have been fixed in 2022 then. I'll have to test to see for sure.
     
  37. cybernetsurfer7

    cybernetsurfer7

    Joined:
    May 21, 2015
    Posts:
    4
    @therobby3 Thank you so much for catching this! I upgraded to the new version and gave it a shot. Looks like the endless FMOD errors have ceased! And thank you @SeventhString for getting this on the dev's radar.
     
    SeventhString likes this.
  38. CheekyJoy

    CheekyJoy

    Joined:
    Apr 6, 2022
    Posts:
    4
    Unity 2022.2.13f1 still look like:
     

    Attached Files:

  39. CheekyJoy

    CheekyJoy

    Joined:
    Apr 6, 2022
    Posts:
    4
    solve this problem using DontDestroyOnload on my audiosources
     
  40. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Hello,

    How did you set this? In code?

    Thanks,
    crafTDev
     
  41. CheekyJoy

    CheekyJoy

    Joined:
    Apr 6, 2022
    Posts:
    4
  42. CheekyJoy

    CheekyJoy

    Joined:
    Apr 6, 2022
    Posts:
    4
    Problem come back
     
  43. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I am seeing this too is it fixed anywhere?
     
  44. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    23
    I've been stuck on 2021.1.28 every new version has a different audio problem not even 2021.3 LTS is good
     
    Last edited: May 17, 2023
  45. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,073
    the attitude towards a regression must be that it gets fixed. It can't be that a regression force version changes. This is irresponsible in the extreme. Users are stuck to big point versions for LOTS of reasons, almost all Unity caused, in that going up a year see dozens or even hundreds of other regressions.

    In WebGL world, the iteration time is far faster for game makers, they're often running live games and using WebGL precisely because they can iterate over live game updates with far more ease than the submission processes of other platforms, etc.

    It's interesting that you say this:

    Are you perhaps aware of ways that you could eventually offer OnAudioFilterRead to WebGL users?

    No platform is more fittingly suited to the kinds of optimisations possible with this feature of default Unity Audio, which works on ALL other platforms, just not WebGL, where it's most needed.
     
  46. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    380
    I hear you. I am painfully aware of Unity's shortcomings regarding audio and the web platform. I've been in sound and games for a while, and since I joined the company a few months ago, I've been vocal about how this platform is important (as I personally believe it's where the future lies!).

    The case of audio on the web for Unity is a rough one. It's the only platform that cannot leverage our audio engine because of multithreading issues, so it's basically a pile of shim between WebAudio and the engine's interface. Now what's interesting is that WebAssembly has made interesting steps around concurrency, so I hope that one day we'll be able to make a case for finally unifying our audio backend on all platforms by porting it to the web.

    That would fix a lot the the audio discrepancies we're talking about here.
     
  47. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,073
    It might be best to think of WebGL as a unique platform, and not try to shoehorn everything into it, and even have a separate license for it, especially now that Project Tiny is a distant memory.
     
  48. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,073
    It's where a very large future lays, now that VR has finally played itself out and revealed itself to be a novelty for a long time to come.

    In terms of ad games and dynamic, engaging experiences that are truly portable, nothing beats WebGL and Unity could and should have the ultimate foothold into it. I wish you all the best with convincing the management that WebGL is special... because it is. They don't seem to see how uniquely special it is, nor how they could build a pared down editor just to target it, and only it, as those working/aiming at WebGL aren't going to be expecting to easily port to other platforms, and vice versa.

    WebGL is unlike all other platforms in that it's an end unto itself.
     
    SeventhString likes this.
  49. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    177
    Just switched from 2021.3.25 to 2022.2.19 and will probably have to go back to 2021 because of this. Bizarre that they only fixed it in Alpha version.
     
  50. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    Yea, not sure what's going on. I don't know if it was fixed in a version then came back, or what. But I'm still getting spammed with this error again in version 2022.2.19. Error is as follows:

    ./Modules/Audio/Public/AudioSource.cpp(1574) : Error executing dspHead->setRelativeAudibility(relativeAudibility) (An invalid object handle was used. )
     
    avsanwork likes this.