Virtualized Eclipse Disappearing Act

The Virtualized Eclipse Disappearing Act

I ran into an annoying issue yesterday that dealt with virtualized windows 7 and Eclipse.  I loaded a clean VM with Windows 7, Java, and Eclipse.  To test the development machine I simply opened up eclipse and attempted to create an XML document.  Then all the sudden Eclipse disappeared.   After a little investigation, and a  useful suggestion from a colleague, the issue was related to memory.  I had ruled out memory by beefing up my “hardware” memory, but apparently my feeble mind didn’t think about any software settings.

So if you are seeing a disappearing and or locking up eclipse and a log message (hs_err_***.log)

#

# A fatal error has been detected by the Java Runtime Environment:

#

# java.lang.OutOfMemoryError: requested 152 bytes for CHeapObj-new. Out of swap space?

#

#  Internal Error (allocation.inline.hpp:39), pid=620, tid=1628

#  Error: CHeapObj-new

#

# JRE version: 6.0_21-b06

# Java VM: Java HotSpot(TM) Client VM (17.0-b16 mixed mode windows-x86 )

# If you would like to submit a bug report, please visit:

#   http://java.sun.com/webapps/bugreport/crash.jsp

#

It is proudly outside of the depth/breadth of my knowledge the internal details about heap and  permgen usage.

But at a high level permgen holds data about classes that have been loaded and created, and the heap is where objects go to die ;).  Feel free to do some reading… these are decent sites..

http://www.freshblurbs.com/explaining-java-lang-outofmemoryerror-permgen-space

http://www.brokenbuild.com/blog/2006/08/04/java-jvm-gc-permgen-and-memory-options/

http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html

Onto my simple issue…  Inside the Eclipse.ini I modified

-Xms40m  (I didn’t change this which is the initial java heap size)
-Xmx1024m  (I doubled this… it is the max  java heap size)
-XX:MaxPermSize=512m  ( I added this attribute …)


https://i2.wp.com/i385.photobucket.com/albums/oo292/PhntmBlackIce/Wizard101%20Wiki/magic-wand.png….I then waved the magic wand and everything was fixed….

Advertisements
Tagged with:
Posted in Java, Programming

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: