Java Heap Size Error Message and Can't save log files

Hello, I am having the following fatal error, which I have not been able to fix. I am using Vassal 3.2.16, Battle for Normandy module 3_16, running Windows 7 on a Dell PC. This problem started suddenly a couple of months ago, and the same computer and versions of all the same programs all worked normally before. I have reloaded both Java and Vassal several times, reverted to an older version of Java, changed many memory settings in many places for both Java and the game module, all to no avail. To be specific, here is what happens:

Vassal starts and opens normally, no error message.

Then I try to open the Battle for Normandy module, and this error message always appears:

“Maximum Heap Size Too Large: The maximum heap size stored in your Preferences for this module is too large. In particular, the maximum heap size must be less than the amount of physical RAM in your machine. The failsafe initial heap size of 128MB will be used instead. Please decrease the maximum heap size in your Preferences, and restart VASSAL.”

Note that this error message is NOT true. My computer has 8 GB of memory. It is a PC, running Windows 7. I have also adjusted (increased) all of the default memory settings within both Java and Windows.

When I click on OK within the error message box, the module then loads and seems to run normally. But when I try to end a log file or quit, another error message says “Out of Memory: VASSAL has run out of memory. This module requires more memory than the maximum heap size you have set for it. Please increase the maximum heap size in your Preferences, and restart VASSAL.” And then I have to use the Task Manager to force the module to quit. It won’t quit on its own, and no log file or saved game file is ever saved.

Also note that these two error messages are incompatible, and contradict each other.

This is clearly a problem between Java and the Battle for Normandy module, and not anything having to do with a log file, since the first error message appears right after selecting the module, long before any saved game file or log file is selected or loaded.

I have performed clean installations of both Java and the Battle for Normandy module, wich has not made any difference. I have tried many different combinations of memory settings in the preferences for the module, and the default memory settings within Java. Nothing makes any difference. The same error messages always come up.

This did not used to happen, and it does not happen on my opponent’s PC, or on my Mac.

I have done everything I can think of that is practical for me - I am not a programmer, and do not have a code editor or compiler on my machine. I can adjust memory settings and change things within existing dialog boxes, but can’t write scripts or code.

Any ideas or suggestions you can make will be most welcome.

Ed Rains

Thus spake Edrains via messages:

Hello, I am having the following fatal error, which I have not been able
to fix. I am using Vassal 3.2.16, Battle for Normandy module 3_16,
running Windows 7 on a Dell PC. This problem started suddenly a couple
of months ago, and the same computer and versions of all the same
programs all worked normally before. I have reloaded both Java and
Vassal several times, reverted to an older version of Java, changed many
memory settings in many places for both Java and the game module, all to
no avail. To be specific, here is what happens:

Vassal starts and opens normally, no error message.

Then I try to open the Battle for Normandy module, and this error
message always appears:

“Maximum Heap Size Too Large: The maximum heap size stored in your
Preferences for this module is too large. In particular, the maximum
heap size must be less than the amount of physical RAM in your machine.
The failsafe initial heap size of 128MB will be used instead. Please
decrease the maximum heap size in your Preferences, and restart
VASSAL.”

Note that this error message is NOT true. My computer has 8 GB of
memory. It is a PC, running Windows 7. I have also adjusted
(increased) all of the default memory settings within both Java and
Windows.

Check the contents of the preferences file for the module in question.
On Windows, you’ll find that under %APPDATA%\VASSAL\prefs. There
should be a line with “maximumHeap=” on it. Post that line here.

When I click on OK within the error message box, the module then loads
and seems to run normally. But when I try to end a log file or quit,
another error message says “Out of Memory: VASSAL has run out of
memory. This module requires more memory than the maximum heap size you
have set for it. Please increase the maximum heap size in your
Preferences, and restart VASSAL.” And then I have to use the Task
Manager to force the module to quit. It won’t quit on its own, and no
log file or saved game file is ever saved.

Also note that these two error messages are incompatible, and contradict
each other.

They don’t. You’re getting the second error message because the module
was actually loaded with a max heap of 128MB, as suggested by the first
error message.


J.


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

Here it is:

#Wed Apr 26 10:41:20 CDT 2017
BoundsOfAirborne\ Breakdown=180,180,0,0
initialHeap=512
BoundsOfAllied\ Naval\ Support=150,150,0,0
maximumHeap=1024

What should I do next?

Ed

Thus spake Edrains via messages:

Here it is:

#Wed Apr 26 10:41:20 CDT 2017
BoundsOfAirborne\ Breakdown=180,180,0,0
initialHeap=512
BoundsOfAllied\ Naval\ Support=150,150,0,0
maximumHeap=1024

What should I do next?

Ed

1024 is a smaller value than I was expecting given that you said that
you have 8GB RAM—but it’s still quite possible that you could fail
to have 1GB of contiguous RAM. Java requires that its heap be
contiguous.

The simplest thing to do now is to delete that file before the next
time you try to load the module.


J.

That was it!!! I am deeply, deeply in your debt, sir!!!

Ed Rains

Okay, now the problem has recurred. Same maximum heap size message, and same problem (can’t save log files). I was trying to copy everything over to a thumb drive to be portable (the way I always used to and normally need to play, I just run it off the thumb drive) and everything got screwed up again. I did what I did before, deleted the prefs file, and now I’m back to where I started from. Min heap still set to 512, Max to 1024.

Sorry to be such a pain, I really need this to run as stand-alone off a thumb drive. What we did before was off the main CPU, it worked twice, and now even that doesn’t work again.

:cry:

Ed Rains

Thus spake Edrains via messages:

Okay, now the problem has recurred. Same maximum heap size message, and
same problem (can’t save log files). I was trying to copy everything
over to a thumb drive to be portable (the way I always used to and
normally need to play, I just run it off the thumb drive) and everything
got screwed up again. I did what I did before, deleted the prefs file,
and now I’m back to where I started from. Min heap still set to 512,
Max to 1024.

Sorry to be such a pain, I really need this to run as stand-alone off a
thumb drive. What we did before was off the main CPU, it worked twice,
and now even that doesn’t work again.

Did you get a max heap of 1024 again by setting it yourself?


J.

Here’s what I did:

Uninstalled Vassal off the hard drive, deleted the old prefs file from C:\Documents and Settings\grains\AppData\Roaming\VASSAL\prefs (which the uninstaller did not remove)

Ran vassal from the thumb drive, verifying that the prefs were set to min heap 512, max heap 1024

Loaded BfN module, got the same old java error message 128 MB blah blah blah

checked prefs file in C:\Documents and Settings\grains\AppData\Roaming\VASSAL\prefs,

and it says: #Fri Apr 28 08:11:35 CDT 2017
initialHeap=256
maximumHeap=512

I deleted that file, quit Vassal, and restarted Vassal. Verified that the prefs from the Vassal pulldown menu still says initial 512, Max 1024. Then loaded BfN module, same old Java memory error message comes up. The new prefs file at above location still reads initial 256, max 512 (as above). How can I get a new prefs file into the App Data folder that shows initial 512, Max 1024?

I know we’re getting close here, since you got it to work for me yesterday. Now all I need to do is get it to run off the thumb drive.

Thank you in advance for all your help with this!!

Ed Rains