<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Fiji hangs when installing macro tool"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=835#c18">Comment # 18</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - Fiji hangs when installing macro tool"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=835">bug 835</a>
from <span class="vcard"><a class="email" href="mailto:ilan.tal@gmail.com" title="Ilan Tal <ilan.tal@gmail.com>"> <span class="fn">Ilan Tal</span></a>
</span></b>
<pre>Hi Curtis,
First and foremost I am delighted that you are thinking about the problem.
Until I used Mark's idea of attaching a debugger to the actual running Fiji
program, I could do absolutely nothing. With the debugger I can set break
points, investigate object values and the world opens up to investigation.
To clear up a minor point, isFiji is probably a variable which someone added
long ago for some long forgotten purpose. With the debugger I demonstrated that
it no longer does anything useful. You say it shouldn't be there and I said it
should either be fixed or be removed. To have something which might work if you
start Fiji under the old fiji command, but won't work if you start it with the
current imageJ command is just another bug waiting to appear.
What I did was spread around break points until I caught the path which was
being followed and then I could compare values and see what the differences
were between Fiji and ImageJ. In looking at the differences I could see that in
ImageJ macroFiles had valid information including my file, whereas in Fiji it
was null.
The next logical step was to find out why macroFiles was null. That led me to
Menus.java and see what the differences were in that program. In Menus.java I
found that validMacroName wasn't working in Fiji, but worked fine in ImageJ. In
<a href="show_bug.cgi?id=835#c11">comment 11</a> I found 5 additional files which should have passed the test but
failed. After 5 files, I stopped counting but macroFiles never reached a non
null value.
What is clear is that validMacroName is broken inside Fiji. The question is:
why? The 2 possibilities which I could see is either there is some invisible
character which trim() could eliminate, or something subtle in the fact that it
is a static procedure. If name.endsWith(".jar") works correctly, common sense
would say the name.endsWith(".ijm") should work as well. The problem is that it
fails. Why?
I see that you looked at the fallout after the explosion. Here is what I think
is happening. The macro, instead of being installed, is being executed. The
macro calls to log to print a message. That apparently starts a new thread and
something goes hay wire in unwinding the stack.
You can solve that problem, but that isn't the real problem. The real problem
is why is going down the wrong path in the first place? I traced it back to
validMacroName which isn't doing its job correctly. Solve that and the other
problem will disappear.
Thanks again for all your help,
Ilan</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>