bgruening / galaxytools

:microscope::books: Galaxy Tool wrappers
MIT License
116 stars 227 forks source link

imagej2 enhance contrasts fails #1452

Closed bernt-matthias closed 1 month ago

bernt-matthias commented 1 month ago

stderr is

Available RAM: 345459MB, using 3/4 of that: 259095MB
JRE not found in '/usr/local/share/jre'
JAVA_HOME contains a JRE: '/usr/local/share/java/linux-amd64/jdk1.8.0_66//jre'
Re-executing with correct library lookup path (/.singularity.d/libs:/usr/local/share/lib/linux64:/usr/local/share/mm/linux64)
Available RAM: 345459MB, using 3/4 of that: 259095MB
JRE not found in '/usr/local/share/jre'
JAVA_HOME contains a JRE: '/usr/local/share/java/linux-amd64/jdk1.8.0_66//jre'
Using JAVA_HOME /usr/local/share/java/linux-amd64/jdk1.8.0_66//jre
Opening Java library /usr/local/share/java/linux-amd64/jdk1.8.0_66//jre/lib/amd64/server/libjvm.so
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Xmx6g -Xms256m
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Adding option: -Djava.home=/usr/local/share/java/linux-amd64/jdk1.8.0_66/
ij1.plugin.dirs: null
$HOME/.plugins: /root/.plugins does not exist
java.lang.IllegalArgumentException: Cannot handle app name in ij.gui.YesNoCancelDialog's public <init>(java.awt.Frame parent, java.lang.String title, java.lang.String msg)
    at net.imagej.patcher.CodeHacker.replaceAppNameInCall(CodeHacker.java:446)
    at net.imagej.patcher.LegacyExtensions.insertAppNameHooks(LegacyExtensions.java:419)
    at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:291)
    at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:308)
    at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:109)
    at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:101)
    at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:495)
    at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:397)
    at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376)
    at fiji.IJ1Patcher.run(IJ1Patcher.java:37)
    at net.imagej.launcher.ClassLauncher.patchIJ1(ClassLauncher.java:216)
    at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:155)
    at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
Caused by: javassist.CannotCompileException: No code replaced!
    at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1280)
    at net.imagej.patcher.CodeHacker.replaceAppNameInCall(CodeHacker.java:443)
    ... 12 more
Launching main class org.python.util.jython with parameters [/gpfs1/data/galaxy_server/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/imgteam/imagej2_enhance_contrast/056e74fbbf6c/imagej2_enhance_contrast/imagej2_enhance_contrast_jython_script.py, $output_log.txt, dataset_599765.tiff, no, 20.0, no, output.tiff, tiff]
Class loader = sun.misc.Launcher$AppClassLoader@764c12b6
/dataset_599765.tiff (No such file or directory)
Traceback (most recent call last):
  File "/gpfs1/data/galaxy_server/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/imgteam/imagej2_enhance_contrast/056e74fbbf6c/imagej2_enhance_contrast/imagej2_enhance_contrast_jython_script.py", line 19, in <module>
    input_image_plus_copy = input_image_plus.duplicate()
AttributeError: 'NoneType' object has no attribute 'duplicate'
java -Dpython.cachedir.skip=true -Dplugins.dir=/usr/local/share -Xmx259095m -Djava.awt.headless=true -Dapple.awt.UIElement=true -Xincgc -XX:PermSize=128m -Djava.class.path=/usr/local/share/jars/imagej-launcher-4.0.5.jar -Dimagej.dir=/usr/local/share -Dij.dir=/usr/local/share -Dfiji.dir=/usr/local/share -Dfiji.defaultLibPath=lib/amd64/server/libjvm.so -Dfiji.executable=ImageJ -Dij.executable=ImageJ -Djava.library.path=/.singularity.d/libs:/usr/local/share/lib/linux64:/usr/local/share/mm/linux64 -Dij.debug=true -Dscijava.log.level=debug net.imagej.launcher.ClassLauncher -classpath /usr/share/java/jython.jar -classpath . -ijjarpath jars -ijjarpath plugins org.python.util.jython /gpfs1/data/galaxy_server/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/imgteam/imagej2_enhance_contrast/056e74fbbf6c/imagej2_enhance_contrast/imagej2_enhance_contrast_jython_script.py $output_log.txt dataset_599765.tiff no 20.0 no output.tiff tiff

Besides the Java and python error the Xmx in the last call shown in the log seems to ignore the setting of the admin (_JAVA_OPTIONS: -Xmx6g -Xms256m).

bernt-matthias commented 1 month ago

@rmassei indicated to me that this runs on eu. are there any special settings on eu @bgruening ?

bgruening commented 1 month ago

Is that the tool with:

fiji @20170530
grep @3.4

as dependency?

rmassei commented 1 month ago

Hi @bgruening, here the tool giving the error:

it is not possible to execute also other imagej2 tools such as:

on the other hand, all tools running with scikit-image and scipy are working fine.

bgruening commented 1 month ago

The only think that I can imagine is that the venv is different.

mulled-v1-5546a3fafd89b65a927f1cc651068c6933cc2760c472e4b65d5fd69f355acdb4.txt

This is what is in my environment and the name.

bernt-matthias commented 1 month ago

The critical problem seems to be

/dataset_599765.tiff (No such file or directory)