Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Failed to get number of drivers

Discussion in 'Linux' started by The-Little-Guy, Dec 31, 2015.

  1. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    When I start up Unity I get this error in the console:

     
  2. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    Do you have PulseAudio installed and enabled? Sound doesn't seem to work without it.

    Edit: Check if PulseAudio is running with pulseaudio --status
     
    Last edited: Jan 1, 2016
  3. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    I get this message:

    pulseaudio: unrecognized option '--status'
     
  4. kborch

    kborch

    Joined:
    Aug 3, 2012
    Posts:
    12
    @The Little Guy ..

    To check if pulseaudio is running you can do either

    ps -e | grep pulseaudio , and see if it finds the daemon process , or you can do

    pulseaudio --check; echo $?

    echo $? shows you the exit status of the previous command, and pulseaudio --check will exit 0 if pa is running for the current user, according to the manpage. In other words if you get a 0 on the console you know pulseaudio is running.
     
  5. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    @kborch

    I get an exit code of "1" I tried starting it, but it didn't start
     
  6. kborch

    kborch

    Joined:
    Aug 3, 2012
    Posts:
    12
    @The Little Guy

    Ok, do you get some errors on the console then?

    Did you try like this: pulseaudio

    Or like this: pulseaudio --start

    Or both?

    Did it complete by itself or hang when you tried?
     
  7. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    actually I did it like this:

    sudo service pulseaudio start

    doing this worked though:

    pulseaudio

    pulseaudio --start

    Started the service
     
  8. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
    After restarting Unity, my driver issue is gone!

    I get this message though (which I was getting before):

     
  9. kborch

    kborch

    Joined:
    Aug 3, 2012
    Posts:
    12
    Congrats! :)

    Perhaps mark this as solved then.

    kLargestEditorClassID == ms_MaxClassID

    ^^ I get this error as well but only once on startup, as far as I can tell
     
  10. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Unfortunately this is also happening in the Linux standalone builds. Especially problematic when running a headless build on a dedicated server which obviously won't run any audio stuff.
    At startup:
    Code (csharp):
    1.  
    2. NullGfxDevice:
    3.     Version:  NULL 1.0 [1.0]
    4.     Renderer: Null Device
    5.     Vendor:   Unity Technologies
    6. FMOD failed to get number of drivers ... An error occured that wasn't supposed to.  Contact support.
    After assemblies have been loaded:
    Code (csharp):
    1.  
    2. Platform assembly: /home/sdtd/engine/7DaysToDieServer_Data/Managed/Boo.Lang.dll (this message is harmless)
    3. Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource, (An invalid object handle was used. )
    4.  
    5. (Filename:  Line: 858)
    6.  
    7. Function SoundHandle::Instance::~Instance() may only be called from main thread!
    8.  
    9. (Filename:  Line: 25)
    10.  
    11. Unable to enable tracing: Invalid argument
    12.  
    13. (Filename:  Line: 1323)
    14.  
    15. Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource, (An invalid object handle was used. )
    16.  
    17. (Filename:  Line: 858)
    18.  
    19. Function SoundHandle::Instance::~Instance() may only be called from main thread!
    20.  
    21. (Filename:  Line: 25)
    22.  
    23. Unable to enable tracing: Invalid argument
    24.  
    25. (Filename:  Line: 1323)
    26.  
    27. Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource, (An invalid object handle was used. )
    28.  
    29. (Filename:  Line: 858)
    30.  
    31. Function SoundHandle::Instance::~Instance() may only be called from main thread!
    32.  
    (And so on)

    Also sometimes later on:
    Code (csharp):
    1. Error: Cannot create FMOD::Sound instance for resource resources.resource, (An invalid object handle was used. )

    Does not seem to affect the server so far but also didn't do any stress tests as this is currently an internal only build. Same as with shaders and stuff: Why does the headless build have to even initialize this stuff?


    Regards,
    Chris
     
  11. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    This is occurring in certain builds when PulseAudio is available but not running (a fix will be available in an upcoming build).
    As a workaround, you can enable (or remove) PulseAudio.
     
  12. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Thanks :)
    On my machine it's only libpulseaudio that's installed, but I suppose that's what you mean by "available" ;)
     
  13. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    In older versions, it tries to run pulseaudio --check - in newer versions (before the fix), it mistakenly just checks for libpulse-simple.so.0
     
  14. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Yeah, it's a 5.3.3p2 build, so that explains why it's doing that :)
     
  15. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    I have similar issue on Android, when building with “split obb” option. In runtime application freezes instead of starting OBB download:
    Code (csharp):
    1. E/Unity(8332): Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource, (File not found. )
    2. E/Unity(8332):
    3. E/Unity(8332): (Filename:  Line: 858)
    4. E/Unity(8332): Function SoundHandle::Instance::~Instance() may only be called from main thread!
    5. E/Unity(8332):
    6. E/Unity(8332): (Filename:  Line: 25)
    7. E/mono(8332): Unhandled Exception: System.ExecutionEngineException: SIGILL
     
  16. venetasoft

    venetasoft

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

    sudo apt-get install pulseaudio