JDK-8123577 : Unexpected PG access
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-08-22
  • Updated: 2015-06-17
  • Resolved: 2013-08-22
Related Reports
Duplicate :  
Description
Getting this stacktrace sometimes when switching the Stage to different screens on my Windows system (I have 3 screens attached).

The code that calls this is:

  private void setupStageLocation(Stage stage) {
    ObservableList<Screen> screens = Screen.getScreens();
    Screen screen = screens.size() <= screenNumber ? Screen.getPrimary() : screens.get(screenNumber);

    Rectangle2D bounds = screen.getBounds();
    boolean primary = screen.equals(Screen.getPrimary());    // WORKAROUND: this doesn't work nice in combination with full screen, so this hack is used to prevent going fullscreen when screen is not primary

    if(primary) {
      stage.setX(bounds.getMinX());
      stage.setY(bounds.getMinY());
      stage.setWidth(bounds.getWidth());
      stage.setHeight(bounds.getHeight());
      stage.setFullScreen(true);   // << exception here
    }
    else {
      stage.setX(bounds.getMinX());
      stage.setY(bounds.getMinY());
      stage.setWidth(bounds.getWidth());
      stage.setHeight(bounds.getHeight());
      stage.toFront();
    }
  }

!  398.166���12��� *** unexpected PG access                                                                                  -- javafx.scene.Node.impl_getPeer(Node.java:2222)
!  398.167���12��� 
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1308)
	at javafx.scene.Node.impl_getPeer(Node.java:2223)
	at javafx.scene.Node.impl_updatePeer(Node.java:538)
	at javafx.scene.shape.Shape.impl_updatePeer(Shape.java:948)
	at javafx.scene.text.Text.impl_updatePeer(Text.java:1500)
	at com.sun.javafx.tk.quantum.OverlayWarning.warn(OverlayWarning.java:135)
	at com.sun.javafx.tk.quantum.WindowStage.applyFullScreen(WindowStage.java:580)
	at com.sun.javafx.tk.quantum.WindowStage.setFullScreen(WindowStage.java:616)
	at javafx.stage.Stage.setFullScreen(Stage.java:615)
	at hs.mediasystem.util.DuoWindowSceneManager.setupStageLocation(DuoWindowSceneManager.java:141)
	at hs.mediasystem.util.DuoWindowSceneManager.setScreenNumber(DuoWindowSceneManager.java:125)
	at hs.mediasystem.screens.ProgramController$4.handle(ProgramController.java:201)
	at hs.mediasystem.screens.ProgramController$4.handle(ProgramController.java:1)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at hs.mediasystem.util.SceneUtil$1.dispatchEvent(SceneUtil.java:23)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:203)
	at javafx.scene.Scene$KeyHandler.process(Scene.java:3778)
	at javafx.scene.Scene$KeyHandler.access$2200(Scene.java:3737)
	at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1959)
	at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2402)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:169)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:123)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:196)
	at com.sun.glass.ui.View.handleKeyEvent(View.java:508)
	at com.sun.glass.ui.View.notifyKey(View.java:911)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
	at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
	at java.lang.Thread.run(Thread.java:724)
Comments
This is a duplicate of RT-13813.
22-08-2013