ClearVolume / imglib2-clearvolume

11 stars 3 forks source link

Bug in ClearVolume Fiji plugin on MacOS - missing dependencies? #9

Closed haesleinhuepf closed 7 years ago

haesleinhuepf commented 7 years ago

Hi guys,

I just downloaded a fresh copy of Fiji from the website and activated the ClearVolume update site. I opened the sample image "flybrain.tif" and clicked the menu Plugins > ClearVolume > Open in ClearVolume. Clear Volume it self does not open (just the teaser). After some seconds, I get this message in the Console window:


Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : atiocl64
Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : amdocl64
Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : atiocl32
Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : atiocl
Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : amdocl32
Nov 30, 2016 5:12:54 PM org.bridj.BridJ log
INFO: Library not found : amdocl
java.lang.UnsatisfiedLinkError: com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.clGetPlatformIDs(ILorg/bridj/Pointer;Lorg/bridj/Pointer;)I
    at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.clGetPlatformIDs(Native Method)
    at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.getPlatformIDs(JavaCL.java:150)
    at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.getPlatformIDs(JavaCL.java:155)
    at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.hasOpenCL1_0(JavaCL.java:166)
    at com.nativelibs4java.opencl.JavaCL.<clinit>(JavaCL.java:225)
    at clearvolume.renderer.opencl.OpenCLAvailability.isOpenCLAvailable(OpenCLAvailability.java:9)
    at clearvolume.renderer.factory.ClearVolumeRendererFactory.newOpenCLRenderer(ClearVolumeRendererFactory.java:314)
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initClearVolumeUnsignedShortArrayImg(ImgLib2ClearVolume.java:262)
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:445)
    at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:182)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:303)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:160)
    at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:86)
    at org.scijava.command.CommandModule.run(CommandModule.java:205)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[ERROR] Module threw exception
java.lang.NullPointerException
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initClearVolumeUnsignedShortArrayImg(ImgLib2ClearVolume.java:273)
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:445)
    at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:182)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:303)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:160)
    at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:86)
    at org.scijava.command.CommandModule.run(CommandModule.java:205)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

and this in the log window:


(Fiji Is Just) ImageJ 2.0.0-rc-54/1.51h; Java 1.8.0_66 [64-bit]; Mac OS X 10.12; 110MB of 7802MB (1%)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:288)
    at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:163)
    at ij.IJ.runPlugIn(IJ.java)
    at ij.Executer.runCommand(Executer.java:137)
    at ij.Executer.run(Executer.java:66)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
    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:284)
    ... 5 more
Caused by: java.lang.NullPointerException
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initClearVolumeUnsignedShortArrayImg(ImgLib2ClearVolume.java:273)
    at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:445)
    at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:182)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:303)
    at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:160)
    at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:86)
    at org.scijava.command.CommandModule.run(CommandModule.java:205)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    ... 1 more

Does anyone know how to fix this?

Thanks! Robert

royerloic commented 7 years ago

Which version of OSX do you have? Unfortunately JavaCL might be broken in the latest version. @Ulrik: did you mention that to me?

That’s a big problem.

But luckily we have now ClearCL which i could use to quickly patch ClearVolume with. Something to do during the hackaton.

Cheers :-)

Loic

skalarproduktraum commented 7 years ago

I mentioned this some time ago, as @ctrueden mentioned it to me. I have so far not upgraded to Sierra because nobody was exactly praising it. The issue however could probably be fixed with a symlink. I suspect JavaCL's probe library is linked to an older dylib than Sierra supplies.

skalarproduktraum commented 7 years ago

@haesleinhuepf just out of curiosity, could you post the output of ls /System/Library/Frameworks/OpenCL.framework/Libraries/? Thanks!

haesleinhuepf commented 7 years ago

@royerloic I'm using MacOS 10.12 Sierra for some time. Bettter don't ask why... But you're welcome to test any new version on my laptop during the hackathon :-)

@skalarproduktraum :


