Skip to content

[GREENFOOT-200] java.lang.OutOfMemoryError: Java heap space

Hitting the "compile" or "reset" Button throws the konsole up with this output:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

Hints:

  1. The error is caused by the big background image (2500x1900px).
  2. only by setting the background image in the worldclass AND choosing the same image by right-clicking "setImage", this heap overflow crahing can be reproduced.

I've attached an test project (oh, file is too large).

You can download it from http://www.greenfoot-center.de/download/greenfooterror/HeapOverflow_Textcase.zip


Issue metadata

  • Issue type: Bug
  • Priority: Medium
  • Fix versions: 2.0