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

Only build crashing on scene load with 2019.4.32

Discussion in 'Windows' started by Ormy, Oct 31, 2021.

  1. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    Hey! We recently upgraded from 2019.3.11f1 to the latest 2019.4 version. Everything works fine in the editor but the game crashes on sceneload in build. We've been debugging, fixing and trying different solutions to this for days without any progress so I thought if anyone could help me? This happens to both of us with different PC configurations and the game is a VR hunting game using SteamVR.

    Here is pastebin of the Player log: https://pastebin.com/ut3UkKap

    Thank you so much if anyone could help us out here!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Do you have a dump file from the crash? It should be here:
    Code (csharp):
    1. A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
    2. * E:/WINDOW~1/VirtualHunterTeam/VirtualHunter/Crashes
     
  3. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    Hey! Here you go. Added everything from the folder there. Hope it helps! We've been on this for 4 days now.
     

    Attached Files:

  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    It seems the crash occurs when you call AudioSource.PlayOneShot. Do you do that with a lot of audio clips? Perhaps you could add some logging to narrow down which one is causing it?
     
  5. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    That is very, very weird. Don't think we use it during / after scene has loaded. It worked perfectly fine with 2018.3.11 and this started happening when we updated to the LTS version. Nothing else was changed. At least it's something to look for!
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,503
    Could you also run the game using "-debugallocator" command line argument and send me a new dump resulting from that? It might reveal more information.
     
  7. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    Hope I did it right. Here you go!
     

    Attached Files:

  8. janusl

    janusl

    Unity Technologies

    Joined:
    Aug 8, 2018
    Posts:
    24
    Do any of the audio sources you use PlayOneShot with contain MonoBehaviours with OnAudioFilterRead?
     
  9. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    Searched through the entire solution and got no hits so I'd say no.
     
  10. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    Wait! Ambient sound asset is using that! No idea why it didn't come up when searching through the whole project but oh well. I'll remove the asset from the scene and see if that helps.
     
  11. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    I got it to load! All I did was disable Ambient Sound asset that we use and disable audiosource from our player. So it is from playing audio. This helps a lot and now I know where to focus. Thank you so much!

    Edit: After testing multiple different setups, it all came down to a single audiosource which we use to play the players footsteps. And just that. I reverted everything I've done for the past 4 days and just disabled that one audiosource. Why that one is the problem? No idea
     
    Last edited: Nov 1, 2021
  12. zollenz

    zollenz

    Unity Technologies

    Joined:
    Jun 4, 2019
    Posts:
    19
    Do you have more information on the settings of that particular audio source (player footsteps) and the other components attached to the game object? Do any of the attached components implement OnAudioFilterRead?
     
    Last edited: Nov 2, 2021
  13. Ormy

    Ormy

    Joined:
    Jun 10, 2013
    Posts:
    10
    We had Ambiance Manager (Ambient Sounds asset) in the player with the audio source. These two didn't get along apparently and the issue was fixed by moving the audio source to the players foot. Ambient Manager uses OnAudioFilterRead. Extremely weird issue since it has worked with 2019.3.11 for over a year!
     
  14. zollenz

    zollenz

    Unity Technologies

    Joined:
    Jun 4, 2019
    Posts:
    19
    There seems to be a corner case we are not handling correctly, but I haven't been able to reproduce it based on the information at hand. If you can find the time, it would be great if you could file a bug report with a minimal repro project.