GUIslice-Builder icon indicating copy to clipboard operation
GUIslice-Builder copied to clipboard

"Save As ..." causes fatal error

Open al3xsh opened this issue 3 years ago • 4 comments

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

  • Builder version: 0.17.b11
  • OS: Linux (using Arduino 1.8.19 java version "1.8.0_191")

al3xsh avatar May 23 '22 10:05 al3xsh

@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--

Pconti31 avatar May 23 '22 12:05 Pconti31

@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

al3xsh avatar May 23 '22 12:05 al3xsh

@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--

Pconti31 avatar May 23 '22 14:05 Pconti31

@Pconti31 - Thanks Paul!

al3xsh avatar May 23 '22 14:05 al3xsh

Fixed in release 17.b12

Pconti31 avatar Sep 01 '22 19:09 Pconti31