joheras / IJ-OpenCV

GNU General Public License v3.0
29 stars 13 forks source link

Fiji crashes after enabling IJ-OpenCV update site #11

Closed LauLauThom closed 6 years ago

LauLauThom commented 6 years ago

Hi Joheras, Thanks for the last updates and fixes, it is nice to know that the project is still supported !

I recently had an issue though after some updates. I tried on a fresh Fiji installation, applying the last fiji updates, restarting and then enabling the IJ-opencv site. After this last installation Fiji opens but close directly. While deleting the IJ-OpenCV-1.2.1.jar prevents the crash.

Using the headless mode I have a long error message (see bottom). I guess the following lines are the key :

Error while executing the main() method of class 'net.imagej.Main':
java.lang.NoClassDefFoundError: org/bytedeco/javacpp/opencv_core$Rect2d
...BLABLA...
Caused by: java.lang.ClassNotFoundException: org.bytedeco.javacpp.opencv_core$Rect2d 

Full message :

PS C:\Users\Laurent Thomas\Downloads\fiji-win64\Fiji.app> ./ImageJ-win64.exe --ij2 --headless --console
PS C:\Users\Laurent Thomas\Downloads\fiji-win64\Fiji.app> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[INFO] Overriding Adaptive Threshold; identifier: command:com.mycompany.adaptivethresholdj.Adaptive_ThresholdJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/AdaptiveThresholdJ-1.0-SNAPSHOT.jar
[INFO] Overriding BGR Histogram Comparison; identifier: command:com.mycompany.bgrhistogramcomparisonj.BGR_Histogram_ComparisonJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/BGRHistogramComparisonJ-1.0-SNAPSHOT.jar
[INFO] Overriding BlackHat; identifier: command:com.mycompany.blackhatj.BlackHatJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/BlackHatJ-1.0-SNAPSHOT.jar
[INFO] Overriding Canny Edge Detection; identifier: command:com.mycompany.cannyedgedetectionj.CannyEdgeDetectionJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/CannyEdgeDetectionJ-1.0-SNAPSHOT.jar
[INFO] Overriding Convex Hull from Polygon ROI; identifier: command:com.mycompany.convexhullfrompolygonroij.ConvexHullFromPolygonROIJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/ConvexHullFromPolygonROIJ-1.0-SNAPSHOT.jar
[INFO] Overriding Detect circles; identifier: command:com.mycompany.detectcircles.DetectCirclesJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/DetectCirclesJ-1.0-SNAPSHOT.jar
[INFO] Overriding Face detection; identifier: command:com.mycompany.facedetectionj.FaceDetectionJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/FaceDetectionJ-1.0-SNAPSHOT.jar
[INFO] Overriding Find contours; identifier: command:com.mycompany.findcontoursj.FindContoursJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/FindContoursJ-1.0-SNAPSHOT.jar
[INFO] Overriding HSV Histogram Comparison; identifier: command:com.mycompany.hsvhistogramcomparisonj.HSV_Histogram_ComparisonJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/HSVHistogramComparisonJ-1.0-SNAPSHOT.jar
[INFO] Overriding High dynamic range imaging; identifier: command:com.mycompany.highdynamicrangeimagingj.High_Dynamic_Range_ImagingJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/HighDynamicRangeImagingJ-1.0-SNAPSHOT.jar
[INFO] Overriding Hough lines; identifier: command:com.mycompany.houghlinesj.HoughLinesJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/HoughLinesJ-1.0-SNAPSHOT.jar
[INFO] Overriding Keypoint detector; identifier: command:com.mycompany.keypointdetectorj.KeyPointDetectorJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/KeyPointDetectorJ-1.0-SNAPSHOT.jar
[INFO] Overriding Kmeans clustering; identifier: command:com.mycompany.kmeansclusteringj.KMeans_ClusteringJ; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/KMeansClusteringJ-1.0-SNAPSHOT.jar
[INFO] Overriding Non local means denoising; identifier: command:com.mycompany.nonlocalmeansdenoisingj.Non_Local_Means_DenoisingJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/NonLocalMeansDenoisingJ-1.0-SNAPSHOT.jar
[INFO] Overriding Stitching; identifier: command:com.mycompany.stitchingj.StitchingJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/StitchingJ-1.0-SNAPSHOT.jar
[INFO] Overriding Template matching; identifier: command:com.mycompany.templatematchingj.TemplateMatchingJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/TemplateMatchingJ-1.0-SNAPSHOT.jar
[INFO] Overriding Whitehat; identifier: command:com.mycompany.whitehatj.WhiteHatJ_; jar: file:/C:/Users/LAUREN~1/DOWNLO~1/FIJI-W~1/Fiji.app/plugins/IJ-OpenCV-plugins/WhiteHatJ-1.0-SNAPSHOT.jar
Error while executing the main() method of class 'net.imagej.Main':
java.lang.NoClassDefFoundError: org/bytedeco/javacpp/opencv_core$Rect2d
        at ijopencv.opencv.RectdRoiConverter.getInputType(RectdRoiConverter.java:45)
        at org.scijava.convert.AbstractConverter.canConvert(AbstractConverter.java:113)
        at org.scijava.convert.AbstractConverter.canConvert(AbstractConverter.java:158)
        at org.scijava.convert.AbstractConverter.canConvert(AbstractConverter.java:97)
        at org.scijava.convert.AbstractConverter.canConvert(AbstractConverter.java:89)
        at org.scijava.convert.AbstractConverter.supports(AbstractConverter.java:144)
        at org.scijava.convert.AbstractConverter.supports(AbstractConverter.java:69)
        at org.scijava.plugin.HandlerService.getHandler(HandlerService.java:60)
        at org.scijava.util.ConversionUtils.handler(ConversionUtils.java:222)
        at org.scijava.util.ConversionUtils.convert(ConversionUtils.java:91)
        at org.scijava.command.CommandModuleItem.tValue(CommandModuleItem.java:257)
        at org.scijava.command.CommandModuleItem.tValue(CommandModuleItem.java:251)
        at org.scijava.command.CommandModuleItem.getMinimumValue(CommandModuleItem.java:143)
        at org.scijava.module.DefaultMutableModuleItem.<init>(DefaultMutableModuleItem.java:125)
        at org.scijava.command.DynamicCommandInfo.copy(DynamicCommandInfo.java:314)
        at org.scijava.command.DynamicCommandInfo.populateItems(DynamicCommandInfo.java:305)
        at org.scijava.command.DynamicCommandInfo.<init>(DynamicCommandInfo.java:74)
        at org.scijava.command.DynamicCommand.getInfo(DynamicCommand.java:75)
        at org.scijava.options.OptionsPlugin.load(OptionsPlugin.java:94)
        at org.scijava.options.DefaultOptionsService.getInstances(DefaultOptionsService.java:84)
        at org.scijava.plugin.SingletonService.lambda$initialize$0(SingletonService.java:97)
        at org.scijava.object.ObjectIndex.resolvePending(ObjectIndex.java:388)
        at org.scijava.object.ObjectIndex.get(ObjectIndex.java:133)
        at org.scijava.object.DefaultObjectService.getObjects(DefaultObjectService.java:87)
        at org.scijava.display.DefaultDisplayService.getDisplays(DefaultDisplayService.java:166)
        at org.scijava.ui.DefaultUIService.showUI(DefaultUIService.java:159)
        at org.scijava.ui.DefaultUIService.showUI(DefaultUIService.java:142)
        at org.scijava.AbstractGateway.launch(AbstractGateway.java:104)
        at net.imagej.Main.main(Main.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
        at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
        at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Caused by: java.lang.ClassNotFoundException: org.bytedeco.javacpp.opencv_core$Rect2d
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 36 more
l-jaye commented 6 years ago

Hello @joheras and @Jindil

Just commenting here to follow, I am having the exact same issues - crash of fresh FIJI installation if the moment IJ-OpenCV update site is checked.

Cheers, Julia

joheras commented 6 years ago

Hi!

Thanks for reporting this bug. I uploaded the new version of IJ-OpenCV but not the updated dependencies; so, that was the problem.

It is fixed now. Let me know if it works for you now.

Best, Jónathan

LauLauThom commented 6 years ago

Seems to be good yes thanks !

l-jaye commented 6 years ago

@joheras

All good now, thanks so much!

LauLauThom commented 6 years ago

I just had to replace the function hconcat with vconcat and transposition but I guess this was a (nasty) change in opencv. We can close this issue now :)