I was fixing a few things in the Sessions plugin and was testing it out. Previously, I had opened an XML file from a tablet via USB in jEdit, then later unmounted the tablet and forgot the file was open in jEdit. I changed sessions in the Sessions plugin, and was asked if I wanted to save the changes to the XML file. I said yes (not noticing it wasn't a local file), and jEdit hung. I had to kill the process to get it back.
The last message in the activity.log was:
[jEdit Worker #0] [error] BufferSaveRequest: Unable to save buffer java.io.FileNotFoundException: /home/danson/mnt/tablet/Internal shared storage/bluetooth/Barb s Zoom.mss.xml (No such file or directory)
A thread dump shows this:
"AWT-EventQueue-0" #15 prio=6 os_prio=0 cpu=186548.55ms elapsed=151879.05s tid=0x00007f56c4633000 nid=0x11c81 in Object.wait() [0x00007f56697e3000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@14.0.2/Native Method)
- waiting on <no object reference available>
at java.lang.Object.wait(java.base@14.0.2/Object.java:321)
at org.gjt.sp.util.TaskManager.waitForIoTasks(TaskManager.java:178)
- locked <0x00000000dca4ba40> (a java.lang.Object)
at org.gjt.sp.jedit.jEdit.closeBuffer(jEdit.java:2056)
at org.gjt.sp.jedit.jEdit.closeBuffer(jEdit.java:2117)
at sessions.SessionManager.setCurrentSession(SessionManager.java:320)
at sessions.SessionManager.showSessionManagerDialog(SessionManager.java:551)
at sessions.SessionSwitcher.actionPerformed(SessionSwitcher.java:164)
at javax.swing.AbstractButton.fireActionPerformed(java.desktop@14.0.2/AbstractButton.java:1967)
at javax.swing.AbstractButton$Handler.actionPerformed(java.desktop@14.0.2/AbstractButton.java:2308)
at javax.swing.DefaultButtonModel.fireActionPerformed(java.desktop@14.0.2/DefaultButtonModel.java:405)
at javax.swing.DefaultButtonModel.setPressed(java.desktop@14.0.2/DefaultButtonModel.java:262)
There are some synchronized blocks in TaskManager that are probably causing the problem, but I'm not familiar with this part of the code.
I've never thought to submit a bug for this, and it's happened pretty much since I started using jEdit, but this happens for remote server work as well when using the FTP plugin.
Would be a pretty big fix in my books because I have to change the way I work to ensure I don't get caught by this (which I've almost trained myself to do over the years). Thanks for logging this.