Code Action NPE #52

Closed
RobertBColton opened this Issue May 24, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@RobertBColton
Collaborator

RobertBColton commented May 24, 2013

Edit: This actually was a regression and was fixed by 2960d0d. I realized this while working on the stable branch and went back to see if this was really a regression or not so that I could fix it in stable if it was in fact an issue. The reason I know this was fixed by that commit is because they both occurred on the same day, and this issue can be reproduced as described if you rewind to 289d246 which is my last commit before opening this ticket. The offending code is infoFrame.dispose(); which further supports my hypothesis.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.lateralgm.subframes.GmObjectFrame.dispose(GmObjectFrame.java:797)
at javax.swing.JInternalFrame.doDefaultCloseAction(Unknown Source)
at org.lateralgm.components.mdi.RevertableMDIFrame.close(RevertableMDIFrame.java:42)
at org.lateralgm.components.mdi.RevertableMDIFrame$1.run(RevertableMDIFrame.java:71)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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)

This is not a regression, and is not my fault.

  1. Open LGM
  2. Create new object
  3. Add code action to one of its events and open it for editing
  4. Close and save the object frame in the background, or open a different proejct
  5. Bam, NPE

It is because the object frame is being disposed before its action frames, I checked the dispose override of the object frame and that is not where actions appear to be disposed of, so I do not know. This bug is likely to exist for timeline frame as well.

@IsmAvatar

This comment has been minimized.

Show comment
Hide comment
@IsmAvatar

IsmAvatar May 24, 2013

Owner

Not surprised. There was a time when Code Editors were Modal. Someone asked me to get rid of that (which makes sense), so I did. As a result, having a code editor open when the object closes leads to undefined behavior - here we see it's an NPE. Easy to fix. Thanks for the report.

Owner

IsmAvatar commented May 24, 2013

Not surprised. There was a time when Code Editors were Modal. Someone asked me to get rid of that (which makes sense), so I did. As a result, having a code editor open when the object closes leads to undefined behavior - here we see it's an NPE. Easy to fix. Thanks for the report.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Jun 1, 2013

Collaborator

This bug no longer exists, I have tested and tested and I can not reproduce it now, with all D&D actions and even with the edit button when DND is disabled, no longer exists. I assume it got fixed with my other fixes, must have been related to something else, please close this ticket.

Collaborator

RobertBColton commented Jun 1, 2013

This bug no longer exists, I have tested and tested and I can not reproduce it now, with all D&D actions and even with the edit button when DND is disabled, no longer exists. I assume it got fixed with my other fixes, must have been related to something else, please close this ticket.

@IsmAvatar

This comment has been minimized.

Show comment
Hide comment
@IsmAvatar

IsmAvatar Jun 1, 2013

Owner

Thanks Robert. Closing as "Works for me".

Owner

IsmAvatar commented Jun 1, 2013

Thanks Robert. Closing as "Works for me".

@IsmAvatar IsmAvatar closed this Jun 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment