JVM no longer stops properly when an ArcGISLocalTiledLayer is added into a JMap.

3918
4
07-16-2015 04:21 AM
jeromegaboriau
New Contributor II

Hi,

I'm experiencing the following problem :

Problem description:

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()".

Environment:

- 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"

Personal analyse:

- 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:

    - "Thread-8",

    - "pool-2-thread-1"

    - "pool-2-thread-2"

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:

    - "pool-2-thread-1"

    - "pool-2-thread-2"

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.

Regards,

Pierre BEULE.

English translation by Pierre BEULE

0 Kudos
4 Replies
EricBader
Occasional Contributor III

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.

KacperBoström
New Contributor

Hi,

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?

0 Kudos
EricBader
Occasional Contributor III

I'm glad you asked!

Quartz Beta 1 - August 31 2015

Quartz Beta 2 - End of 2015

Quartz Final - Late Q1 2016

(Dates subject to change)

jeromegaboriau
New Contributor II

Hi,

Thanks a lot to both of you for your answers.

I guess I will wait for the Quartz release to be available to remove my System.exit() call.

Regards,

Pierre BEULE.

0 Kudos