ak2yny / OpenHeroSelectGUI

GUI for OpenHeroSelect based on MUAOpenHeroSelect by adamatti
GNU General Public License v3.0
4 stars 1 forks source link

System.AccessViolationException #8

Closed ak2yny closed 1 year ago

ak2yny commented 1 year ago

While switching between the MUA and Skin Editor tabs, the GUI has a tendency to reach an AccessViolationException on an ObservableCollection.

It seems like this is the AvailableCharacters collection (TreeView).

Here is the exception (stack and details are not available):

System.AccessViolationException
  HResult=0x80004003
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Going back through the stack gives me the AvailableCharacters ObservableCollection (a collection of OC's). The latest actions on it are probably on the source of AvailableCharacters.xaml.cs, line 71 (add all children from the temporary tree to the bound tree).

I realize that this is a rather complicated task. Maybe there is a better way? I'm open to suggestions.