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

OutOfMemory error due to GrowableDataBuffer in Canvas when window is not shown

    XMLWordPrintable

    Details

      Description

      Our application is drawing incoming images from a high speed camera to a JavaFX canvas using canvas.getGraphicsContext2D().drawImage(...). This is working fine as long as the JavaFX window is shown (for example the screen is not locked or the window is not minimized). When the window is not shown, the GrowableDataBuffer in the Canvas keeps growing with the new images, which after a while (depends on the size of the images and the speed to load them) leads to an out of memory error due to Java heap space.

      The problem does not occur if you are drawing the same Image objects over and over, it needs to be new Image objects that are drawn.

      The problem exists in at least JavaFX runtime versions 2.2.40-b43 and 8.0.0-b132.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              flar Jim Graham
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: