buttplugio / buttplug-rs-ffi

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

C# can emit null devices when connecting to a server with multiple devices already attached. #87

Closed qdot closed 2 years ago

qdot commented 2 years ago

Describe the bug

  1. Bring up intiface desktop
  2. Run a server session, attach multiple devices
  3. Connect a C# client

Expected behavior Multiple devices are found and enumerate correctly.

Actual behavior If iterating through the client devices accessor, the correct number of elements exists. However, all but one of them will be null.

Additional context The client devices dictionary isn't concurrent, and as of 1.0.16 or so, the device added updates can run concurrently. This means we get concurrent updates, which breaks the dictionary and gives us bad info.