[ImageJ-bugs] [Bug 854] Multithreading problem in javascript macro

bugzilla at fiji.sc bugzilla at fiji.sc
Thu Aug 21 15:03:56 CDT 2014


http://fiji.sc/bugzilla/show_bug.cgi?id=854

Curtis Rueden <ctrueden at wisc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDSINFO                   |RESOLVED
                 CC|                            |ctrueden at wisc.edu
         Resolution|---                         |WONTFIX

--- Comment #5 from Curtis Rueden <ctrueden at wisc.edu> ---
I downloaded your script and your TIFF, and was able to reproduce the problem
on my OS X machine. Impressive script, Thomas!

Unfortunately, debugging concurrency issues is one of the more difficult and
time consuming programming tasks. And ImageJ 1.x is rife with concurrency
problems lurking under the hood, which most people rarely encounter, but which
advanced script writers such as yourself sometimes bump into.

I really appreciate that you would love some help debugging your code, but
given the complexity of the script, in this case I think there is no option but
for you, or someone else in your group, to dig in more deeply and identify the
root cause of the issue. Ultimately, you have a large function being called by
many threads at once into IJ1 data structures which are probably not
thread-safe, so some synchronized blocks may be in order (and I'm not sure how
you do that in JavaScript).

Two parting suggestions:

1) You could recast your code as a Java plugin and use an IDE with a dedicated
debugger, memory profiler, and many other goodies. Debugging concurrency issues
from Eclipse (by attaching to a running Fiji as a remote debugger; see
http://fiji.sc/Debugging_intro#Attaching_to_ImageJ_instances) will be easier
than debugging things from the ImageJ Script Editor in JavaScript with no such
tools.

2) You could post a Minimal, Complete and Verifiable example on StackOverflow
(http://stackoverflow.com/help/mcve) and hope that someone from the larger
community of developers there has additional suggestions or insight.

I wish you the best of luck with it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140821/f66472a0/attachment.html>


More information about the Imagej-bugs mailing list