Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug AudioClip.GetData() crashes in the Editor

Discussion in 'Audio & Video' started by DreamingImLatios, Oct 4, 2023 at 12:26 AM.

  1. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,934
    This has been a long-running bug for me, of which I have reported multiple times over the last three years. It is a bug that only affects ECS projects, and now with ECS being well into production status, I'm hoping someone will finally take this seriously.

    The issue happens simply by calling AudioClip.GetData() inside a baker or baking system that runs during background subscene import. The crash logs errors about FMOD not being able to find some kind of audio device (seems to be slightly different on different machines) and performs a fatal abort. It doesn't happen all the time, and more frequently occurs on some machines than others and also occurs more frequently after a domain reload. Because of all this, I suspect there's a race condition deep within the engine/editor related to audio.

    Happens on the latest LTS and pretty much every single version prior.
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    261
    Can you give me the link of the bug report you submitted? I'll have a look at it.

    Cheers!
     
  3. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,934
    IN-18952 is one of the reports. It should link to the others. However, if you need something simpler and more up-to-date with the latest ECS version, I can try to put something together.