Community
Participate
Working Groups
Created attachment 211866 [details] Strack trace Occasionally CompositeImageDescriptor throws a Null Pointer Exception while a View is decorated. Unfortunately we can find no pattern when this happens. When suppressing the NPE the decoration often (but not always) shows the missing icon instead of the decorated icon. We've checked for quota/disk full problems, wrong bundles, etc. This happens on freshly installed applications on clean test instances, on versions installed month ago and every combination (but luckily not very often). Attached is a stack trace from a recent NPE.
Well, getImageData() does say null is a valid return value so we should probably guard against this.
There is also another (different) error that co-occurs with the first one reported. If the NPE is thrown when a view is decorated, then opening one of our wizards will also cause an error. The reverse is true as well - if I get an error in this wizard, then I'll get the errors when decorating views as well. The error that occurs when opening the wizard is attached. Perhaps the additional information will be useful.
Created attachment 212277 [details] Error that co-occurs with first reported error
*** Bug 405855 has been marked as a duplicate of this bug. ***
As Remy mentioned, getImageData() can return null, so I added simple check to CompositeImageDescriptor.drawImage(). Probably there are another bugs behind the problems reported by Achim and Alexandra, but the stack traces are not enough to locate them. Review URL: https://git.eclipse.org/r/#/c/16795/
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e361bf50db2afd28daa2f3a5e13042ba1cc2eb53 PW
Verified in I20131028-2000.
The "fix" was a hack inserted at the wrong place. CompositeImageDescriptor#drawImage(ImageData, int, int) must not be called with a null ImageData. The actual bug was that DecorationOverlayIcon#drawCompositeImage(int, int) called ImageDescriptor#getImageData() and then called drawImage(..) without doing the required null check first. I'm about to rewrite this code to make ImageDescriptors HiDPI-aware. The fix for bug 495782 will implement this correctly.