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

Problems with Application static objects and pipeline initialization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: