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

Stage.show() blocked for several minutes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 9
    • 8u66
    • javafx
    • Win 8 Pro, 64 Bit, JDK 8u66

    • x86_64
    • windows_8

    Backports

      Description

        This is a follow-up to JDK-8088707.

        Sporadically Stage.show() is blocked for several minutes! The problem only occurs if the computer resumes from hibernation, and the actual duration of Stage.show() varies from seconds to many minutes. Example: Computer was in hibernation for few hours, then Stage.show() needed about four minutes (!) to present the window.

        Using jvisualvm I drilled down the "freeze" (please find attached files) and noticed that the causer in fact is ListChangeBuilder.insertRemoved(), which is invoked deeply within Scene.clearNodeMnemonics(). According to jvisualvm insertRemoved() consumed more than 240.000 Milliseconds! The application, BTW, has no menu at all; the sole mnemonic used is found a Button.

        Attached you will find:
        * A JVisualVM profiler snapshot showing that 222.000ms have been spent inside insertRemoved().
        * Two threaddumps taken while Stage.show() was "frozen", in several minutes space. They are showing that the profiler really seems to be right, as both threaddumps show that the FX Application Thread is (still) working on insertRemoved().

        This is pretty ugly, as apparently there is nothing the application vendor can do to work around this effect. So if there is something you like me to try, please don't hesitate to tell me. :-)

        Attachments

          1. profiler-snapshot-while-frozen.nps
            4 kB
            Markus Karg
          2. threaddump-while-frozen-1.tdump
            25 kB
            Markus Karg
          3. threaddump-while-frozen-2.tdump
            24 kB
            Markus Karg
          4. three.txt
            15 kB
            Markus Karg

          Issue Links

            Activity

              People

                vadim Vadim Pakhnushev
                mkarg Markus Karg
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: