Closed chrisrueger closed 1 month ago
Weird. Looks like an invalid image.
Strange, now I cannot reproduce it.
The code seems to be this. Image disposed? What could cause this?
org.eclipse.swt.widgets.TreeItem.setImage(int, Image)
Here I only have my laptop. In the office where I had the error I have a large monitor. I found this https://bugs.eclipse.org/bugs/show_bug.cgi?id=575707 "IllegalArgumentException when resolving overlay image on HighRes screen" which sounds like it could be resolution dependend. I will try to reproduce it and hopefully be able to debug.
Strange, now I cannot reproduce it.
The code seems to be this. Image disposed? What could cause this?
Does this happen when you are working on the Eclipse/Bndtools dev instance, launched from the bnd workspace? Or does it happen when you're working on a standalone Eclipse instance?
It's been a while, but I remember that @pkriens put some centralised image resource management into one of our bundles. If that bundle is restarted (which can happen eg if you change some of the code and you've got automatic building turned on), it can cause the image handle to be disposed, and because lots of the Eclipse UI implementation does not handle dynamics well it can still hang on to the stale handles.
Does this happen when you are working on the Eclipse/Bndtools dev instance, launched from the bnd workspace? Or does it happen when you're working on a standalone Eclipse instance?
No, that happens when I am working with a normal Eclipse (2024-09) with a recent bndtools 7.1.0 SNAPSHOT installed. It basically happened during normal daily work (not bndtools development). I will keep an eye on it.
It tends to happen when bundles get updated. In Icons i tried to handle this but not all code uses Icons.
I will close it for now and reopen when it happens again.
I am not a 100% how I managed to get this exception, but currently I get it a lot. I am doing lots of stuff with tweaking optional Import-Packages. Looks like the icons / images in the outline are somehow related to the Import-Packages.
I will dig into but maybe try to just catch the error.