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

NullPointerException in rendering

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.1
    • fx2.0.1, fx2.0.2
    • javafx
    • ASUS All-in-One PC ET2400INT
      Windows 7
      NVIDIA GeForce GT 540M
      JDK 1.6.29

      NullPointerException seen in rendering loop. This stops the screen updating after running for a minute or so.

      (in javafx 2.0.1)
      java.lang.NullPointerException
      at com.sun.prism.impl.BaseResourceFactory.createTexture(BaseResourceFactory.java:116)

      (in javafx 2.0.2)
      java.lang.NullPointerException
      at com.sun.prism.impl.BaseGraphics.drawTextureVO(BaseGraphics.java:365)

      ...See attachments for full trace.

      Details
       - Code to reproduce problem attached. Note this is a highly simplified version of what I'm doing - I know a moving red rectangle can be done more easily/robustly in native JavaFX !
       - App was run with following options "-Djavafx.verbose=true -Dprism.verbose=true -Xmx1200M"
       - Seems to be memory related - if I allocate a decent chunk of memory upfront - say 400M then problem occurs almost instantly.
       - A slightly different exception seen after upgrade to javaFX 2.0.2 => Console outputs for both versions attached.
       - also attached DxDiag.exe output in case direct X related.

      Background (why am I doing this!)
      We need to display constantly changing pixel data at around 1280 x 400 resolution, changing at rates of 4Hz or so.
      This was previously achieved in previous Swing systems using JPanel.paintComponent() + a buffered image .
      There is no "nice" way to do this in JavaFX, so updating via impl_fromExternalImage() is used.
      If anyone can come up with a more robust way of doing the same thing please let me know

            kprazdnikwse Kirill.Prazdnikov (Inactive)
            agrangerjfx Adam Granger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: