Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono crash regarding LibUSB #487

Open
NightSprinter opened this issue Jan 27, 2025 · 2 comments
Open

Mono crash regarding LibUSB #487

NightSprinter opened this issue Jan 27, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@NightSprinter
Copy link

Describe the bug
Crash, claiming LibUSB is not found.

To Reproduce

`Unhandled Exception:

System.DllNotFoundException: libusb-1.0 library not found. This is often an indication that libusb-1.0 was installed to '/usr/local/lib' and mono.net is not looking for it there. To resolve this, add the path '/usr/local/lib' to '/etc/ld.so.conf' and run 'ldconfig' as root. (http://www.mono-project.com/DllNotFoundException) ---> System.DllNotFoundException: libusb-1.0 assembly: type: member:(null)
at (wrapper managed-to-native) MonoLibUsb.MonoUsbApi.Init(intptr&)
at MonoLibUsb.MonoUsbSessionHandle..ctor () [0x00022] in <860e43ad45e14d59bf62e8efe5c0922a>:0
--- End of inner exception stack trace ---
at MonoLibUsb.MonoUsbSessionHandle..ctor () [0x00043] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init (MonoLibUsb.UnixNativeTimeval unixNativeTimeval) [0x0001b] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init () [0x00005] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbApi.InitAndStart () [0x00008] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.LudnMonoLibUsb.MonoUsbDevice.get_MonoUsbDeviceList () [0x00010] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.Main.LegacyUsbRegistry.get_DeviceList () [0x0000d] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllLibUsbDevices () [0x00099] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllDevices () [0x00042] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at com.clusterrr.clovershell.ClovershellConnection.mainThreadLoop () [0x00016] in <0442cd6e02f641f9b95498b81f6f5149>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libusb-1.0 library not found. This is often an indication that libusb-1.0 was installed to '/usr/local/lib' and mono.net is not looking for it there. To resolve this, add the path '/usr/local/lib' to '/etc/ld.so.conf' and run 'ldconfig' as root. (http://www.mono-project.com/DllNotFoundException) ---> System.DllNotFoundException: libusb-1.0 assembly: type: member:(null)
at (wrapper managed-to-native) MonoLibUsb.MonoUsbApi.Init(intptr&)
at MonoLibUsb.MonoUsbSessionHandle..ctor () [0x00022] in <860e43ad45e14d59bf62e8efe5c0922a>:0
--- End of inner exception stack trace ---
at MonoLibUsb.MonoUsbSessionHandle..ctor () [0x00043] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init (MonoLibUsb.UnixNativeTimeval unixNativeTimeval) [0x0001b] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init () [0x00005] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbApi.InitAndStart () [0x00008] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.LudnMonoLibUsb.MonoUsbDevice.get_MonoUsbDeviceList () [0x00010] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.Main.LegacyUsbRegistry.get_DeviceList () [0x0000d] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllLibUsbDevices () [0x00099] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllDevices () [0x00042] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at com.clusterrr.clovershell.ClovershellConnection.mainThreadLoop () [0x00016] in <0442cd6e02f641f9b95498b81f6f5149>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
`

Expected behavior
Expected for the program to at least load, even if it may not be able to see the console.

Screenshots
No screenshots, see listed crash error.

Additional context
Tried copying libusb-1.0.so.0 to a dll file, but no dice.

@NightSprinter NightSprinter added the bug Something isn't working label Jan 27, 2025
@eku
Copy link

eku commented Jan 28, 2025

Did you install libusb Linux package?

@NightSprinter
Copy link
Author

NightSprinter commented Jan 28, 2025

I do in fact have it installed. I ended up going nuclear on installing by just "sudo apt install libusb*", and it's going. Just dunno what of the LibUSB packages it was missing that was required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants