ImpulseAdventure / GUIslice-Builder

Cross-platform drag & drop GUI builder for GUIslice
Other
163 stars 34 forks source link

"Save As ..." causes fatal error #207

Closed al3xsh closed 1 year ago

al3xsh commented 2 years ago

Describe the bug I've just started using GUIsliceBuilder and as soon as I try and save a project it crashes (with "fatal error").

To Reproduce Steps to reproduce the behavior:

  1. Open GUIslice-Builder
  2. Click on 'Save As ...'
  3. See error

Expected behavior It to save the project.

Crash log / Project files

There are no project files. The created log is:

class java.lang.NullPointerException: null
builder.controller.Controller.saveAsProject(Controller.java:962)
builder.views.RibbonListener.actionPerformed(RibbonListener.java:651)
java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064)
java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
java.desktop/java.awt.Component.processEvent(Component.java:6400)
java.desktop/java.awt.Container.processEvent(Container.java:2263)
java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
java.base/java.security.AccessController.doPrivileged(Native Method)
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
java.base/java.security.AccessController.doPrivileged(Native Method)
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Version

Pconti31 commented 2 years ago

@al3xsh Yes, its crashing on:

    String sOldName = projectFile.getName();

Where projectFile hasn't be set to a value yet. The SaveAs is meant to save an existing project under a different name and folder. The workaround for a brand new project is to use Save instead. I'll fix this in the next release to fall back to a standard save when its a new empty project. Paul--

al3xsh commented 2 years ago

@Pconti31 - Awesome thanks!

I was following this walkthrough - https://github.com/ImpulseAdventure/GUIslice/wiki/Builder-_-Walkthrough - and that says "Save project with File → Save As"

:)

Cheers,

Alex

Pconti31 commented 2 years ago

@al3xsh Yes, well that's all under control of @ImpulseAdventure Calvin. I wrote the Builder and that's the only part of the system I can access. In any case, I'll fix in the next release.
Paul--

al3xsh commented 2 years ago

@Pconti31 - Thanks Paul!

Pconti31 commented 1 year ago

Fixed in release 17.b12