ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
171 stars 36 forks source link

Reordering pages in Tree View causes NullPointerException to be thrown. #85

Closed shafr closed 4 years ago

shafr commented 4 years ago

Describe the bug Re-ordering pages in Tree View causes NullPointerException to be thrown.

To Reproduce Steps to reproduce the behavior:

  1. Start new project
  2. Create Page with button from pages toolbar
  3. Create Another page
  4. Try to re-order page in tree view
  5. Error

Expected behavior Page would be re-ordered.

Crash log / Project files

class java.lang.IndexOutOfBoundsException: Index: 2, Size: 0
java.util.ArrayList.rangeCheck(ArrayList.java:657)
java.util.ArrayList.get(ArrayList.java:433)
builder.views.PagePane.changeZOrder(PagePane.java:669)
builder.commands.ChangeZOrderCommand.execute(ChangeZOrderCommand.java:92)
builder.controller.Controller.execute(Controller.java:1371)
builder.controller.Controller.changeZOrder(Controller.java:473)
builder.controller.Controller.updateEvent(Controller.java:1286)
builder.events.MsgBoard.notifySubscribers(MsgBoard.java:117)
builder.events.MsgBoard.publish(MsgBoard.java:81)
builder.views.TreeView$TreeTransferHandler.exportDone(TreeView.java:881)
javax.swing.TransferHandler$DragHandler.dragDropEnd(TransferHandler.java:1648)
java.awt.dnd.DragSourceContext.dragDropEnd(DragSourceContext.java:436)
sun.awt.dnd.SunDragSourceContextPeer$EventDispatcher.run(SunDragSourceContextPeer.java:488)
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Screenshots image

Version

Pconti31 commented 4 years ago

thank you for the information. Assigned bug number 164.

Pconti31 commented 4 years ago

The crash is now prevented in HotFix 0.14.b003 release. Note that page reorganization is not supported. A new bug 165 has been created as an enhancement request to allow page reorganization in some future release.