Login:    

useradd
more /root/Bugs/Object not found.thread
2010-03-31 00:03:20test
Create object
Create room
Place object in room
Delete object
---
Room is open ? room freezes : room cannot be opened
2010-04-02 00:12:47IsmAvatar
Unable to reproduce. More information needed.
2010-04-02 00:14:38test
That's why there's "conception."


==============================

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.lateralgm.subframes.RoomFrame$ObjectListComponentRenderer.getList
CellRendererComponent(RoomFrame.java:231)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Sou
rce)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.JList.getPreferredScrollableViewportSize(Unknown Source)
at javax.swing.ViewportLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedPreferredSi
ze(Unknown Source)
at javax.swing.GroupLayout$ComponentSpring.calculatePreferredSize(Unknow
n Source)
at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
at javax.swing.GroupLayout$SequentialGroup.setValidSize(Unknown Source)
at javax.swing.GroupLayout$Group.setSize(Unknown Source)
at javax.swing.GroupLayout.calculateAutopadding(Unknown Source)
at javax.swing.GroupLayout.prepare(Unknown Source)
at javax.swing.GroupLayout.minimumLayoutSize(Unknown Source)
at java.awt.Container.minimumSize(Unknown Source)
at java.awt.Container.getMinimumSize(Unknown Source)
at javax.swing.JComponent.getMinimumSize(Unknown Source)
at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSi
ze(Unknown Source)
at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.minimumLayo
utSize(Unknown Source)
at java.awt.Container.minimumSize(Unknown Source)
at java.awt.Container.getMinimumSize(Unknown Source)
at javax.swing.JComponent.getMinimumSize(Unknown Source)
at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedMinimumSize
(Unknown Source)
at javax.swing.GroupLayout$ComponentSpring.calculateMinimumSize(Unknown
Source)
at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
at javax.swing.GroupLayout$ParallelGroup.calculateMinimumSize(Unknown So
urce)
at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
at javax.swing.GroupLayout.minimumLayoutSize(Unknown Source)
at java.awt.Container.minimumSize(Unknown Source)
at java.awt.Container.getMinimumSize(Unknown Source)
at javax.swing.JComponent.getMinimumSize(Unknown Source)
at org.lateralgm.subframes.RoomFrame.getMinimumSize(RoomFrame.java:1328)

at org.lateralgm.subframes.RoomFrame$1.layoutContainer(RoomFrame.java:11
19)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow
n Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2010-04-02 21:41:35IsmAvatar
The exception does point to a location that is suspect. I'll try this out on some windows machines to see if I can get it to reproduce. I'll also look into the suspect code to figure out why it got so wonky.

When I say wonky, I mean it points to an area of code where I perform a null check before displaying the id, but then don't perform a null check when I display other information of the instance. I need to look into:
1) why that seems to have been overlooked
2) and why the value is null in the first place
and I'd also like to find out
3) why the exception only effects windows machines

A quick fix would be:
RoomFrame line 231
Currently reads:
ResNode rn = o.getNode();
Replace with:
ResNode rn = o == null ? null : o.getNode();
2010-04-02 22:49:37IsmAvatar
Off-board discussion with the user revealed that the bug pertains to deletion of the Object itself, and not the instance in the room.

With this clarification, I'm able to reproduce this bug.

Obviously a workaround would be to delete all instances of the object in the room prior to attempting to delete the object itself.

A quick fix is described above. The quick fix will cause the instance to stick around in the room, but it will identify its parent object as "<no object>"

This of course changes my concerns that I needed/wanted to look into. First off, I'd still like to know why the second null check was overlooked. But more importantly, I would need to decide what behavior would be proper for this scenario. For example:
1) Delete all orphans immediately
2) Delete orphans only when they are accessed and realize they have no parents
3) Tell the orphan that it has no parents, and let it continue to live (quick fix solution)
4) Cause the orphan to be adopted by a new parent
5) Ask the user
2010-05-24 17:49:59IsmAvatar
Quickfix applied in r438. Leaving open until a more permanent solution is applied.