java3d
  1. java3d
  2. JAVA3D-572

NPE in NodeRetained.clearLive() leading to a memory leak

    Details

    • Issuezilla Id:
      572

      Description

      I am seeing the following exception in my code:

      java.lang.NullPointerException
      at javax.media.j3d.NodeRetained.clearLive(NodeRetained.java:725)
      at javax.media.j3d.GroupRetained.clearLive(GroupRetained.java:2670)
      at javax.media.j3d.GroupRetained.checkClearLive(GroupRetained.java:1741)
      at javax.media.j3d.GroupRetained.checkClearLive(GroupRetained.java:1670)
      at javax.media.j3d.GroupRetained.doRemoveChild(GroupRetained.java:402)
      at javax.media.j3d.GroupRetained.removeChild(GroupRetained.java:337)
      at javax.media.j3d.GroupRetained.removeChild(GroupRetained.java:375)
      at javax.media.j3d.Group.removeChild(Group.java:362)
      at World.removeCreature(World.java:1080)
      at World.step(World.java:1213)
      at World.run(World.java:955)
      at World.main(World.java:1999)

      which I think is causing a memory leak of various BlahBlahRetained class
      instances (since removeNodeData() is never called). The bit of code where this
      exception is being thrown is I think when universe is dereferenced in the method
      (specifically "universe.numNodes--;") but I'm not 100% sure.

      This is possibly related to:

      http://www.mail-archive.com/java3d-interest@java.sun.com/msg21496.html

      which is about the main thing I could find on the issue.

      The source where I am seeing this is here:
      http://iamsrp.com/other/life.tgz

      Sorry I couldn't produce a stand-alone test case but I have a feeling that this
      is a race condition somewhere. If nothing else you might like to just peer at
      the thing in action. (Anyone else reading this, feel free to grab and run it and
      let me know what you think

      srp

        Activity

        Hide
        kcr added a comment -

        This is probably a duplicate of issue 193. Removing a live branch group from a
        thread other than a behavior is not recommended.

        Show
        kcr added a comment - This is probably a duplicate of issue 193. Removing a live branch group from a thread other than a behavior is not recommended.
        Hide
        kcr added a comment -

        Closing as a duplicate of 193

            • This issue has been marked as a duplicate of 193 ***
        Show
        kcr added a comment - Closing as a duplicate of 193 This issue has been marked as a duplicate of 193 ***

          People

          • Assignee:
            java3d-issues
            Reporter:
            iamsrp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: