Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundException on directory drag and drop, SCIFIO on #284

Closed
karlduderstadt opened this issue Sep 22, 2022 · 4 comments
Closed

FileNotFoundException on directory drag and drop, SCIFIO on #284

karlduderstadt opened this issue Sep 22, 2022 · 4 comments

Comments

@karlduderstadt
Copy link

I discovered that I get a FileNotFoundException when dragging and dropping a directory with SCIFIO turned on. After the exception comes up the Image Sequence dialog also appears. With SCIFIO turned off, I do not get an exception.
Screenshot 2022-09-22 at 08 30 11

@ctrueden
Copy link
Member

ctrueden commented Sep 22, 2022

This issue happens due to a bug in SciJava Common's TextService, which was recently fixed: scijava/scijava-common@aa7fe2e. I have now released scijava-common 2.89.1 including this fix, and uploaded it to the core update site.

@ksugar
Copy link

ksugar commented Sep 22, 2022

@ctrueden Great!!! Using the fixed version, I could perform drag-and-drop of a directory with SCIFIO turned on without giving this error. I noticed that a directory with a name ending .txt (it's unusual) still gives this error. Is it the expected behavior?

@ksugar
Copy link

ksugar commented Sep 22, 2022

It seems that it's using TableIOPlugin.

[ERROR] java.io.FileNotFoundException: /home/user/directory.txt (Is a directory)
	at java.io.RandomAccessFile.open0(Native Method)
	at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
	at org.scijava.io.handle.FileHandle.initRAF(FileHandle.java:317)
	at org.scijava.io.handle.FileHandle.reader(FileHandle.java:298)
	at org.scijava.io.handle.FileHandle.length(FileHandle.java:112)
	at org.scijava.table.DefaultTableIOPlugin.open(DefaultTableIOPlugin.java:171)
	at org.scijava.table.DefaultTableIOPlugin.open(DefaultTableIOPlugin.java:158)
	at org.scijava.table.DefaultTableIOPlugin.open(DefaultTableIOPlugin.java:61)
	at org.scijava.table.io.TableIOPlugin.open(TableIOPlugin.java:48)
	at org.scijava.table.io.TableIOPlugin.open(TableIOPlugin.java:44)
	at org.scijava.io.AbstractIOPlugin.open(AbstractIOPlugin.java:82)
	at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:134)
	at net.imagej.legacy.DefaultLegacyHooks.interceptDragAndDropFile(DefaultLegacyHooks.java:417)
	at ij.plugin.DragAndDrop.openFile(DragAndDrop.java)
	at ij.plugin.DragAndDrop.run(DragAndDrop.java:160)
	at java.lang.Thread.run(Thread.java:748)

@ctrueden
Copy link
Member

@ksugar Thanks for the report about the table plugin. I fixed it (scijava/scijava-table@f3b17b78) and released scijava-table 1.0.0. The scijava-plugins-io-table component is now retired, merged with scijava-table. I pushed the update to the core update site. Let me know how it works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants