Can't save log files error has recurred

Hi Joel, last week you helped me solve the 128 MB Java heap size error message. I got it to work twice, but now the problem has recurred. I’m getting the same Java memory error message as before, I can’t save log files, and Vassal won’t quit normally (have to force quit).

I’ve been doing what you told me to do last week, which worked last week. But now, I’m throwing away the old prefs file in the app data folder, but each time the same error message appears, and then a new prefs file is being created with an initial size of 256MB and a maximum of 512. I’m not sure where this is coming from, since my preferences in two places (vassal and the module) are set to 512/1024.

What am I missing?
Thanks in advance for any help or advice!
Ed Rains

Thus spake Edrains via messages:

Hi Joel, last week you helped me solve the 128 MB Java heap size error
message. I got it to work twice, but now the problem has recurred. I’m
getting the same Java memory error message as before, I can’t save log
files, and Vassal won’t quit normally (have to force quit).

I haven’t had time to reply since then, sorry.

I’ve been doing what you told me to do last week, which worked last
week. But now, I’m throwing away the old prefs file in the app data
folder, but each time the same error message appears, and then a new
prefs file is being created with an initial size of 256MB and a maximum
of 512. I’m not sure where this is coming from, since my preferences in
two places (vassal and the module) are set to 512/1024.

What am I missing?
Thanks in advance for any help or advice!
Ed Rains

I don’t quite understand what you’re doing. Are you setting the max
heap to 1024MB yourself? And at 1024MB max heap you’re sometimes failing
to load the module due to insufficient memory? Is this correct?


J.

Hi Joel, here is what happened:

It worked twice last week, after doing what you said in the other thread (I threw away the old prefs file in AppData folder).

Then, without my doing anything other than trying to start the BfN module normally, the same old problem appeared again this week: Vassal heap size too large error message, with effect of not being able to save log files.

So I did the following:

  1. Checked the prefs file at C/Documents and Settings/grains/AppData/Roaming/VASSAL/prefs, which said: initial heap 256, maximum heap 512
  2. I threw this prefs file away, and emptied the recycle bin
  3. I started Vassal.exe, which started normally. I checked the heap size settings window under File/Preferences, and it says initial heap 512, maximum heap 1024 (the program starts with those values already set, I didn’t have to change them).
  4. I started the Battle for Normandy module. The same old Java Maximum Heap Size Too Large error message appears. I click on yes to keep going. A new prefs file appears at C/Documents and Settings/grains/AppData/Roaming/VASSAL/prefs, which says initial heap = 256, maximum heap = 512.
  5. Then the Battle for Normandy game map screen comes up. I checked file/preferences from the pulldown menu, and it says the initial heap is set to 256, and the maximum to 512. I changed these to 512/1024. When I did this, the prefs file in the AppData folder also changed to 512/1024.
  6. Then I tried to quit the BfN module, and got a Vassal out of memory error message. I had to use the Task Manager to force quit the module. I left the Vassal engine running.
  7. The prefs file in the AppData folder still says 512/1024.
  8. I re-loaded the Battle for Normandy module, and get the same Java Maximum Heap Size Too Large error message. I clicked yes to continue.
  9. The prefs file in the AppData folder still says 512/1024. I started a test log file, and made a few simple entries. Then I tried to end the log file, and it won’t save, got the same out of memory error message. At this point the preferences in all three places are all set to 512/1024 (vassal initial window preferences, BfN module preferences, and prefs file in AppData folder). Can’t end the program normally, have to force quit.

???

As usual, I’m stumped. Any advice or help you can provide will be greatly appreciated!

Ed Rains

Thus spake Edrains via messages:

  1. I started Vassal.exe, which started normally. I checked the heap
    size settings window under File/Preferences, and it says initial heap
    512, maximum heap 1024 (the program starts with those values already
    set, I didn’t have to change them).

Is this what you see in the Importer tab under File > Preferences in
the Module Manager? The heap settings there are for importing modules
from other formats (like Aide de Camp 2), and have nothing to do with
the heap settings for opening paritcular modules.

  1. I started the Battle for Normandy module. The same old Java Maximum
    Heap Size Too Large error message appears. I click on yes to keep
    going. A new prefs file appears at C/Documents and
    Settings/grains/AppData/Roaming/VASSAL/prefs, which says initial heap =
    256, maximum heap = 512.

These are the defaults.

  1. Then the Battle for Normandy game map screen comes up. I checked
    file/preferences from the pulldown menu, and it says the initial heap is
    set to 256, and the maximum to 512. I changed these to 512/1024. When
    I did this, the prefs file in the AppData folder also changed to
    512/1024.
  2. Then I tried to quit the BfN module, and got a Vassal out of memory
    error message. I had to use the Task Manager to force quit the module.
    I left the Vassal engine running.
  3. The prefs file in the AppData folder still says 512/1024.
  4. I re-loaded the Battle for Normandy module, and get the same Java
    Maximum Heap Size Too Large error message. I clicked yes to continue.
  5. The prefs file in the AppData folder still says 512/1024. I started
    a test log file, and made a few simple entries. Then I tried to end the
    log file, and it won’t save, got the same out of memory error message.
    At this point the preferences in all three places are all set to
    512/1024 (vassal initial window preferences, BfN module preferences, and
    prefs file in AppData folder). Can’t end the program normally, have
    to force quit.

What we need from you to sort this out is a copy of your errorLog after
you’ve had the “Maximum Heap Size Too Large” error but before you’ve
done anything else. Post that here.

