New ImageJ version causes compilation error

31 views
Skip to first unread message

Davide Heller

unread,
Jun 5, 2014, 9:54:27 AM6/5/14
to icy-so...@googlegroups.com
Hi guys, 

I am experiencing crashes when executing my plugin from eclipse with the latest imagej version (1.49a/b) in icy 1.5. Eclipse notifies  an invalid memory access (location 0x28 rip=0x10bcd07b8) while mac reports the following crash (attached the compete report):

Process:         java [3615]
Path:            /usr/bin/java
Identifier:      com.apple.javajdk16.cmd
Version:         1.0 (1.0)
Code Type:       X86-64 (Native)
Parent Process:  eclipse [3411]
User ID:         502

OS Version:      Mac OS X 10.8.5 (12F45)

Crashed Thread:  24  Java: C2 CompilerThread1

Current CompileTask:
C2: 137843  49%     ij.process.ByteBlitter.copyBits(Lij/process/ImageProcessor;III)V @ 367 (1316 bytes)

This does not happen when the version is 1.47h, shipped by default in icy 1.3.6 I believe (e.g. substituting the ij49a in icy1.5.1 with ij47h allows my plugin to run from eclipse). In addition if I export my plugin as jar and run it independently it works with all icy & imagej combinations (tested icy>1.2, ij>1.47h).

My problem is that I need a bug fix from ij 1.48i which improves the skeletonization function required by my plugin. While I can work exporting my plugin, I'd really like to execute my plugin also from eclipse. 

Do you have any idea of what is going on?

Hope everything is fine in Paris and big compliments for the awesome work:)

All the best, 
Davide
problem_report_for_icy_main_Icy.txt

Stephane

unread,
Jun 5, 2014, 11:22:05 AM6/5/14
to icy-so...@googlegroups.com
Hi Davide,

Thanks for your king message :) We experienced the same sort of issue in Icy but on a different method.
It looks like java JIT compiler can crash on some methods doing maybe obscure stuffs.
To resolve it you can add a specific JVM parameter in your eclipse :

"-XX:CompileCommand=exclude,ij.process.ByteBlitter.copyBits"

That should be enough to prevent it to crash. What is strange is that it does not crash when used outside Eclipse.

Best,

- Stephane

Davide Heller

unread,
Jun 6, 2014, 4:22:27 AM6/6/14
to icy-so...@googlegroups.com
Hi Stephane, 

thanks a lot for your answer! I managed to exclude the compilation of ByteBlitter by adding your suggested exclude line to the VM parameters( with a minor change, dots into slashes, i.e. -XX:CompileCommand=exclude,ij/process/ByteBlitter.copyBits) and now my plugin/icy doesn't crash anymore when executed from eclipse:-)

Trying to understand where the problem was created, I found out that the error starts with ij-1.47r and indeed the last commit that changed the class in question was introduced in a beta version of 1.47r (https://github.com/imagej/imagej1/commit/aea63fcb6e0de9cc5173e79fab61760bfcbafb77#diff-92a058747c2bcdda34cbb3097dacc38cL169

I'll post it to the developer list of imageJ, maybe they can make more sense out of it. 

Cheers, 
Davide

Stephane

unread,
Jun 6, 2014, 4:46:49 AM6/6/14
to icy-so...@googlegroups.com
Hi Davide,

Oh yeah sorry for the wrong parameter, i copy / pasted the class name from the error log and forgot to replace dot by slash character where needed ! Actually the issue does not come from ImageJ team, they can indeed change their code to avoid the error but still that is a bug in the JVM and it's a shame it is still present as we reported it a long time ago (maybe 3 years) to java bug report site... anyway i guess we will have to use specific parameter in the meantime to avoid it.

Cheers,

- Stephane

Davide Heller

unread,
Jun 6, 2014, 4:58:11 AM6/6/14
to icy-so...@googlegroups.com
Hey Stephane, 

thanks for clarifying. I will quickly add that to the imageJ thread (already posted it..). I guess making a jump to java7 or 8 will probably solve the issue for the future. Since waiting for an oracle/apple update will probably take quite a while:/

All the best, 
Davide
Reply all
Reply to author
Forward
0 new messages