Monday 23 May 2011

Eclipse crashes when having CDT projects

This seems to be a problem since Oracle Java 6 update 23. I have update 24, and still have the same problem. The work around is adding -XX:-UseCompressedOops to the eclipse.ini file in the eclipse directory. This disables compressed oops.

In Java HotSpot VM, options that are specified with -XX are not stable and are not recommended for casual use. Such options, if they are boolean, can be turned on with -XX:+[option] and turned off with -XX:-[optoin].

What is compressed oops then? "Oop" means "ordinary object pointer". In HotSpot parlance, it is a managed pointer to an object. Compressed oops represent managed pointers as 32-bit values which must be scaled by a factor of 8 and added to a 64-bit base address to find the object they refer to. Some details can be found here. According to this bug report, the crash is not due to a compressed oops bug per se but an existing bug that could only be triggered under the object layout that results from compressed oops.

No comments :

Post a Comment