Login  Register

Re: Headless ImageJ2-rc2 - Analyze Particles returns no result

Posted by dscho on Jun 25, 2014; 11:00pm
URL: http://imagej.273.s1.nabble.com/Headless-ImageJ2-rc2-Analyze-Particles-returns-no-result-tp5008127p5008439.html

Hi Paul,

On Wed, 25 Jun 2014, Paul van Schayck wrote:

> On Tue, Jun 24, 2014 at 3:51 PM, Johannes Schindelin
> <[hidden email]> wrote:
> > On Tue, 24 Jun 2014, Paul van Schayck wrote:
> >
> >> On Mon, Jun 23, 2014 at 6:31 PM, Johannes Schindelin
> >> It is pretty consistent behaviour in headless mode. It takes about 30s
> >> to a minute for it to return to the command line after running a macro
> >> or script (only js, not bsh!). It also happens after having run the
> >> updater (although the cause may be completely different there I
> >> realise). It does not happen in Fiji.daily.
> >>
> >> This one looks suspicious:
> >>   java.lang.Thread.State: TIMED_WAITING (parking)
> >>         at sun.misc.Unsafe.park(Native Method)
> >>         - parking to wait for  <0x000000009d8b0070> (a
> >> java.util.concurrent.SynchronousQueue$TransferStack)
> >
> > Hmm... It looks as if the Context is not correctly disposed of. Is there
> > any chance that you can reduce your script to a minimal example of that
> > behavior and share that script with us? At least here I cannot reproduce
> > with a print("Hello"); script...
>
> This already is a print("hello") script. Which is being run like this:
> ./ImageJ-linux64 --headless -macro scripts/short.js
>
> For bsh script this only happens when being run with the -macro
> options.

Does it also happen if you run

        ./ImageJ-linux64 --headless -batch scripts/short.js

?

> Is it possible to clear up the --help message a bit? The --ij1 and --ij2
> options are quite confusing, and not clear to me. The ij1 -macro and
> -batch options are not mentioned. The type of <files> could be
> mentioned, so both image files and bsh script files.

Well, the launcher has its own options and passes all others to the
program to be launched. So -macro and -batch are actually not options that
the launcher really knows about... About the scripts accepted, it seems
that there is a bug and only --js is mentioned, but that documentation
actually mentions .js files explicitly:

        --js
                start Javascript (the Rhino engine) instead of
                ImageJ (this is the default when called with a
                file ending in .js)

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html