ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.46k stars 2.3k forks source link

Crash at startup: Unable to load DLL 'bass' #2386

Closed jai-x closed 6 years ago

jai-x commented 6 years ago

osu!lazer is unable to load the bass.dll file despite it being present in the build output directory.

Platform: Linux kernel 4.14.11-1 64bit Compiler/Runtime: .NETCore 2.1.103
Note: I am using a patched version of the OpenTK.dll file with these changes: https://github.com/ppy/opentk/pull/16

Relevant Runtime Exception:

[runtime:error] fatal error:
[runtime:important] System.DllNotFoundException: Unable to load DLL 'bass': The specified module or one of its dependencies could not be found.
 (Exception from HRESULT: 0x8007007E)
   at ManagedBass.Bass.GetDeviceInfo(Int32 Device, DeviceInfo& Info)
   at ManagedBass.Bass.get_DeviceCount()
   at osu.Framework.Audio.AudioManager.getAllDevices() in /home/jai/Projects/osu/osu-framework/osu.Framework/Audio/AudioManager.cs:line 188
   at osu.Framework.Audio.AudioManager.updateAvailableAudioDevices() in /home/jai/Projects/osu/osu-framework/osu.Framework/Audio/AudioManager.cs:line 290
   at osu.Framework.Audio.AudioManager.setAudioDevice(String preferredDevice) in /home/jai/Projects/osu/osu-framework/osu.Framework/Audio/AudioManager.cs:line 198
   at osu.Framework.Audio.AudioManager.<>c__DisplayClass28_0.<onDeviceChanged>b__0() in /home/jai/Projects/osu/osu-framework/osu.Framework/Audio/AudioManager.cs:line 139
   at osu.Framework.Threading.Scheduler.Update() in /home/jai/Projects/osu/osu-framework/osu.Framework/Threading/Scheduler.cs:line 147
   at osu.Framework.Threading.GameThread.ProcessFrame() in /home/jai/Projects/osu/osu-framework/osu.Framework/Threading/GameThread.cs:line 124
   at osu.Framework.Threading.GameThread.runWork() in /home/jai/Projects/osu/osu-framework/osu.Framework/Threading/GameThread.cs:line 106
   at System.Threading.Thread.ThreadMain_ThreadStart()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'bass': The specified module or one of its dependencies could not be found.

Directory Hierarchy:

osu.Desktop/bin/Debug/netcoreapp2.0/
├── libbass.dylib
├── libbass_fx.dylib
├── libbass_fx.x64.so
├── libbass_fx.x86.so
├── libbass.x64.so
├── libbass.x86.so
├── ManagedBass.dll.config
├── ManagedBass.Fx.dll.config
├── OpenTK.dll                               <-- Patched file
├── osu!.deps.json
├── osu!.dll
├── osu.Framework.dll
├── osu.Framework.pdb
├── osu.Game.dll
├── osu.Game.pdb
├── osu.Game.Resources.dll
├── osu.Game.Resources.pdb
├── osu.Game.Rulesets.Catch.dll
├── osu.Game.Rulesets.Catch.pdb
├── osu.Game.Rulesets.Mania.dll
├── osu.Game.Rulesets.Mania.pdb
├── osu.Game.Rulesets.Osu.dll
├── osu.Game.Rulesets.Osu.pdb
├── osu.Game.Rulesets.Taiko.dll
├── osu.Game.Rulesets.Taiko.pdb
├── osu!.pdb
├── osu!.runtimeconfig.dev.json
├── osu!.runtimeconfig.json
├── x64
│   ├── avcodec-51.dll
│   ├── avformat-52.dll
│   ├── avutil-49.dll
│   ├── bass.dll                             <-- existing dll not found by program
│   ├── bass_fx.dll
│   ├── d3dcompiler_47.dll
│   ├── libEGL.dll
│   ├── libGLESv2.dll
│   ├── pthreadGC2.dll
│   └── SQLite.Interop.dll
└── x86
    ├── avcodec-51.dll
    ├── avformat-52.dll
    ├── avutil-49.dll
    ├── bass.dll
    ├── bass_fx.dll
    ├── d3dcompiler_47.dll
    ├── libEGL.dll
    ├── libGLESv2.dll
    ├── pthreadGC2.dll
    └── SQLite.Interop.dll
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56970049-crash-at-startup-unable-to-load-dll-bass?utm_campaign=plugin&utm_content=tracker%2F4707269&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F4707269&utm_medium=issues&utm_source=github).
peppy commented 6 years ago

Pretty sure this should be reported against framework, not osu!.

StartForKiller commented 6 years ago

Can linux load .dll? I think is .so

james58899 commented 6 years ago

dllmap not work on dotnet core try rename libbass.x64.so to libbass.so and set LD_LIBRARY_PATH

Aergwyn commented 6 years ago

Did ppy/osu-framework#1617 solve this as well?

jai-x commented 6 years ago

Yes, it did.