java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded

Hi, I ran MizBee on processing 2 and got the following error:

java.lang.RuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded
	at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
	at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
	at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
	at javax.media.opengl.Threading.invoke(Threading.java:191)
	at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)
	at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)
	at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)
	at processing.core.PApplet.run(PApplet.java:2256)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
	at MizBee$Genome.buildChromosomesGenesAndBlocks(MizBee.java:2700)
	at MizBee$Genome.<init>(MizBee.java:2416)
	at MizBee.setup(MizBee.java:92)
	at processing.core.PApplet.handleDraw(PApplet.java:2361)
	at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)
	at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)
	at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)
	at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)
	at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

How is it possible to fix it?

Thank you in advance,

Michal

1 Like

Hey Michal, the problem is that the Java process is running out of memory when you try running that example. To increase the memory (this is called the Java “heap”) you can open up Processing, go to Preferences, and enter a new value for “Increase maximum memory available to ____ MB”. The default is 256MB which is tiny, you could probably increase the heap to 2048 or 4096MB (2GB or 4GB) and not suffer any ill effects. Make sure the box is checked too.

See the attached image–

2 Likes