Community
Participate
Working Groups
Created attachment 266380 [details] The error log after the crash Oxygen crash at startup with a NullPointerException. This happen on a PC with windows 10 and a 4K screen. How to reproduce : - use a PC with W10 and a 4k screen (3840x2160) - install an oxygen distribution - double click on eclipse.exe - the splash screen appear - then a popup appear indicating that an error is logged. The error log is joined to this bug. I have tried several distribution of Oxygen (modeling, commiters, java), and all fail with the same error. The same distributions work on another PC (running window 7 and HD screen). The line : "at org.eclipse.swt.internal.DPIUtil.validateAndGetImagePathAtZoom(DPIUtil.java:407)" let me thing that the problem is linked to the HiRes screen.
(In reply to Cedric Dumoulin from comment #0) > The line : > "at > org.eclipse.swt.internal.DPIUtil.validateAndGetImagePathAtZoom(DPIUtil.java: > 407)" NullPointerException at above line suggests that there is some problem in ImageFileNameProvider implementation, which most likely be Platfrom-UI side.
After some investigations, I found that the crash happens when the windows screen scale is set >300%. This scale can be changed in windows settings : Windows Settings -> display -> Change the size of text, apps and other items Oxygen starts correctly when scale is <=250% The following method seem to be a good entry point to understand the problem : org.eclipse.jface.resource.URLImageDescriptor.URLImageDataProvider.getImageData(int) public ImageData getImageData(int zoom) { URL tempURL = getURL(url); if (tempURL != null) { URL xUrl = getxURL(tempURL, zoom); return URLImageDescriptor.getImageData(xUrl); } return null; } Here are the value of zoom for different screen scales : scale | zoom value | start ? -------+------------+-----+ 150 | 100 | ok | -------+------------+-----+ 225 | 200 | ok | -------+------------+-----+ 250 | 200 | ok | -------+------------+-----+ 300 | 300 |crash| --------------------------- When zoom is set to 300, URL xUrl = getxURL(tempURL, zoom) return null. But the null value is not checked, and so URLImageDescriptor.getImageData(xUrl) throw a nullPointerException. I have tried to return null when xURL is null. In this case, Oxygen start, but I have noted that some icons are now missing in view toolbars. This is also the case for neon.2 !!
(In reply to Cedric Dumoulin from comment #2) > After some investigations, I found that the crash happens when the windows > screen scale is set >300%. > This scale can be changed in windows settings : > Windows Settings -> display -> Change the size of text, apps and other items > > Oxygen starts correctly when scale is <=250% IIRC, Eclipse doesn't ship images at 300% resolution. We only ship 100% & 200% zoom images, that's why you seeing the problem at 300% zoom level. Workaround: You can explicitly specify the zoom level(limit it to 200%) by adding below VM argument in eclipse.ini or on the command line after -vmargs: -Dswt.autoScale=200
Thanks for your investigations. I'll fix this for 4.7 M5 and will backport to Neon.3.
Niraj is right that we don't ship 300% images. The fix is only to avoid the crash, not to supply more image versions. At 300%, you will just get images that are scaled up from the 100% version. Fixed for next I-build with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=57e5baff5e882b0fcdc75673394ca9aaf4f11053 Cedric, did you actually plan to work with a 300% zoom level, or did you just set this for testing purposes?
(In reply to comment #5) > Cedric, did you actually plan to work with a 300% zoom level, or did you just > set this for testing purposes? I always work at 300% zoom level. The default value recommended by Windows 10 is 250% for this 4k screen, which for me is a little bit too small. So I have just move the scale at the next proposed level.
(In reply to Markus Keller from comment #5) > Fixed for next I-build with > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=57e5baff5e882b0fcdc75673394ca9aaf4f11053 Verified the fix in Oxygen M5 IBuild: I20170126-1030 on Win7 using -Dswt.autoScale=300 options.
(In reply to comment #5) > Fixed for next I-build with > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=57e5baff5e882b0fcdc75673394ca9aaf4f11053 > I have tried the fix with compiled src from trunk. Oxygen now start without crash. So, this bug is fixed for me. But, there still some problems at scale 300% : some buttons are missing in toolbars, without any errors. I have opened a new bug for that : 511188: [HiDPI] Some buttons/icons are missing in views toolbars when scale is set to 300% (4k screen) https://bugs.eclipse.org/bugs/show_bug.cgi?id=511188
I tried to reproduce on 4.6.3 before backporting, but the bug didn't show up. Turned out this got recently broken by bug 507103. I actually remembered that I tested many resolutions when I wrote that code, and it was reassuring to see it wasn't me who made such mistakes. Nothing to do for 4.6.3, closing as fixed in 4.7 M5.