This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gingervitis
Gingervitis wrote ...

2013/2/9

Java heap space

Gingervitis Gingervitis

2013/2/9

#
I got the message Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space is there a way to add space?
danpost danpost

2013/2/9

#
You might have an infinite loop in your code; or you may have some code out of place. Do you have any idea what it is trying to do when the message first appears?
Gingervitis Gingervitis

2013/2/9

#
I was having a lot of actors apear on the screen at one time. When I shortened the amount spawning, it was fine. But I do have 17 worlds, and 82 classes. Can that effect anything going forward? I am still going to continue to add more worlds and classes.
danpost danpost

2013/2/9

#
If you have many classes that have basically the same code, you could combine them and use a field to differentiate between the construction details (which mainly means the image used for that actor). The only reason I might suggest something like this is because there was an earlier discussion thread that mentioned something about a possible limit to the number of classes allowed (somewhere around 120 or so).
Gingervitis Gingervitis

2013/2/9

#
That might be hard to do because a lot of my classes do different things. i don't even know how to about combining all those classes. When I reaches the maximum number of classes allowed, I could just make a sequel....
You need to login to post a reply.