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

WebView keeps permanent back buffers for HTML pages and Canvas objects, can cause NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • javafx
    • web

    Description

      Running the "FullTutorial" CanvasTest toy from rt-closed, we run out of texture resources trying to view all of the tabs due to an excessive number of textures marked "permanent" from the WebView code.

      When we run out the statistics are printed out showing a full 256MB of textures allocated, 118 of which are marked permanent. If I add a printStackTrace() in the "makePermanent()" method call I see that every object created in the WCBufferedContext/RTImage path is made permanent and never disposed.

      The permanent flag should only be used sparingly for textures that contain data that cannot be reconstructed and which survives a given rendering pass (i.e. if it is only used within a single rendering pass and then the data becomes uninteresting, then a texture lock() operation should be used instead. If the data needs to remain between rendering passes and cannot be constructed, then a call to makePermanent() can be made as a last resort).

      It looks like these resources are created to manage save/restore operations, but I can't find any place where the state objects are disposed after use.

      Attachments

        Issue Links

          Activity

            People

              loneid Leonid Popov (Inactive)
              flar Jim Graham
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: