Community
Participate
Working Groups
Created attachment 239497 [details] Log file Eclipse SDK Version: 4.3.2 Build id: M20140129-0800 Open Plug-in Image Browser. Keep changing the values in the "Source" and "Show" combo boxes. After 4 attempts you can see Eclipse slowing down and in few more attempts Eclipse freeze with OOME. Attached is the log file with the exception details. !ENTRY org.eclipse.core.jobs 4 2 2014-01-31 10:28:28.754 !MESSAGE An internal error occurred during: "Scan for UI images". !STACK 0 java.lang.OutOfMemoryError: Java heap space at org.eclipse.swt.internal.image.PNGFileFormat.loadFromByteStream(PNGFileFormat.java:51) Note: This happened in my development WS where i had *.jdt.core and *.jdt.ui plug-ins checked-out from the BETA_JAVA8 git repositories. When the same steps were followed in a fresh WS, the OOME did not occur, but the Plug-in Image Browser was empty after changing the combo values a few times.
I am able to recreate this. I am looking at it.
This has many *independent* problems. 1) An internal error occurred during: "Scan for UI images"/OOM org.eclipse.gmt.modisco.kdm.browser.extension_*.jar has cons\kdm\kdm\unresolved.gif has invalid data. Thats why SWT image data initialisation fails. Later on there are issues retrieving image data in PDE's size filter. So a) Bug should be filed on org.eclipse.gmt.modisco.* b) PDE should handle invalid image data. 2) the Plug-in Image Browser was empty after changing the combo values a few times. This happens in all environments. And there is a basic flaw. This happens because TargetPlatformRepository keeps on removing the bundles once they are processed. The optimization ensures that same class object is used. However once all bundles are processed ( after 5-6 attempts of combo-value change), then there is no processing at all. Further even in the first 5-6 times, different set of result are given. ( not wrong but inconsistent). And if the max size image is large, the number of images given will reduce after every attempt. ( wrong !). The fix is to override run method and clear bundle each time. This needs to be done for WorkspaceRepository as well. 3) If the previous image scan is going on, processing the new scan gives inconsistent results. The previous job needs to cancelled once the combo is changed. I have fix for 1b), 2 and 3). After these changes all these 3 problems were resolved. I will attach a fix tomorrow. Also I will file a bug for 1a) with org.eclipse.gmt.modisco. regarding packaging of invalid image.
The error handling was ok. But bug needs to be filed for invalid image. The fix for rest of the issues is https://git.eclipse.org/r/#/c/21435/ Curtis, can you please review this.
Created attachment 239691 [details] patch to fix it patch to fix it
There were some issues with gerrit. So I am attaching a code patch for this issue.
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=e47eb975aea6733c60ddb22f64750d7841adc209 +1, works great, fixes the issues with the combo, fixed in master
Verified for Eclipse(4.4) Luna M6 using build eclipse-SDK-I20140303-2000-win32-x86_64