Last login: Wed Nov 30 19:55:19 on ttys000
hasenbau:~ rhaase$ ls /System/Library/Frameworks/OpenCL.framework/Libraries/
3425AMD             libCLVMAMDil_r700Plugin.dylib
AMDil.dylib         libCLVMCPUPlugin.dylib
AMDil_r700.dylib        libCLVMIGCPlugin.dylib
IGIL.dylib          libCLVMIGILPlugin.dylib
ImageFormats            libCLVMNVPTXPlugin.dylib
Legacy              libCLVMPTXPlugin.dylib
NVPTX.dylib         libCLVMPTXSM1XPlugin.dylib
PTX.dylib           libcl2module.dylib
PTXSM1X.dylib           libcldcpuengine.dylib
Vectorizer.dylib        openclc
libCLVMAMDilPlugin.dylib
hasenbau:~ rhaase$ 

Is that helpful?

ctrueden commented 7 years ago

Likewise, I run macOS Sierra and am happy to test whatever fixes, and/or be a human /bin/githubsh here. :smile:

skalarproduktraum commented 7 years ago

@haesleinhuepf @ctrueden Thanks guys! I'm still poking around to figure out what's going wrong... could you please install clinfo (brew install clinfo) and post its output?

ctrueden commented 7 years ago

@skalarproduktraum Here you go! https://gist.github.com/ctrueden/28788d9091d218f56f507920edbb1e01

skalarproduktraum commented 7 years ago

Thanks @ctrueden, could you also please post the output of nm -gU /System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL | grep Platform?

ctrueden commented 7 years ago

@skalarproduktraum Gist updated.

I also added clinfo-mavericks.log and nm-mavericks.log which are the same output, but on an OS X 10.9 Mavericks Mac Mini we have here in the lab. I don't know if that helps for diffing or whatever, but I figured it couldn't hurt.

haesleinhuepf commented 7 years ago

@skalarproduktraum here you go. https://gist.github.com/haesleinhuepf/f1196978739a63c2a580386d249adb83

:-)

skalarproduktraum commented 7 years ago

@ctrueden @haesleinhuepf Thanks for the gists, guys!

Unfortunately, I haven't been able to pinpoint the issue so far -- plus, I don't have access to a Sierra install at the moment. So... @haesleinhuepf, may I drop by e.g. on Monday and investigate?

haesleinhuepf commented 7 years ago

@Skalarproduktraum There's the hackspace in the afternoon - you're welcome to join 😉

skalarproduktraum commented 7 years ago

@royerloic I investigated a little more today with @haesleinhuepf ... it actually looks like a JavaCL problem. I guess it wouldn't really hurt to ditch a year-old unmaintained library in favour of ClearCL.

royerloic commented 7 years ago

cool, ok… Let do that during the Hackaton :-)

On 05 Dec 2016, at 21:10, Ulrik Günther notifications@github.com wrote:

@royerloic https://github.com/royerloic I investigated a little more today with @haesleinhuepf https://github.com/haesleinhuepf ... it actually looks like a JavaCL problem. I guess it wouldn't really hurt to ditch a year-old unmaintained library in favour of ClearCL.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ClearVolume/imglib2-clearvolume/issues/9#issuecomment-264962939, or mute the thread https://github.com/notifications/unsubscribe-auth/AByMkhwFVGamFRi4E5yMNOuVyiXUl8nrks5rFG-_gaJpZM4LAYeZ.

Dr. Loïc Alain Royer

Post-Doc - Myers Lab Max Planck Institute of Molecular Cell Biology and Genetics Pfotenhauerstr. 108 01307 Dresden

Too short? Here's why: http://emailcharter.org/

skalarproduktraum commented 7 years ago

Maybe some more details: So both BridJ and JavaCL build and test clean in their latest version on 10.11, but fail to do so on 10.12. There, some tests even segfault. I don't know whether Sierra eventually has some new security features which prevent JNA/BridJ from working correctly.

I'd maybe invest an hour tomorrow to check out whether there's and easy fix, otherwise we should move to ClearCL very soon :-D

royerloic commented 7 years ago

That’s really bad. damn. might need to replace bridJ?

thanks

skalarproduktraum commented 7 years ago

@royerloic: Is this now fixed with the new release?

haesleinhuepf commented 7 years ago

It works on my machine!💚

benmayersohn commented 7 years ago

Have you figured out how to resolve this? I'm getting the same "Library not found" errors with JavaCL and ClearCL on Sierra. I'm a newbie to OpenCL working on a homework assignment and I'm stuck because of this. The prof. advised us to just use a different computer with El Capitan, but I'd rather be able to do this on my laptop which is running Sierra.

Thanks!

haesleinhuepf commented 7 years ago

Have you tried updating Fiji? Because the current version of ClearVolume should work...

benmayersohn commented 7 years ago

Thanks for the quick response @haesleinhuepf! So I'm not actually using Fiji. I'm simply using ClearCL/JavaCL in Eclipse. I'm running a simple application that gets all platforms and lists the device info. I get the same errors whether running OpenCL or JavaCL, but I assume the issue with Fiji is related since the errors from BridJ about the libraries not being found are the same.

haesleinhuepf commented 7 years ago

I believe the solution was to remove a dependency to JavaCL. Right, @skalarproduktraum ?

royerloic commented 7 years ago

Hi,

If you use ClearCL (latest version) then ClearCLBackends.getBestBackend() should return the best backend which should not ne JavaCL based, but JOCL based instead.

On 15 Dec 2016, at 15:20, blm341 notifications@github.com wrote:

Thanks for the quick response @haesleinhuepf https://github.com/haesleinhuepf! So I'm not actually using Fiji. I'm simply using ClearCL/JavaCL in Eclipse. I'm running a simple application that gets all platforms and lists the device info. I get the same errors whether running OpenCL or JavaCL, but I assume the issue with Fiji is related since the errors from BridJ about the libraries not being found are the same.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ClearVolume/imglib2-clearvolume/issues/9#issuecomment-267338346, or mute the thread https://github.com/notifications/unsubscribe-auth/AByMkiRwyTHivaDYpHFSY54osZMek7gjks5rIUyXgaJpZM4LAYeZ.

Dr. Loïc Alain Royer

Post-Doc - Myers Lab Max Planck Institute of Molecular Cell Biology and Genetics Pfotenhauerstr. 108 01307 Dresden

Too short? Here's why: http://emailcharter.org/

benmayersohn commented 7 years ago

@royerloic great! That got rid of this error. Thank you so much! I'm getting a different error now that I suppose I should post in a different thread, but if this is has a simple fix that would be great! java.lang.NoClassDefFoundError: org/jocl/NativePointerObject.

royerloic commented 7 years ago

you need he JOCL dependency… please post these errors to the ClearCL issues maybe instead… :-)

On 15 Dec 2016, at 15:29, blm341 notifications@github.com wrote:

@royerloic https://github.com/royerloic great! That got rid of this error. Thank you so much! I'm getting a different error now that I suppose I should post in a different thread, but if this is has a simple fix that would be great! java.lang.NoClassDefFoundError: org/jocl/NativePointerObject.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ClearVolume/imglib2-clearvolume/issues/9#issuecomment-267340665, or mute the thread https://github.com/notifications/unsubscribe-auth/AByMkgOeXyXvz61XWozorgv9nC__X-xcks5rIU7ngaJpZM4LAYeZ.

Dr. Loïc Alain Royer

Post-Doc - Myers Lab Max Planck Institute of Molecular Cell Biology and Genetics Pfotenhauerstr. 108 01307 Dresden

Too short? Here's why: http://emailcharter.org/

benmayersohn commented 7 years ago

@royerloic okay I'll try that and stop posting on this thread, thanks for your help!