Search Unity

several Unity games segfault at "FMOD failed to get number of drivers" when pulseaudio isn't running

Discussion in 'Audio & Video' started by ambidot, Nov 25, 2015.

  1. ambidot

    ambidot

    Joined:
    Nov 25, 2015
    Posts:
    4
    notably, Rust and Dreamfall Chapters have the issue, but certain other Unity games like Layers of Fear and Pony Island don't.

    the segfaults are always at startup, after pressing "Start" in the Unity dialog. the affected games work when pulseaudio is running.

    in case it's relevant, I'm not a dev.

    UPDATE: InversePhase's workaround below works for me. #16
     
    Last edited: Jan 13, 2017
  2. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    354
    We're having the same issue with our game. It worked with 5.1.3p3 but people started to complain when we updated to 5.2.3, that it doesn't work anymore without Pulseaudio. I went trough the changelog and didn't find any notable audio-changes between these versions.

    What could it be? Could anyone from the Unity audio team help us here?
     
  3. ambidot

    ambidot

    Joined:
    Nov 25, 2015
    Posts:
    4
    :OO all hail the krautscape dev
    please have mercy on my mortal soul
     
  4. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    Thanks for the report - we're investigating the issue.
     
  5. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    A fix for the crash will land in 5.3.0p1.
    We're still investigating why we aren't successfully initializing ALSA instead of Pulse in these cases.
     
  6. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    308
    In our case (Starward Rogue), we are seeing this while using unity version:

    Version 5.3.2f1 (e87ab445ead0)
    Fri, 22 Jan 2016 15:21:35 GMT
    Branch: 5.3/release

    However, when launching from steam it is giving one player the error above, but when launching NOT from steam, it works fine. More details are here: https://www.arcengames.com/mantisbt/view.php?id=18667

    But the relevant bits:

    When run not from steam, we get this in the player log:

    ----------
    AudioManager: Using ALSA: default
    ----------

    When run from Steam, we get this instead:

    ----------
    FMOD failed to get number of drivers ... An error occured that wasn't supposed to. Contact support.

    (Filename: Line: 533)
    ----------
     
    Last edited: Feb 3, 2016
  7. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    112
    I'm having a similar issue as @x4000, using Unity 5.3.2p4, is there a fix yet?
     
  8. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    308
    Just to confirm that I've heard absolutely zip.
     
    bakanekofr likes this.
  9. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    354
    We're also still seeing the issue.

    @Tak do you have an update on the issue?
     
  10. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    112
    Was it fixed in 5.3.3 released today?
     
  11. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    354
    don't know, when I download 5.3.3 the assistant installs 5.3.2p3

    Edit: Unity.app shows 5.3.2p3, but the playback engines show 5.3.3f1 (in ivy.xml). Seems to be some problem with the download... I deleted the old installation first to make sure I don't mix versions.
     
  12. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    112
    Please keep me in touch. Unfortunately this bug doesn't happen on my PC, so I can't check it out myself. Thanks!
     
  13. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    If you get different results when running from Steam vs. not, it means that the ALSA libraries in the Steam runtime don't match the drivers on the system - there's nothing we can do about this on our end.
     
  14. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    308
    Okay, thanks for the information on that. Can you clarify why that would matter, though? Presumably once the game is launched from any context, it then exists within its own process that is isolated from where it was launched from.

    Are you saying that the steam overlay itself is likely hooking in with incompatible drivers? I know that the steam overlay has voice chat capabilities, so perhaps disabling those might solve the issue.

    My question is simply: are you suggesting that the steam overlay (which is being injected into the process) is the problem, or that the launch context itself is the problem?
     
  15. InversePhase

    InversePhase

    Joined:
    Apr 1, 2016
    Posts:
    2
    I am an end-user (that is, I purchased games and I want to play them) and I am experiencing crashes as well. I think all titles that dump the "FMOD failed to get number of drivers" error to Player.log crash and do not run at all. It is extremely frustrating!

    Off the top of my head:
    - Galaxy Admirals
    - Hatch and Slay
    - Life is Hard
    - Stop Online - Battle of Words
    - Tales of the Orient - The Rising Sun
    - The Deer
    ...and the big one...
    - Wasteland 2: Director's Cut

    Brett (Paterson, FMOD) responded to a very frustrated tweet today saying it is a Unity problem. I don't care who's at fault, I would just like to do whatever I can to get to the bottom of this.
     
  16. InversePhase

    InversePhase

    Joined:
    Apr 1, 2016
    Posts:
    2
    Unofficial and confusing resolution time:

    Ultimately, the solution is to find all instances of libpulse-simple* and rename or remove the files. Places to check:

    /usr/lib
    /usr/lib32
    ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/
    ~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/

    ALL of them must be renamed or removed.

    I always find the way I arrived at a solution enlightening and useful for future reference. What made my specific situation confusing is that pulse did not exist *at all* when I first had the problem. While attempting to fix the problem, I installed an arch package called "pulseaudio-fake" which somehow depended on libpulse but not pulseaudio. Then I ended up with libpulse-simple on my system, which I renamed as mentioned above.

    I'd like to thank Tak for helping me dig through this problem on IRC. It looks like this was a dumb edge-case that is now handled in future versions of Unity, according to our discussion.
     
  17. kshade

    kshade

    Joined:
    May 17, 2015
    Posts:
    1
    You can add Kerbal Space Program 1.1 pre to that list, "we" (I'm not a dev, just a user) came to the same conclusion as you.
     
  18. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    It has been two weeks without any word on this bug which makes games not run at all or run with no sound for a large amount of linux players. Can we have an update?
     
  19. ambidot

    ambidot

    Joined:
    Nov 25, 2015
    Posts:
    4
    can confirm this works for almost all segfaulting Unity games.

    the only exceptions I've found are Infinifactory, which unconditionally crashes when ALSA is configured to use dmix (standard on non-pulse distros), and requires a simple "hw:X,Y" ALSA config instead; and Epistory - Typing Chronicles, which at one point fails to present a critical objective thus getting the player stuck, and is resolved by the same ALSA config. both Infini and Epistory use FMOD.
     
    Last edited: Feb 17, 2017
  20. prometx

    prometx

    Joined:
    May 2, 2016
    Posts:
    1

    Wow, InversePhase, Tak, you really went deep on this one; been trying to figure this one out for Wasteland 2: Directors Cut for a few days now. The above described was, precisely, my problem. Well done sirs, and or madames...

    I've "cross-referenced" to inXile's forums where some other endusers are having issues:

    https://forums.inxile-entertainment.com/viewtopic.php?f=34&t=14060&p=171785#p171785

    (hope that's alright to mention...)

    At any rate, thanks much for your diligence!

    Best,

    Prometx
     
  21. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    This is barely a solution, just an ugly hack that will most likely break some other installed applications using pulseaudio properly just to make a Unity game work somehow...
    I guess if you just really want to play it is an option, but it does in no way remove the need for a proper fix.
     
  22. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    308
    This is perhaps better? It's something that one of my players came back with:

    Quoting her:
    ------

    http://bugs.kerbalspaceprogram.com/issues/7515 [^] (post 33)

    ln -s /dev/null libpulse-simple.so.0 in the game directory

    LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH %command% in launch options.

    Every Unity 5 game has sound for me now.
     
    Last edited: May 4, 2016
  23. venetasoft

    venetasoft

    Joined:
    May 6, 2016
    Posts:
    3
    I solved installing pulseaudio:

    sudo apt-get install pulseaudio
     
  24. venetasoft

    venetasoft

    Joined:
    May 6, 2016
    Posts:
    3
    I solved installing pulseaudio too:

    sudo apt-get install pulseaudio
     
  25. x4000

    x4000

    Joined:
    Mar 17, 2010
    Posts:
    308
    That's a bit beside the point, though, honestly -- the issue is that this doesn't work when pulseaudio is missing. For instance in the case of my player who was reporting issues, she is a composer and uses different sound libraries. Adding in pulseaudio for unity games would break her ability to compose.
     
  26. alex_rozhdestvensky

    alex_rozhdestvensky

    Joined:
    Jul 1, 2016
    Posts:
    1
    Still have same problem only when target is Android. We try build our application on remote server (Debian 3.16.7-ckt20-1+deb8u4, unity: unity-editor-5.3.5f1+20160525_amd64.deb).

    Importing game controller configs
    Loading GUID <-> Path mappings...0.000538 seconds
    Loading Asset Database...0.066990 seconds
    FMOD failed to get number of drivers ... An error occured that wasn't supposed to. Contact support.
    (Filename: /home/builduser/buildslave/unity/build/Runtime/Audio/AudioManager.cpp Line: 533)

    Audio: FMOD Profiler initialized on port 54900
    AudioManager: Using Unknown: NoSound Driver
    AssetDatabase consistency checks...3.359821 seconds
    Build target platform 'Android' could not be used.
    (Filename: /home/builduser/buildslave/unity/build/Editor/Src/Application.cpp Line: 673)

    Aborting batchmode due to failure:
    Fatal error! Build target platform 'Android' could not be used.

    But our server has current audio device:
    00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)

    I try all instructions at this thread and by link: https://medium.com/@h0lycattle/runn...ss-ubuntu-environment-1adf95c05994#.iwo5in1ey

    but error still same.

    Can anybody help please?
     
  27. ambidot

    ambidot

    Joined:
    Nov 25, 2015
    Posts:
    4
    this is still an issue on Arch Linux x86_64.