Basically, race conditions suck. Occurs infrequently, but most often while combat is taking place and tracks are getting destroyed/timed out. Root cause: the Database updates itself and removes a dropped track while the scope is trying to render.
This might be fixed with some filtering that creates a separate list of tracks/data/TEs or a proper lock condition on the track, data, and TE collections.
At least right now, it seems prudent to hide the tracks and data and stuff behind a GetData() method instead of letting the renderer retrieve it by simple object reference. That would make it possible to pass a cloned list that won't be manipulated by the database as it's updating... Or I can just leave the lock() statements in place. We'll see what works better.
Basically, race conditions suck. Occurs infrequently, but most often while combat is taking place and tracks are getting destroyed/timed out. Root cause: the Database updates itself and removes a dropped track while the scope is trying to render.
This might be fixed with some filtering that creates a separate list of tracks/data/TEs or a proper lock condition on the track, data, and TE collections.
At least right now, it seems prudent to hide the tracks and data and stuff behind a GetData() method instead of letting the renderer retrieve it by simple object reference. That would make it possible to pass a cloned list that won't be manipulated by the database as it's updating... Or I can just leave the lock() statements in place. We'll see what works better.