blish-hud/Blish-HUD

Fatal on tweener (race condition)

dlamkins opened this issue · 2 comments

lish_HUD.DebugService | Blish HUD encountered a fatal crash!
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Glide.Tween.TweenerImpl.AddAndRemove() in D:\a\Blish-HUD\Blish-HUD\Blish HUD\Library\Glide\Tweener.cs:line 225
at Glide.Tween.TweenerImpl.Tween[T](T target, Object values, Single duration, Single delay, Boolean overwrite) in D:\a\Blish-HUD\Blish-HUD\Bli

We should rewrite the tweener stuff to be fully thread-safe without breaking any of the public-facing APIs it exposes. With the majority of our UI framework now thread-safe, we should strive to ensure the dependencies are as well. Currently, we give a false sense of safety, which bites us now and again. This is especially common with views which can end up built on a different thread - not something modules can easily control.

Eksime makes good points here:
#885 (comment)

The Glide library we decided to use early on is old and beyond the "magic" it adds, it's likely more trouble than it is worth sticking with it.