buttplugio / buttplug-rs-ffi

FFI from buttplug-rs to Java and other languages
Other
89 stars 22 forks source link

Unhandled exception. System.ArgumentException: An item with the same key has already been added. #45

Closed kyrahabattoir closed 3 years ago

kyrahabattoir commented 3 years ago

Describe the bug With one or more device connected (hush/domi for me)

calling ButtplugClient::ConnectAsync ButtplugClient::DisconnectAsync ButtplugClient::ConnectAsync causes the following error:

Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: 1 at System.Collections.Generic.Dictionary 2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Buttplug.ButtplugClient.SorterCallback(UIntPtr buf, Int32 buf_length)

Expected behavior There shouldn't be any error (unless we are ment to destroy the client object between connections?)

Actual behavior Mentioned above.

Additional context Buttplug-rs-ffi c# 1.0.5