ngld / OverlayPlugin

Yet another OverlayPlugin fork.
Other
229 stars 39 forks source link

GetCombatantData exceptions on zone change #139

Closed quisquous closed 4 years ago

quisquous commented 4 years ago

I've seen this a few times recently after I zoned:

[7/3/2020 10:45:37 AM] Debug: GetCombatantList: Tini Poutini: CritDirectHitPct: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.Sum(IEnumerable`1 source)
   at FFXIV_ACT_Plugin.ACT_UIMods.<UpdateACTTables>b__18_108(AttackType Data)
   at FFXIV_ACT_Plugin.ACT_UIMods.<>c.<UpdateACTTables>b__18_111(DamageTypeData Data)
   at FFXIV_ACT_Plugin.ACT_UIMods.<>c.<UpdateACTTables>b__18_116(CombatantData Data, String ExtraFormat)
   at RainbowMage.OverlayPlugin.EventSources.MiniParseEventSource.<>c__DisplayClass39_0.<GetCombatantList>b__0(CombatantData ally)

Maybe there needs to be some exception catching here?

ngld commented 4 years ago

OverlayPlugin already catches and logs the exception. There's not much more I can do.

The main issue is that the FFXIV plugin doesn't handle multi threading which causes these exceptions whenever multiple threads access the ACT tables. The DPS updates (which cause that call) run on a background thread which occasionally interferes with the UI thread updating the main table. OverlayPlugin just skips the update whenever this issue happens.

It's a Debug message since it's not a critical issue. I just want to keep an eye on how often this happens. If it starts to happen frequently, I might have to figure out a solution and/or coordinate with Ravahn to fix this.

quisquous commented 4 years ago

Oh! Sorry for the noise, I forgot that I switched my OverlayPlugin to a debug build a bit back.