JRuby Slick CanvasGameContainer using too much heap memory

Posted by Jwosty on Stack Overflow See other posts from Stack Overflow or by Jwosty
Published on 2012-06-01T16:37:41Z Indexed on 2012/06/01 16:40 UTC
Read the original article Hit count: 425

Filed under:
|
|
|
|

I'm using Java's Slick library (great, by the way) just fine from JRuby. To start a game, I use AppGameContainer which works completely fine and as expected, but if I try to use CanvasGameContainer instead (I want a resizable window and Slick uses an old version of LWJGL that doesn't support this directly) it throws this error:

Fri Jun 01 10:22:07 MDT 2012 INFO:Slick Build #274
Error: Your application used more stack memory than the safety cap of 2048K.
Specify -J-Xss####k to increase it (#### = cap size in KB).
Specify -w for full StackOverflowError stack trace

I've tried increasing the heap size until my computer can't allocate any more memory, but to no avail. The CanvasGameContainer uses an awt window to display, which is resizable. Any ideas on why this is happening and/or how to fix this?

© Stack Overflow or respective owner

Related posts about java

Related posts about memory-management