Closed lesquoyb closed 1 year ago
following the changes in configuration recommended in #3308, there's only two remaining issues from the original list:
For the first point, I am afraid we will need to move to the solution presented in https://www.slideshare.net/eclipsedayindia/scaling-eclipse-on-hidpi-monitors-niraj-modi (from slide 17). That will require some work ! But guarantee the independence of the icons in terms of resolution.
For the second point, it is surprising that it is supposed to be "solved" in this report (https://bugs.eclipse.org/bugs/show_bug.cgi?id=527297): probably the dynamic change of handling the scaling is the cause of that. I will try to put it very early in the form of -Dswt.autoScale=exact
to see if it changes something. If it is the case, then we will probably need to get rid of the GAMA specific flag (-Duse_precise_scaling
).
The second issue (splash screen changing resolution) should be fixed by now, and not show up anymore on the release version. The dev version of GAMA (from Eclipse) will however still exhibit it normally, and there is nothing we can do about this !
I tried the latest release and the splash screen problem is still present:
Can you verify that the flags are ok on the release and if the problem is present in all resolutions / zoom factors ?
I have the autoScale
flag set to exact
. Here is the complete ini:
-vm
./jdk/bin/javaw
-startup
plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.700.v20221108-1024
-data
@noDefault
--launcher.defaultAction
openFile
-vmargs
-server
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=false
-Xms4096m
-Xmx4096m
-Xss128m
-Xmn1024m
-XX:+UseAdaptiveSizePolicy
-XX:+OptimizeStringConcat
-Dosgi.locking=none
-Dosgi.checkConfiguration=false
-Declipse.log.level=ERROR
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=10
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=6000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=6000
-Denable_logging=true
-Denable_debug=true
-Duse_global_preference_store=true
-Dswt.autoScale=exact
-Dread_only=false
-Duse_old_tabs=true
-Duse_legacy_drawers=false
-Duse_delayed_resize=false
-Duse_native_opengl_window=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-exports=java.base/java.lang=ALL-UNNAMED
--add-exports=java.desktop/sun.awt=ALL-UNNAMED
--add-exports=java.desktop/sun.java2d=ALL-UNNAMED
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED
-Dfile.encoding=UTF-8
If I switch autoScale
to true there's no more splash screen issue, but we can't do that because we would be coming back to the problems we had with the user_location
Update following the recent commits related to icons most icons have been improved and overall it looks way better now. There are still a few icons that may have been missed though:
The different icons which are managed directly by GAMA should be ok (or will be ok soon: some will take a bit of time to process like the ones in the "About" window). This leaves :
Regarding the 2nd one (both may be linked by the way -- which I hope !), there still exists tons of issues on Eclipse regarding the behaviour with unusual scaling (like 150%) and multiple monitors (e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=563923 or https://bugs.eclipse.org/bugs/show_bug.cgi?id=558837). Can you conduct tests without connecting the two different monitors ? Thanks !
About the computer I did the previous review: it's my other laptop which is a "normal" one, only one screen, not hidpi screen, and the scaling factor was the recommended 150% (not a strange 175% or 225%), so I think we can assume it's not related to the hardware or a funky setup.
So apart from the eclipse and navigator/editor's icons, what changed/didn't change:
Is it on the release or in Eclipse ? If in Eclipse, remember to synchronise the product with the run configurations (or to launch from the product).
It is both in eclipse and the release. I tried synchronizing but no difference
If it can help figuring out where does the problem lie: the initial gama icon for the splash screen works normally, but the workspace selection wizard has a broken icon and once the workspace selected, the icon of the splash-screen becomes a red square too here for example you can see both the proper icon for the splash screen and the broken one for the wizard
Update about the fix of the red icon
In the latest release, though the icon is now found, there's a difference between the icon of the splash screen and the one of the workspace wizard (and later of gama): the bigger one is the one the workspace wizard. It is also the case with the icon of "about gama" in the help menu that doesn't seem to have been scaled:
In addition I noticed that the icon to pick a background color in the image view is also a bit strange (in the same that the display tab icon is):
Regarding the images for picking up colours, display tabs or simulation (in the "Agents" menu), I obtain those on my computer (masOS):
I have just committed a small change that might help on windows to recover the transparency that seems absent. Can you try it ?
It didn't change anything, so far the icons that have this problem are:
@AlexisDrogoul since your last commit, every icons are working well, except the one in Help > About GAMA :/
To summarize what's left as of now:
And that's it!
@lesquoyb Please test the latest commit. In case it doesn't work better, could you try coming back two commits earlier (https://github.com/gama-platform/gama/commit/23760b80ce317c751917e37b27459c2b954ba926) and test as well ? Just in case something is related to loading the icons a bit too early (a remark you made yesterday made me think about this: on Windows, we have this "zooming effect" on the splash, which indicates a change in resolution during the launch, something that does not happen on macOS).
With the latest commit icons cannot be found:
java.io.FileNotFoundException: /icons/window/icon256.png
at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:182)
at java.base/java.net.URL.openConnection(URL.java:1094)
at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:115)
at org.eclipse.core.internal.boot.PlatformURLConnection.getURLAsLocal(PlatformURLConnection.java:240)
at org.eclipse.core.internal.runtime.PlatformURLConverter.toFileURL(PlatformURLConverter.java:37)
at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:266)
at org.eclipse.jface.resource.URLImageDescriptor.getFilePath(URLImageDescriptor.java:213)
at org.eclipse.jface.resource.URLImageDescriptor.getImagePath(URLImageDescriptor.java:309)
at org.eclipse.swt.internal.DPIUtil.validateAndGetImagePathAtZoom(DPIUtil.java:426)
at org.eclipse.swt.graphics.Image.<init>(Image.java:672)
at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:241)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:290)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:268)
at org.eclipse.ui.internal.Workbench.initializeImages(Workbench.java:1801)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:752)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:183)
at msi.gama.application.Application.configureDisplay(Application.java:171)
at msi.gama.application.Application.start(Application.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Given the log in eclipse console, it seems like all the icons in the window
folder from size 16 to 256 are loaded in parallel of the initialization.
Coming back to https://github.com/gama-platform/gama/commit/23760b80ce317c751917e37b27459c2b954ba926 didn't fix the navigator icons and this error rose during init:
java.lang.NullPointerException: Cannot invoke "org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository.query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)" because "bundlePoolRepository" is null
at org.eclipse.equinox.internal.p2.ui.KeySigningInfoFactory.getBundlePoolArtficactPGPSigningDetails(KeySigningInfoFactory.java:148)
at org.eclipse.equinox.internal.p2.ui.KeySigningInfoFactory$1.<init>(KeySigningInfoFactory.java:43)
at org.eclipse.equinox.internal.p2.ui.KeySigningInfoFactory.getAdapter(KeySigningInfoFactory.java:42)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.lambda$5(AdapterFactoryProxy.java:111)
at java.base/java.util.Optional.map(Optional.java:260)
at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:111)
at org.eclipse.core.internal.runtime.AdapterManager.lambda$7(AdapterManager.java:248)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:261)
at org.eclipse.ui.internal.about.AboutPluginsPage.lambda$0(AboutPluginsPage.java:334)
at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:187)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Hello, if you run from Eclipse, please make sure you re-synchronize the product.
You are right, I synchronized before the first try but not after checkingout to the old commit. Though it didn't change anything apart from the error message not showing up in the eclipse console.
Also, I feel like you were right about the fact that it may come from images composed with other images:
The icon for includes
is not blurry at all and it's the only one that is not composed of multiple images
And do you face the same issue in Eclipse ?
Oh actually yes, they are blurry too in eclipse navigator. It was hard to see because they are so tiny, but I just did the test with taking a snapshot of the same area with 150% scaling and 100%, and some 150% are pixelated too. here with 150% scaling: and here with 100% scaling: What is strange is that in this case, it's not the images composed of multiple layers that are blurry, but the arrows
something I just noticed now, the zoom is actually the zoom of the main monitor. If I want to run gama on my second monitor it will always open on my main screen first, then move to my second screen. The consequences are that many icons are broken, particularly the eclipse ones:
Eclipse loads the same way (splash screen on the main screen then moves by itself to the correct monitor), but it does seem to cause any problem.
The scaling ratio of my second screen is 100% and the one of my main screen is 150%. If we ignore the icons that completly break (menu icons only from what I've seen so far, the aspect is the one of 150% scaling, which overall looks ok:
That bug with the two monitors with different scaling ratios actually goes way deeper, it also breaks the java2d displays, here for example is the model Clean Line Network.gaml
run on my second monitor with a 100% while my main monitor has a 200% scaling:
Those bugs are not present in the 1.8.2-RC2 release.
Watching the code we use, I noticed that the DPIUtil.getDeviceZoom()
we use in the code only returns the main monitor scaling, not the scaling of the current monitor, which could be one of the reason for those bugs.
Getting back to the problem with navigator icons, it turns out that with a 200% scaling, the navigator icons are not pixelated at all, so it only appears with 150%/175% etc.
I don't know how, but that bug came back:
in the eclipse console there are a few errors due to missing icons:
java.io.FileNotFoundException: /icons/view.interactive2.png
at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:182)
at java.base/java.net.URL.openConnection(URL.java:1094)
at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:115)
at org.eclipse.core.internal.boot.PlatformURLConnection.getURLAsLocal(PlatformURLConnection.java:240)
at org.eclipse.core.internal.runtime.PlatformURLConverter.toFileURL(PlatformURLConverter.java:37)
at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:266)
at org.eclipse.jface.resource.URLImageDescriptor.getFilePath(URLImageDescriptor.java:213)
at org.eclipse.jface.resource.URLImageDescriptor.getImagePath(URLImageDescriptor.java:309)
at org.eclipse.swt.internal.DPIUtil.validateAndGetImagePathAtZoom(DPIUtil.java:426)
at org.eclipse.swt.graphics.Image.<init>(Image.java:672)
at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:241)
at org.eclipse.jface.resource.ImageDescriptor.createResource(ImageDescriptor.java:230)
at org.eclipse.jface.resource.DeviceResourceManager.allocate(DeviceResourceManager.java:55)
at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
at org.eclipse.jface.resource.LazyResourceManager.create(LazyResourceManager.java:103)
at org.eclipse.jface.resource.ResourceManager.createImageWithDefault(ResourceManager.java:195)
at org.eclipse.jface.resource.ImageRegistry.get(ImageRegistry.java:206)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.getImageFromURI(SWTPartRenderer.java:228)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.getImage(SWTPartRenderer.java:238)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.createTab(StackRenderer.java:794)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.processContents(LazyStackRenderer.java:205)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:150)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:150)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveRenderer.processContents(PerspectiveRenderer.java:51)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:82)
at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:116)
at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.postProcess(PerspectiveStackRenderer.java:64)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:677)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
at org.eclipse.e4.ui.workbench.renderers.swt.SashRenderer.processContents(SashRenderer.java:150)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:72)
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1083)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at msi.gama.application.Application.start(Application.java:148)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Hi,
I propose to close this issue and open one for each of the different problems listed above and the previous ones that are not fixed. Right now, it is a bit too much to handle at once and there is no easy way to link commits with the specific items.
Thanks !
Alexis
PS: as a side note, if the icons with black border have reappeared or if you have this error, it means you are not running the right version of GAMA. Can you check ?
I think I transformed all the sub-problems into proper issues, so let's close it
Describe the bug Following #3596 new problems appeared on windows with a scaling of 150% (which worked almost perfectly before):
With 175% I have the same problems plus those lines everywhere: They can disappear sometime when scrolling
My configuration is: Windows 11 screens: