Login:    

useradd
more /root/Bugs/Deleting Parent causes Child NPE.thread
2010-09-07 19:56:47IsmAvatar
Steps to Reproduce:
1) Start LGM
2) Create two objects
3) Set one object's parent to the other object
4) Close both objects
5) Delete the parent object
6) Open the child/orphan object
7) Receive the following error:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.lateralgm.resources.GmObject.isValidParent(GmObject.java:126)
at org.lateralgm.resources.GmObject.validate(GmObject.java:155)
at org.lateralgm.resources.GmObject.validate(GmObject.java:1)
at org.lateralgm.util.PropertyMap.put(PropertyMap.java:81)
at org.lateralgm.util.PropertyMap.putAll(PropertyMap.java:97)
at org.lateralgm.resources.Resource.clone(Resource.java:122)
at org.lateralgm.subframes.ResourceFrame.<init>(ResourceFrame.java:80)
at org.lateralgm.subframes.GmObjectFrame.<init>(GmObjectFrame.java:100)
at org.lateralgm.components.impl.ResNode.openFrame(ResNode.java:201)
at org.lateralgm.main.Listener$MListener.mouseReleased(Listener.java:684)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Workaround: Before deleting the parent, set all children's parent to <none>. Alternatively, delete and recreate the child. I haven't done extensive testing to see what else this effects after step 5 (deleting the parent).
2010-09-08 01:46:58IsmAvatar
Fixed in r456.