RFR: 8222455: JavaFX error loading glass.dll from cache

Johan Vos jvos at openjdk.java.net
Wed Oct 27 08:15:17 UTC 2021


On Tue, 26 Oct 2021 12:09:19 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

> This problem can happen when using multiple instances with different jfx early access (ea) versions.
> 
> Example: 
> Instance 1 uses 18-ea+4 and Instance 2 uses 18-ea+1. 
> Instance 1 is started (and will cache and use libraries), then instance 2. 
> Now instance 2 detects via a hash comparison that the cached libraries are not the same as the supplied ones. 
> With this information instance 2 tries to delete the old libraries but fails while doing so (as instance 1 uses them currently) and will terminate right after.
> 
> The problem here is that instance 1 and 2 are using the same cache folder: **18-ea**. This is because the `NativeLibLoader` uses the `javafx.version` property for determining the folder name, which in case of an ea version will always be **18-ea** (for all ea versions starting with 18 obviously).
> 
> Fix as also mentioned in the ticket is to use the `javafx.runtime.version` property instead. 
> With this the folders will be named 18-ea+1 and 18-ea+4.

This looks like a good solution, and I agree it fixes the issue.
I have 2 minor concerns:
1. Are we sure there are no platform-specific restrictions when using a `+` in a filename?
2. Testing this is probably difficult. We can only test it if a build is created (and the versionInfo is set). 

I think the second concern can not be handled by our current test battery, but we do some smoke tests before releasing the maven repository, which should be able to detect this.
If you are confident about the first concern, I think we're all good on this.

-------------

PR: https://git.openjdk.java.net/jfx/pull/654


More information about the openjfx-dev mailing list