Hey gang,
I have a pretty interesting workspace set up. It unfortunately crashes the IDE once in a while. When it does that the UI preferences end up being re-initialized on startup.
Unfortunate for us, we have some code in the cdt.ui plugin activator, CUIPlugin, that tries to load UI preferences. Not sure why other than it appears to be a workaround for some other issues. And unfortunately, that triggers the preference init. As part
of our preference init, we get the current theme which in turn triggers loading the colour registry. And that can only be done on the UI thread.
Now the unfortunate affect of the resulting SWTException is that the theme manager is improperly initialized and that causes the IDE to crash and never be able to start up again on that workspace. That’s pretty bad.
We need to be very disciplined in what we put into the plug-in activators to begin with since they slow down startup. But also you’re running on the thread that triggered you to load which is usually not what you want it to be.
Doug.
|