Open DougShuffield opened 9 months ago
I was able to get the following using gdb on the crash:
(gdb) run --debug scan.exe
Starting program: /usr/bin/mono --debug scan.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x75fff400 (LWP 17834)]
[New Thread 0x743bc400 (LWP 17835)]
[New Thread 0x716e5400 (LWP 17836)]
[New Thread 0x713ff400 (LWP 17837)]
[New Thread 0x710ff400 (LWP 17838)]
[New Thread 0x70dff400 (LWP 17839)]
[New Thread 0x70aff400 (LWP 17840)]
[New Thread 0x707ff400 (LWP 17841)]
[New Thread 0x704ff400 (LWP 17842)]
[New Thread 0x703fe400 (LWP 17843)]
[New Thread 0x702fd400 (LWP 17844)]
Using Bluetooth adapter hci0
Adapter's full path: /org/bluez/hci0
Starting discovery...
Delaying 5 seconds...
[New Thread 0x701fc400 (LWP 17846)]
Thread 9 "Thread Pool Wor" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x707ff400 (LWP 17841)]
0x00000000 in ?? ()
(gdb) where
#0 0x00000000 in ?? ()
#1 0x715c3748 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) p (char*)mono_pmip (0x715c3748)
[Thread 0x702fd400 (LWP 17844) exited]
[Thread 0x710ff400 (LWP 17838) exited]
$2 = 0x7052ed40 " (wrapper delegate-invoke) Tmds.DBus.CodeGen.ReadMethodDelegate`1<Tmds.DBus.PropertyChanges>:invoke_T_MessageReader (Tmds.DBus.Protocol.MessageReader) [{0x7051e510} + 0xf0] (0x715c3658 0x715c38d8) [0"...
Hopefully, that can help locate the issue. Any help is appreciated.
Doug
At this time, Linux Bluetooth has only been tested against .NET 5, .NET 6, and .NET 7, not the classic Mono (.NET Framework).
The most recent gdb
crash log was most helpful, the folks over at Tmds.Dbus may have more insight into this issue.
I believe the version of Tmds.Dbus that is used in Linux.Bluetooth is 0.11.0? Not the most current 0.15.0? I expect that will likely be the first question they ask.
Doug
I agree, an update with the latest Tmds.Dbus version will be published soon
Hi @DougShuffield, the latest package v5.66 has been published which uses Tmds v0.15.0.
@DougShuffield I updated to the package to use the latest Tmds.DBus to v0.20. Give it a shot and let me know if you're still having issues
Device: Raspberry Pi 3B+ OS: Raspbian GNU/Linux 11 (bullseye) 32-bit Mono: 6.12.0.200 Bluez: 5.55 .NET Framework: 4.8 Linux.Bluetooth: 5.64.0
I am attempting to make a simple WinForms app with a single button that scans for and prints Bluetooth devices to the console. As soon as adapter.StartDiscoveryAsync() is called it crashes mono. I have plans to use Linux.Bluetooth at a larger scale, but not until I can get this very simple example working correctly and robustly.
Any help would be much appreciated. Let me know if you need any additional information.
Here is the code from Form1.cs:
And here is the crash report from mono: