Changing heap size outside of module?

Computer - Alienware Aurora R4
Operating system - Windows 10
Bios - A11
CPU
Manufacturer Intel(R) Core™ i7-3820 CPU @ 3.60GHz
Clock Speed 3.6Ghz
L2 Cache Size 1024
Memory 32 Gigabytes
Video card - NVidea GTX GEForce 6900
Vassal version 3.2.17
Java version 1.8.0_131-b11

Module - I’m a playtester for a boardgame upgrade, unfortunately I apologize that I cannot give out the Vassal module as proprietary, I’m hoping you can help me anyway since the problem appears to be generic.

I have vassal versions of this game that are published. I also have other Vassal games. They all load fine.

I loaded this module, and it was very slow. I got a message to go into preferences and increase the maximum heap size. I did that, it loaded Ok, but it was still slow.

I once again increased the maximum heap size within the module. I can still load all of my other modules, but I get an error message saying that the maximum heap size is too large. It says it will load with 128 MB of heep. However, I then get an error message saying it is out of memory; 128 is not enough for the module to work.

I go into the general Vassal module: I go to File, preferences. Under the importer tab, I try changing the Vassal setting, but it still says it is set too high even when I set it to 1024. I changed the heep sizes in other Vassal modules that do load, that doesn’t help.

I deleted the module from the Vassal line up and reloaded it. That didn’t help.

So I’m caught in a catch 22. I cannot load the module to change the heap size, and I can’t seem to change the heap size without loading the module.

I even contacted the module designer and he couldn’t help (he had me change the preferences in the Vassal screen, but I think I overrode that for this module when I typed in too high a number.)

Is there somewhere, a file, that stores this preference information for the module(s) that I can edit the maximum heap size without loading the module? Should I delete my Vassal entirely and try to reload it and then reload everything; I have to admit I’m not even sure that will work? Right now I can’t play test the game and I’m worried.

I’m hoping that Vassal has some sort of fail-safe for this?

Thanks for any help

Bruce

Thus spake Breunor:

I loaded this module, and it was very slow. I got a message to go into
preferences and increase the maximum heap size. I did that, it loaded
Ok, but it was still slow.

I once again increased the maximum heap size within the module. I can
still load all of my other modules, but I get an error message saying
that the maximum heap size is too large. It says it will load with 128
MB of heep. However, I then get an error message saying it is out of
memory; 128 is not enough for the module to work.

To what did you incease the max heap size?

I go into the general Vassal module: I go to File, preferences. Under
the importer tab, I try changing the Vassal setting, but it still says
it is set too high even when I set it to 1024. I changed the heep sizes
in other Vassal modules that do load, that doesn’t help.

The Importer Tab is irrelevant for loading modules. The Importer is
for converting modules in foreign formats to VASSAL’s format. It
is NOT for loading VASSAL modules.

I deleted the module from the Vassal line up and reloaded it. That
didn’t help.

This wouldn’t, as it doesn’t remove the preferences file for the
module.

Is there somewhere, a file, that stores this preference information for
the module(s) that I can edit the maximum heap size without loading the
module? Should I delete my Vassal entirely and try to reload it and
then reload everything; I have to admit I’m not even sure that will
work? Right now I can’t play test the game and I’m worried.

I’m hoping that Vassal has some sort of fail-safe for this?

What you’re seeing is the fail-safe. You can still modify the
max heap size in the Preferences even if the module fails to load
due to running out of memory.

Try that. If that doesn’t work, I can tell you where the preferences
file for the module is, which you could edit directly.


J.

Thanks for your help Uckelman!

You asked:

To what did you increase the max heap size?

Breunor - I have to admit i don’t remember. It was a large number of some sort.

The Importer Tab is irrelevant for loading modules. The Importer is
for converting modules in foreign formats to VASSAL’s format. It
is NOT for loading VASSAL modules.

Breunor - Yes, I got that, but I was desperate and hoped it would work. The error message was clear the problem was the heap in the module; it is clear that the problem was that I changed it.

This wouldn’t, as it doesn’t remove the preferences file for the
module.

Breunor - I got that too!

What you’re seeing is the fail-safe. You can still modify the
max heap size in the Preferences even if the module fails to load
due to running out of memory.

Breunor - I guess this is the key step I’m missing, I can’t figure out how to do that (modify the
max heap size in the Preferences even if the module fails to load). From the Vassal menu I can’t change the preferences for the module. But I can’t get into the module to see a place where I can change the preferences.

Try that. If that doesn’t work, I can tell you where the preferences
file for the module is, which you could edit directly.

Breunor - It looks like I need a little help in figuring out how to do that. If there is something else I can do, I clearly would greatly appreciate any help in understanding how to do it. Otherwise yes I would want to edit the preferences file directly. I’ll do whatever you say is best at this point.

Once again, thanks for taking the time to help me!

Breunor

Thus spake Breunor:

Breunor - It looks like I need a little help in figuring out how to do
that. If there is something else I can do, I clearly would greatly
appreciate any help in understanding how to do it. Otherwise yes I
would want to edit the preferences file directly. I’ll do whatever you
say is best at this point.

Once again, thanks for taking the time to help me!

Look here:

vassalengine.org/wiki/Error_Logs

In the same directory as the errorLog, you will find a prefs directory.
In that, there will be a file with the same name as you module. That
file will contain key-value pairs, one of which will have ‘maximumHeap’
as its key. Edit the value there, and try loading the module.

I’d like to know what value you find there when you look. I’d try
something like 512 to start with. (The value is in megabytes.)


J.

That worked!! You are wonderful!!

Thank you so much!!

Thus spake Breunor:

That worked!! You are wonderful!!

Thank you so much!!

So, what did you have the max heap set to?


J.

I had it set at 64000. My memory is 32000. The error message said that the maximum heap was larger than my memory which apparently caused the problem.

Thanks again!

Thus spake Breunor:

I had it set at 64000. My memory is 32000. The error message said that
the maximum heap was larger than my memory which apparently caused the
problem.

The value for max heap is in megabytes. So 64000 means 64000MB, which
is 62.5GB. You said above that you have 32GB RAM. You don’t want your
max heap to exceed the amount of RAM you have. There are only a few
modules for which you should set the max heap above 1024MB, and I’ve
never encountered one which needs more than 1500MB.


J.