VASSAL 3.4.3 on Raspberry Pi

Operating system: Raspbian GNU/Linux 10 (buster)
Model: Raspberry Pi 4 Mode B, 1.5GHz 64-bit quad-core CPU
RAM: 4GB
Display is OK.
VASSAL 3.4.3
Java 11.0.9
FallingSky_v3.vmod

When I try to open a module, I get the following error log. I had been getting heap size warnings before. Now I cannot do anything with VASSAL.

The first error in the log is invalid maximum heap size…? I’m sure I am just being stupid. I just do not know.

Current settings:
JVM initial heap: 128MB
JVN maximum heap: 256MB

Jason

Error Log:

2020-11-11 14:28:47,861 [0-main] INFO VASSAL.launch.StartUp - Starting
2020-11-11 14:28:47,914 [0-main] INFO VASSAL.launch.StartUp - OS Linux 5.4.72-v7l+
2020-11-11 14:28:47,915 [0-main] INFO VASSAL.launch.StartUp - Java version 11.0.9
2020-11-11 14:28:47,916 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.4.3
2020-11-11 14:28:48,534 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2020-11-11 14:29:07,312 [0-SwingWorker-pool-1-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file /home/pi/Desktop/VASSAL-Modules/FallingSky_v3.vmod
2020-11-11 14:29:09,232 [0-SwingWorker-pool-1-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching /usr/lib/jvm/java-11-openjdk-armhf/bin/java -classpath /home/pi/Desktop/VASSAL-3.4.3/lib/Vengine.jar -Xmx0M -DVASSAL.id=2 -Duser.home=/home/pi -DVASSAL.port=36975 VASSAL.tools.image.tilecache.ZipFileImageTiler /home/pi/Desktop/VASSAL-Modules/FallingSky_v3.vmod /home/pi/.VASSAL/tiles/cde332b417e18906e8e248b6d3ac0eb9a5001a59 256 256
2020-11-11 14:29:09,268 [0-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - Invalid maximum heap size: -Xmx0M
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
2020-11-11 14:29:09,274 [0-ProcessLauncher-0] ERROR VASSAL.tools.io.ProcessCallable - Error while closing stream
java.io.IOException: Stream closed
at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:442)
at java.base/java.io.OutputStream.write(OutputStream.java:157)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at java.base/java.io.FilterOutputStream.close(FilterOutputStream.java:182)
at VASSAL.tools.io.ProcessCallable.closeCloseable(ProcessCallable.java:154)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at VASSAL.tools.io.ProcessCallable.closeStreams(ProcessCallable.java:145)
at VASSAL.tools.io.ProcessCallable.call(ProcessCallable.java:104)
at VASSAL.tools.io.ProcessCallable.call(ProcessCallable.java:40)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Thus spake JayRock1971:

The first error in the log is invalid maximum heap size…? I’m sure I
am just being stupid. I just do not know.

Please try the VASSAL-3.4.9-SNAPSHOT-847024810 test build:

vassalengine.org/~uckelman/tmp/

Once you’ve opened the Module Manager, post the first few lines of the
errorLog. There should be a line saying how many bytes of RAM Java is
reporting the system has.


J.

So say we all.

I’ll try that tomorrow.

Thank you,
Jason

To be clear, the test build won’t solve your problem. But that diagnostic information will help me solve your problem.

I figured. Thx.

J

2020-11-12 06:30:50,734 [0-main] INFO VASSAL.launch.StartUp - Starting
2020-11-12 06:30:50,787 [0-main] INFO VASSAL.launch.StartUp - OS Linux 5.4.72-v7l+
2020-11-12 06:30:50,788 [0-main] INFO VASSAL.launch.StartUp - Java version 11.0.9
2020-11-12 06:30:50,789 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.4.9-SNAPSHOT-847024810
2020-11-12 06:30:50,903 [0-main] INFO VASSAL.launch.StartUp - 0 bytes RAM
2020-11-12 06:30:51,796 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2020-11-12 06:31:57,323 [0-SwingWorker-pool-1-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file /home/pi/Desktop/VASSAL-3.4.9-SNAPSHOT-847024810/doc/tour.mod
2020-11-12 06:31:57,869 [0-SwingWorker-pool-1-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching /usr/lib/jvm/java-11-openjdk-armhf/bin/java -classpath /home/pi/Desktop/VASSAL-3.4.9-SNAPSHOT-847024810/lib/Vengine.jar -Xmx0M -DVASSAL.id=2 -Duser.home=/home/pi -DVASSAL.port=36579 VASSAL.tools.image.tilecache.ZipFileImageTiler /home/pi/Desktop/VASSAL-3.4.9-SNAPSHOT-847024810/doc/tour.mod /home/pi/.VASSAL/tiles/fabc96ea565c612b78e1fd47dcf965414160e42a 256 256
2020-11-12 06:31:57,913 [0-ProcessLauncher-2] WARN VASSAL.tools.logging.LoggedOutputStream - Invalid maximum heap size: -Xmx0M
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

0 bytes of RAM? odd, no?

J

total used free shared buff/cache available
Mem: 3919788 547540 2489176 251188 883072 2986936
Swap: 102396 0 102396

Here is the RAM on my Raspberry Pi.

I do not understand what is happening.

Jason

Thus spake JayRock1971:

total used free shared buff/cache
available
Mem: 3919788 547540 2489176 251188 883072
2986936
Swap: 102396 0 102396

Here is the RAM on my Raspberry Pi.

I do not understand what is happening.

Jason

I understand what’s happening. The facility Java provides for getting
the amount of physical RAM doesn’t work reliably across all types of
machines.

I’ll get you a test build with a workaround soon.


J.

Try VASSAL-3.4.9-SNAPSHOT-bug13616-854363da7:

vassalengine.org/~uckelman/t … ux.tar.bz2

Does that work?

So far, so good. I was able to load the tour. Would you like to see a copy of the error log (I do not know if that will help you with anything)? Thank you for your help. I’d ask you to explain what you did, but you would not be able to understand it for me, so…

Thank you,
Jason

No, I don’t need a copy of the errorLog again. The problem’s fixed, and the fix will be in the next release in a few days. Thanks for reporting the problem.

The entire change was one character, from

PHYS_MEMORY = physMemoryBytes < 0 ? 4096 : (int)(physMemoryBytes >> 20);

to

PHYS_MEMORY = physMemoryBytes <= 0 ? 4096 : (int)(physMemoryBytes >> 20);

Changing from < to <= kicks 0 into the “bogus” case, where we assume 4GB RAM because we can’t get an answer from Java.