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

Lib excepts unexpectedly when retrieving adapter.GetDevicesAsync #16

Open
martienpoels-bank2loyalty opened this issue Jan 2, 2021 · 3 comments

Comments

@martienpoels-bank2loyalty

Hi Guys,

First of all happy new-year and have a healthy and wonderful 2021!

Im using your library in a bluetooth implementation for a dedicated device (running on a raspberry) bluez version 5.50
I'm not supplying an eventhandler before calling Adapter.StartDiscoveryAsync() as I only use the GetDevicesAsync when I want to see devices.

When calling Adapter.GetDevicesAsync my application crashes after been running for a few days with the following exception
Hope someone can fix this!

Unhandled exception. Unhandled exception. Unhandled exception. Unhandled exception. Tmds.DBus.DBusException: org.freedesktop.DBus.Error.LimitsExceeded: Connection ":1.127" is not allowed to add more match rules (increase limits in configuration file if required; max_match_rules_per_connection=512)
at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
at Tmds.DBus.DBusConnection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.Connection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.CodeGen.DBusObjectProxy.WatchNonVoidSignalAsync[T](String iface, String member, Action1 error, Action1 action, ReadMethodDelegate1 readValue, Boolean isPropertiesChanged) at HashtagChris.DotNetBlueZ.Device.CreateAsync(IDevice1 proxy) at HashtagChris.DotNetBlueZ.Adapter.OnDeviceAdded(ValueTuple2 args)
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()Tmds.DBus.DBusException: org.freedesktop.DBus.Error.LimitsExceeded: Connection ":1.127" is not allowed to add more match rules (increase limits in configuration file if required; max_match_rules_per_connection=512)
at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
at Tmds.DBus.DBusConnection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.Connection.WatchSignalAsync(ObjectPath path, String interface, String signalName, SignalHandler handler)
at Tmds.DBus.CodeGen.DBusObjectProxy.WatchNonVoidSignalAsync[T](String iface, String member, Action1 error, Action1 action, ReadMethodDelegate1 readValue, Boolean isPropertiesChanged) at HashtagChris.DotNetBlueZ.Device.CreateAsync(IDevice1 proxy) at HashtagChris.DotNetBlueZ.Adapter.OnDeviceAdded(ValueTuple2 args)
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Aborted

@KyryloAntoshyn
Copy link

I can confirm that this issue occurs. The same happens on my RPi.
image

@martienpoels-bank2loyalty
Copy link
Author

I have worked around this issue to not leave the scan mode running for longer than a few minutes max. Have not seen it happen since. But the problem is definitely still there and I agree if you leave scanning open this should not happen.

@KyryloAntoshyn
Copy link

For me it crashes after 5 seconds :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants