Re: Call multithreaded plugin from another plugin
Posted by
Albert Cardona-2 on
URL: http://imagej.273.s1.nabble.com/Call-multithreaded-plugin-from-another-plugin-tp3691048p3691051.html
Michael Doube wrote:
> Hi all
>
> I have a plugin that I've multithreaded (Purify) that I'd like to call
> from another plugin. I've already reduced the code in Purify's run()
> method to a call to show a dialog ( showDialog() ) and a call to a
> method, purify(), that calls the rest of the plugin using the variables
> returned by showDialog(). Purify works fine when I run it directly from
> the Plugins menu, but when I call it from another plugin, e.g.
>
> Purify p = new Purify();
> p.purify(important, variables).show(); //p.purify returns an ImagePlus
>
> It hangs in the middle of part of Purify that is multithreaded. It runs
> properly when I run it with only 1 chunk (i.e. not multithreaded).
If there is an Exception stack trace, please print it here.
If there isn't (thread lock up), launch the JVM from a command line and,
when it hangs, push control+\ (control backslash) on the command line,
and paste us here the entire set of stack traces (one per thread).
Albert