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

Problems with Application static objects and pipeline initialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None

      Recent changes to the code base have added restrictions of creating Application static objects.
      We need to understand and determine how to proceed with this, with a few options being:
       * document the restriction ie. no Application static Controls/Images
       * change the initialization of the pipeline, moving pipeline init into Application static initialization.
       * change the known issues causing the limitiation ie removing the calls that get Screen prior to that data being avilable
          + in Utils.isQVGA (which is isEmbedded)
          + in Image creation.
        it might be possible to lazy evaluate the data, deferring the operations until on the event thread, and hence when the pipeline is initialized.

      The issue boiled into a code fragment:
        public class ChangeScene1 extends Application {
          static com.sun.glass.ui.Screen screenStatic = com.sun.glass.ui.Screen.getMainScreen(); <<<<<<< FAILS
          com.sun.glass.ui.Screen screenInstance = com.sun.glass.ui.Screen.getMainScreen(); <<<<<<< Works

            kcr Kevin Rushforth
            ddhill David Hill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: