Skip to content

Can't save circuit files #2

@dadler64

Description

@dadler64

OS: [Windows 10]
Version: [2.7.3]

About

When you go to save a file the dialogue shows up and prompts for a name and a location. That whole process seems to work since a file with the name you chose ends up in the directory you chose. The issues comes when something in the program decides to not write to the file and instead just leaves a blank file.

My hypothesis is that there is an issue with the output stream being fed into the XmlWriter class but I will need to investigate more to find the root cause of this issue.

Images

Save dialog:
SavingFile

Empty File:
EmptyFile

Error Log

Below is the error output when the program attempts to save to the requested file.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.cburch.logisim.tools.AddTool.sharesSource(AddTool.java:124)
	at com.cburch.logisim.file.XmlWriter.libraryContains(XmlWriter.java:317)
	at com.cburch.logisim.file.XmlWriter.findLibrary(XmlWriter.java:296)
	at com.cburch.logisim.file.XmlWriter.fromTool(XmlWriter.java:174)
	at com.cburch.logisim.file.XmlWriter.fromToolbarData(XmlWriter.java:167)
	at com.cburch.logisim.file.XmlWriter.fromLogisimFile(XmlWriter.java:103)
	at com.cburch.logisim.file.XmlWriter.write(XmlWriter.java:58)
	at com.cburch.logisim.file.LogisimFile.write(LogisimFile.java:382)
	at com.cburch.logisim.file.Loader.save(Loader.java:191)
	at com.cburch.logisim.proj.ProjectActions.doSave(ProjectActions.java:319)
	at com.cburch.logisim.proj.ProjectActions.doSaveAs(ProjectActions.java:302)
	at com.cburch.logisim.proj.ProjectActions.doSave(ProjectActions.java:309)
	at com.cburch.logisim.gui.menu.MenuFile.actionPerformed(MenuFile.java:128)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1064)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6397)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2762)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinginvestigateThis issue needs some investigating to learn more

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions