Menu

#199 Error when closing editor window

Major
open-fixed
nobody
None
7
2022-09-14
2022-09-12
No

I get a pop-up message and the following stack-trace in Netbeans log file after closing an editor window. It does not matter, if I close it with the (x) on the tab or with ":w". As you can see in the log below, I am using Netbeans 15 on Windows (10).

INFO [org.openide.filesystems.FileSystem]: Trying to create new file C:\Users\mbruckschwaiger\AppData\Roaming\NetBeans\15\config\Preferences\org\netbeans\modules\jvi\marks\buf88479665\".properties.
SEVERE [com.raelity.jvi.core.MarkOps]
msg
Caused: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
      at java.base/java.io.WinNTFileSystem.createFileExclusively(Native Method
      at java.base/java.io.File.createNewFile(File.java:1043)
      at org.openide.filesystems.LocalFileSystem.createData(LocalFileSystem.java:230)
      at org.openide.filesystems.LocalFileSystem$Impl.createData(LocalFileSystem.java:556)
      at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:460)
      at org.openide.filesystems.FileUtil.createData(FileUtil.java:783)
      at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1163)
      at org.openide.filesystems.FileUtil.createData(FileUtil.java:783)
      at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1163)
      at org.openide.filesystems.FileUtil.createData(FileUtil.java:783)
      at org.netbeans.core.startup.preferences.PropertiesStorage.toPropertiesFile(PropertiesStorage.java:310)
      at org.netbeans.core.startup.preferences.PropertiesStorage.outputStream(PropertiesStorage.java:239)
      at org.netbeans.core.startup.preferences.PropertiesStorage.save(PropertiesStorage.java:213)
      at org.netbeans.core.startup.preferences.NbPreferences.flushSpi(NbPreferences.java:224)
Caused: java.util.prefs.BackingStoreException
      at org.netbeans.core.startup.preferences.NbPreferences.flushSpi(NbPreferences.java:227)
      at java.prefs/java.util.prefs.AbstractPreferences.flush2(AbstractPreferences.java:1435)
      at java.prefs/java.util.prefs.AbstractPreferences.flush2(AbstractPreferences.java:1442)
      at java.prefs/java.util.prefs.AbstractPreferences.flush2(AbstractPreferences.java:1442)
      at java.prefs/java.util.prefs.AbstractPreferences.flush(AbstractPreferences.java:1428)
      at org.netbeans.core.startup.preferences.NbPreferences.flush(NbPreferences.java:289)
[catch] at com.raelity.jvi.core.MarkOps$BufferMarksPersist$EventHandlers.persist(MarkOps.java:944)
      at com.raelity.jvi.core.MarkOps$BufferMarksPersist.persistMark(MarkOps.java:861)
      at com.raelity.jvi.core.MarkOps.setmark(MarkOps.java:167)
      at com.raelity.jvi.core.TextView.recordLastFPOS(TextView.java:160)
      at org.netbeans.modules.jvi.impl.NbCaret.deinstall(NbCaret.java:84)
      at java.desktop/javax.swing.text.JTextComponent.setCaret(JTextComponent.java:592)
      at org.openide.text.QuietEditorPane.setCaret(QuietEditorPane.java:229)
      at org.netbeans.editor.BaseTextUI.uninstallUI(BaseTextUI.java:251)
      at java.desktop/javax.swing.JComponent.uninstallUIAndProperties(JComponent.java:755)
      at java.desktop/javax.swing.JComponent.setUI(JComponent.java:730)
      at java.desktop/javax.swing.text.JTextComponent.setUI(JTextComponent.java:338)
      at org.netbeans.editor.BaseKit$ClearUIForNullKitListener.propertyChange(BaseKit.java:4412)
      at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
      at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
      at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
      at java.desktop/java.awt.Component.firePropertyChange(Component.java:8712)
      at org.openide.text.QuietEditorPane.firePropertyChange(QuietEditorPane.java:206)
      at java.desktop/javax.swing.JEditorPane.setEditorKit(JEditorPane.java:1115)
      at org.openide.text.CloneableEditor.componentClosed(CloneableEditor.java:291)
      at org.netbeans.core.spi.multiview.text.MultiViewCloneableEditor.componentClosed(MultiViewCloneableEditor.java:95)
      at org.netbeans.core.spi.multiview.text.MultiViewEditorElement.componentClosed(MultiViewEditorElement.java:106)
      at org.netbeans.core.multiview.MultiViewPeer.peerComponentClosed(MultiViewPeer.java:304)
      at org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentClosed(MultiViewCloneableTopComponent.java:104)
      at org.openide.windows.WindowManager.componentCloseNotify(WindowManager.java:297)
      at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentClosed(WindowManagerImpl.java:1189)
      at org.netbeans.core.windows.Central.removeModeTopComponent(Central.java:1000)
      at org.netbeans.core.windows.Central.userClosedTopComponent(Central.java:2012)
      at org.netbeans.core.windows.view.DefaultView.userClosedTopComponent(DefaultView.java:771)
      at org.netbeans.core.windows.view.ui.TabbedHandler.actionPerformed(TabbedHandler.java:314)
      at org.netbeans.core.multitabs.Controller.postActionEvent(Controller.java:108)
      at org.netbeans.core.multitabs.impl.CloseButtonHandler.mouseClicked(CloseButtonHandler.java:71)
      at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
      at java.desktop/java.awt.Component.processMouseEvent(Component.java:6619)
      at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
      at java.desktop/java.awt.Component.processEvent(Component.java:6381)
      at java.desktop/java.awt.Container.processEvent(Container.java:2266)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4991)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4823)
      at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
      at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4584)
      at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
      at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4823)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
      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)
ALL [null]: The filename, directory name, or volume label syntax is incorrect

Discussion

  • Ernie Rael

    Ernie Rael - 2022-09-12

    Thanks very much for the report. (I'm on Linux now, no Windows testing)

    With v2.0.9 jVi saves the cursor position when a file closes, and uses it to restore the cursor position if the file is reopened. Vim uses a buffer mark named ", jVi uses the same name.

    This ends up creating a preferences node named of double quote, which is legal, accd to the jdk docs

    The only restrictions on this name are that it cannot be the empty string,
    and it cannot contain the slash character ('/')

    So I'd say this is a NetBeans bug since it is their implementation of Preferences. I'm curious if the jdk implmementation has the problem on windows.

    An option viminfo: max buf-marks was added in 2.0.9, but it looks like saving this mark by-passes that. oh well.

    But all that hardly matters, it's jVi's bug now. I'll try to get something out quickly.

     
  • Ernie Rael

    Ernie Rael - 2022-09-12

    Instead of " I'm going to use @; since it represents your location in a file, at sign feels good. Any problem with a Windows filename having that char in it? If I don't hear of any problem soon, it's going in.

     
  • Ernie Rael

    Ernie Rael - 2022-09-12

    I've uploaded https://sourceforge.net/projects/jvi/files/jVi-for-NetBeans/NetBeans-12_JDK-11/nbvi-2.0.10.rc2.zip/download

    Give it a try if you get a chance. If I don't hear anything negative, I'll upload to the jVi update center tomorrow.

     
    • Mario Bruckschwaiger

      Hi, I just tested it on Windows, and it works. Thanks!

       
  • Ernie Rael

    Ernie Rael - 2022-09-14

    Got hold of a windows system. Found a couple more windows issues

    • clipboard handling both on Linux, broke windows clipboard handling
    • :e*, :cd,:e path handling issues with '\' in filename (was treated like an escape)

    v2.0.11 is now available and fixes these issues

     
  • Ernie Rael

    Ernie Rael - 2022-09-14
    • status: open --> open-fixed
    • Priority: 5 --> 7
     

Log in to post a comment.

MongoDB Logo MongoDB