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

Does not work if path is long #38

Open
louim-lbs opened this issue Oct 3, 2024 · 0 comments
Open

Does not work if path is long #38

louim-lbs opened this issue Oct 3, 2024 · 0 comments

Comments

@louim-lbs
Copy link

Hi,
Just found a bug, where prediction from "Predict" menu does not work if the files paths are too long. Copying the files closer to root make it work again.

It raises an Exception:

[ERROR] Command errored: N2V predict java.lang.InternalError: Should not get here at sun.nio.fs.WindowsNativeDispatcher.GetFinalPathNameByHandle(Native Method) at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:77) at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:242) at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836) at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44) at com.sun.nio.zipfs.ZipFileSystemProvider.removeFileSystem(ZipFileSystemProvider.java:322) at com.sun.nio.zipfs.ZipFileSystem.close(ZipFileSystem.java:313) at net.imagej.modelzoo.DefaultModelZooArchive.extract(DefaultModelZooArchive.java:181) at net.imagej.modelzoo.DefaultModelZooArchive.createModelInstance(DefaultModelZooArchive.java:111) at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.loadModel(AbstractModelZooPrediction.java:156) at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.run(AbstractModelZooPrediction.java:99) at net.imagej.modelzoo.consumer.command.AbstractSingleImagePredictionCommand.run(AbstractSingleImagePredictionCommand.java:101) at de.csbdresden.n2v.command.N2VPredictCommand.run(N2VPredictCommand.java:59) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

And in the console:

`(Fiji Is Just) ImageJ 2.14.0/1.54j; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 281MB of 12014MB (2%)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:308)
at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:166)
at ij.IJ.runPlugIn(IJ.java)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:70)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:304)
... 5 more
Caused by: java.lang.RuntimeException: Module threw error
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:131)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
Caused by: java.lang.InternalError: Should not get here
at sun.nio.fs.WindowsNativeDispatcher.GetFinalPathNameByHandle(Native Method)
at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:77)
at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:242)
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:836)
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:44)
at com.sun.nio.zipfs.ZipFileSystemProvider.removeFileSystem(ZipFileSystemProvider.java:322)
at com.sun.nio.zipfs.ZipFileSystem.close(ZipFileSystem.java:313)
at net.imagej.modelzoo.DefaultModelZooArchive.extract(DefaultModelZooArchive.java:181)
at net.imagej.modelzoo.DefaultModelZooArchive.createModelInstance(DefaultModelZooArchive.java:111)
at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.loadModel(AbstractModelZooPrediction.java:156)
at net.imagej.modelzoo.consumer.AbstractModelZooPrediction.run(AbstractModelZooPrediction.java:99)
at net.imagej.modelzoo.consumer.command.AbstractSingleImagePredictionCommand.run(AbstractSingleImagePredictionCommand.java:101)
at de.csbdresden.n2v.command.N2VPredictCommand.run(N2VPredictCommand.java:59)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
... 6 more
`

Best,

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

1 participant