Solved: Compiler stops with message “Error occurred during initialization of VM; Could not reserve enough space for object heap”

We recently resolved a problem with RAB on a 32-bit system that I’ll share here in case it helps somebody else trying to run RAB on an older machine (this is an English version of the original Spanish post):

RAB worked fine until we tried to Build an App. Whenever we tried building apps, the process would always stop with an error message that said “Error occurred during initialization of VM; Could not reserve enough space for object heap”. It turns out that the 32-bit jvm can’t go over more than 1gb of max heap space. A thread on stackoverflow.com explains that heap space limit can be set using command-line or system environment variables. The simpler solution though, was that we realized that RAB provides a place to set that limit right in its interface : Tools > Settings… > Build Settings > Memory Use .

Once RAB was configured to use a max of 512M, we were able to compile applications on that machine.

(Maybe it would be good for the note in that dialogue box to recommend setting that value below 1gb on 32-bit systems.)

2 Likes

Thanks for the feedback.

1 Like