mixer / interactive-unity-plugin

Unity Plugin for Mixer Interactivity
MIT License
59 stars 23 forks source link

Thread safety issue? #121

Closed djarcas closed 4 years ago

djarcas commented 5 years ago

I'm seeing ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) - I'm not entirely sure why, but I'm suspecting someone is writing to the _queuedEvents List whilst the list is being executed - perhaps worth switching to a thread-safe list?

// Go through all list of queued events and fire events. foreach (InteractiveEventArgs interactiveEvent in _queuedEvents.ToArray()) {

payzer commented 5 years ago

Yes, sorry. Known issue. We've got a backlog item to fix it. Sorry we haven't gotten to it yet. But yes it's a thread safe issue.

djarcas commented 5 years ago

It /seems/ to be non-fatal. I'll ignore it for the time being. :)

payzer commented 5 years ago

Yea that's why we haven't fixed it yet. It's ignorable, but annoying that it clutters the output.