You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Empty File:
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)
The text was updated successfully, but these errors were encountered:
Delete the three lines highlighted in the picture below from default.templ to be able to save files.
Analysis:
After quite a bit of investigation this issue has been traced back to a NullPointerException which was occurring when the program was trying to load items in the <toolbar> tags from default.templ which are highlighted below. The NOT, AND, and OR gates in the toolbar seem to create a nullComponentFactory object which needs to be looked into.
File containing the three problematic gates.
Notice thefactory: nullon line 125 which is attributed to theaddTool: "NOT Gate"introduced on line 122
Temporary Solution:
That being said, the workaround to this is to delete those lines to prevent the factory: null in the NOT, AND, and OR gates from popping up. The main side effect of this is that the three gates will not appear in the toolbar above. The workaround for this now is to just use the Gates folder to access those three gates.
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:
Empty File:
Error Log
Below is the error output when the program attempts to save to the requested file.
The text was updated successfully, but these errors were encountered: