If you run ImageSegmentTest >> #testImageSegmentsShouldBeWritableToaFile ,
it will leave stubs (ImageSegmentRootStubs) in the subclasses array of
This will basically render your image unusable, because whenever a
debugger is about to open, it'll try to iterate over the subclasses of
UIManager, which will result in another error, because the leftover stubs
can not be loaded, etc.
This is the main reason why so many tests fail on the ci too.
I suspect that it is a VM bug (needs to be confirmed by someone who
understands image segments), but if we can't track it down, we can still
work it around, by not letting tests mess with such important parts of