Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8124578

Background loading of Images is failing with a security exception since JRE 7 u13

XMLWordPrintable

      I've written a javafx app running in the browser. It loads a bunch of images in the background. It worked fine prior JRE 7 u11.
      However it is broken since JRE 7 u13. Images are not loaded correctly, failing with a SecurityException:

      java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
      at java.security.AccessController.checkPermission(AccessController.java:560)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at sun.plugin2.applet.SecurityManagerHelper.checkAccessHelper(Unknown Source)
      at sun.plugin2.applet.FXAppletSecurityManager.checkAccess(Unknown Source)
      at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
      at java.lang.Thread.init(Thread.java:376)
      at java.lang.Thread.<init>(Thread.java:446)
      at com.sun.javafx.runtime.async.BackgroundExecutor$1.newThread(BackgroundExecutor.java:52)
      at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:610)
      at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:924)
      at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371)
      at com.sun.javafx.runtime.async.AbstractAsyncOperation.start(AbstractAsyncOperation.java:107)
      at javafx.scene.image.Image$ImageTask.start(Image.java:917)
      at javafx.scene.image.Image.cycleTasks(Image.java:798)
      at javafx.scene.image.Image.access$200(Image.java:107)
      at javafx.scene.image.Image$ImageTask.onCompletion(Image.java:903)
      at javafx.scene.image.Image$ImageTask.onCompletion(Image.java:879)
      at com.sun.javafx.runtime.async.AbstractAsyncOperation$2.run(AbstractAsyncOperation.java:70)
      at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
      at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
      at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
      at java.lang.Thread.run(Thread.java:722)


      Usually several images are loaded just fine, and the 7-th or the 8-th in the queue fails.

      I believe it's related to the tightened security permissions in the recent JREs.

            lnerad Ľubomír Nerád (Inactive)
            kiriljfx Kiril (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: