I'm experiencing the following problem :
As soon as I add an ArcGISLocalTiledLayer to display a map in my JMap, my application doesn't want to stop if I don't call myself "System.exit()".
- JavaFx application, using a SwingNode to display the JMap.
- Windows XP 32bits
- Eclipse Luna
- ArcGIS Runtime for Java 10.2.3
- JDK 1.8u45
Before launching sample code:
- Add the ARCGISRUNTIMESDKJAVA_10_2_3 environment parameter
- Update the constant "URL_BASEMAP" (line 23) to a valid map path
Sample code: see attachment "SwingFxAppMinimalCode.java"
- When commenting the line 122, the JVM stops properly.
In this case, when running the application, threads are: (see attachment "debug - without map.png")
- Without commenting the line 122, we see the map displayed on the screen. In this case, when running the application, threads are: (see attachment "debug - with map.png").
We can see there are 3 new threads as soon as the layer is added to the JMap:
When you close the JavaFx primary stage, the JVM won't stop. Remaining running threads are: (see attachment "debug - with map - after closing stage.png")
We can see 2 out of 3 of the new threads are still running:
Could it be a pool of worker-threads not disposed properly when disposing of the JMap - which would prevent the JVM to stop properly ?
Any help/analyse is welcome, thanks a lot.
English translation by Pierre BEULE
Hi Jerome. Great write-up and example of what you are experiencing. Thank you!
First off, just an FYI...10.2.3 was not tested or supported with JavaFX.
However, using 10.2.4, which does have "beta" support for JavaFX, I can reproduce the issue.
I'll look into it more, but its probably a known issue for this current release. At the next major release (called Quartz), we'll have this worked out, I'm sure.
This issue still indeed exists in 10.2.4. I posted about it in FXMap.dispose() doesn't seem to work, not as nice write-up as Jerome imho.
Do you have an ETA on the next release of the Java Runtime, Quartz?