The error log will be in C:\Documents and Settings\grains\AppData\Roaming\VASSAL.


J.


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

Hi Joel, this is what is in the error log when the Maximum Heap Size Too Large error message appears on the screen (error message not closed yet, still on the screen);

2017-05-05 08:28:03,689 [0-main] INFO VASSAL.launch.StartUp - Starting
2017-05-05 08:28:03,692 [0-main] INFO VASSAL.launch.StartUp - OS Windows 7 6.1
2017-05-05 08:28:03,693 [0-main] INFO VASSAL.launch.StartUp - Java version 1.8.0_111
2017-05-05 08:28:03,693 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.16
2017-05-05 08:28:03,762 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2017-05-05 08:28:16,448 [0-SwingWorker-pool-26964746-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file E:\VASSAL\The Battle for Normandy 3_16.vmod
2017-05-05 08:28:17,211 [0-SwingWorker-pool-26964746-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2017-05-05 08:28:17,214 [0-SwingWorker-pool-26964746-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module The Battle for Normandy
2017-05-05 08:28:17,219 [0-SwingWorker-pool-26964746-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files (x86)\Java\jre1.8.0_111\bin\java -Xms512M -Xmx1024M -DVASSAL.id=1 -DVASSAL.port=52407 -Duser.home=C:\Users\grains -Duser.dir=E:\VASSAL -cp lib\Vengine.jar VASSAL.launch.Player --load – E:\VASSAL\The Battle for Normandy 3_16.vmod
2017-05-05 08:28:17,279 [0-SwingWorker-pool-26964746-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files (x86)\Java\jre1.8.0_111\bin\java -Xms64M -Xmx128M -DVASSAL.id=1 -DVASSAL.port=52407 -Duser.home=C:\Users\grains -Duser.dir=E:\VASSAL -cp lib\Vengine.jar VASSAL.launch.Player --load – E:\VASSAL\The Battle for Normandy 3_16.vmod
2017-05-05 08:28:17,883 [1-main] INFO VASSAL.launch.StartUp - Starting
2017-05-05 08:28:17,888 [1-main] INFO VASSAL.launch.StartUp - OS Windows 7 6.1
2017-05-05 08:28:17,888 [1-main] INFO VASSAL.launch.StartUp - Java version 1.8.0_111
2017-05-05 08:28:17,888 [1-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.16
2017-05-05 08:28:17,888 [1-main] INFO VASSAL.launch.Launcher - Player
2017-05-05 08:31:44,413 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - VASSAL images folder found at jar:file:/E:/VASSAL/lib/Vengine.jar!/images/
2017-05-05 08:31:44,417 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-server created for network-server.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-down created for go-down.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-idle created for network-idle.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL created for VASSAL.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family calculator created for calculator.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-up created for go-up.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL-jabber created for VASSAL-jabber.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family jabber created for jabber.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family bug created for bug.png
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family yes created for yes.svg
2017-05-05 08:31:44,418 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family no created for no.svg
2017-05-05 08:31:45,489 [1-AWT-EventQueue-0] WARN VASSAL.launch.BasicModule - The Battle for Normandy version 3.16

As a semi-knowledgeable person, it looks to me like the VASSAL ProcessLauncher is initiating Java twice - the first time with sufficient memory, and the second time with insufficient. What do you think?

I do have the following settings in place inside Java (the jre Runtime Environment Settings): -Xms512m. Doesn’t that set a minimum of 512 MB for Java to use? Why is it reverting to 64/128?

And is the whole startup sequence being duplicated twice?

This is over my head, for sure.

Thanks in advance!

Ed

Thus spake Edrains via messages:

2017-05-05 08:28:17,219 [0-SwingWorker-pool-26964746-thread-1] INFO
VASSAL.tools.io.ProcessLauncher - launching C:\Program Files
(x86)\Java\jre1.8.0_111\bin\java -Xms512M -Xmx1024M -DVASSAL.id=1
-DVASSAL.port=52407 -Duser.home=C:\Users\grains -Duser.dir=E:\VASSAL -cp
lib\Vengine.jar VASSAL.launch.Player --load – E:\VASSAL\The Battle for
Normandy 3_16.vmod
2017-05-05 08:28:17,279 [0-SwingWorker-pool-26964746-thread-1] INFO
VASSAL.tools.io.ProcessLauncher - launching C:\Program Files
(x86)\Java\jre1.8.0_111\bin\java -Xms64M -Xmx128M -DVASSAL.id=1
-DVASSAL.port=52407 -Duser.home=C:\Users\grains -Duser.dir=E:\VASSAL -cp
lib\Vengine.jar VASSAL.launch.Player --load – E:\VASSAL\The Battle for
Normandy 3_16.vmod

Here’s what’s happening:

The first line shows the module being opened with a max heap of 1024MB.
That fails, which is why the second line shows the module being
opened with the failsafe max heap of 128MB, which isn’t enough to use
this module properly.

I think what you’re seeing is that sometimes Java is able to claim
1024MB of contiguous memory, in which case the module opens successfully,
and sometimes it isn’t, in which case you get the result you saw above.

It’s the contiguous part here which is important. You probably do have
more than 1024MB free memory when you try to load the module, but
sometimes there isn’t a large enough contiguous chunk available.

Suggestions:

  1. Try setting the max heap a bit lower.

  2. Install more RAM.


J.

That was it! 512 / 768 works!

I am deeply, deeply in your debt, sir!!!

Ed Rains