Yes, looks like I tried to load a ridiculously big picture using Picture.FromData() in a Picture subclass, and then when it failed I neglected to call Super.Constructor() on it - so I ended up with a half-initialized object that was causing problems. Solution: Don’t Do That
The problem seems to be 100% due to failing to call Super.Constructor - it has nothing to do with large pictures at all (other than that being the situation which caused my buggy code to neglect to call Super.Constructor)
[quote=204194:@Christian Schmitz]Can you show some code?
I’m not aware that you can subclass picture and use it well.[/quote]
It does work, but it’s not very elegant : the problem is that there’s no easy way to make a picture subclass and then have your subclass picture data get into the actual superclass picture data - the solution (which is not ideal) is to actually copy the data from the subclass to the superclass when you create the picture. This has a disadvantage in that the memory requirements are 2x as high when preparing the picture.
In hindsight, if I were to redesign this class I might make it a “has a” pattern rather than an “is a” pattern – e.g. my custom picture class would not be a Picture subclass any longer, but would simply have a property which was a Picture object.