How to Run VASSAL on Android

Thank you for providing information on your system.

Android 8 is (Oreo) a little old (from 2017), which may be an issue. I guess you are using an older (Samsung) tablet. Perhaps it can be upgraded to a newer version of Android - possibly via a custom rom.

Again, thank you for providing the errorLog content.

So Java version 21.0.8 (OpenJDK) - great.

The error says that a zero-sized image dimensions was passed where it shouldn’t. This is probably the cause of the empty windows you see, but it is not necessarily the root cause.

This error says that Vassal (or more accurately the Java Virtual Machine) could not do a domain name look-up on the domain vassalengine.org. Is your device connected to the internet? Not that it should matter - Vassal should simply forfeit the attempt to look-up whether there’s a newer version available. There’s a bug in Vassal VASSAL.tools.version.LiveVersionInfo.getRelease in that it doesn’t specify that it may throw java.net.UnknownHostException and that exception isn’t handled higher up the chain.

Could you give the exact error? The scripts should not execute any xfce command but rather xfce4-session. You could try to use fluxbox instead by editing

~/.local/bin/xvassal

and replacing xfc4-vassal with fluxbox-vassal.

What I suspect is happening, is that Java is trying to measure the screen size and gets back width and height of 0, which is then passed to an image construction. This could be what causes the first error above. The second error comes from Vassal trying to be clever and check if there’s a newer version of Vassal and then instruct you to download that. However, when that look-up fails, it fails to catch the error and exit gracefully.

The question is then why does Java get 0x0 dimensions? Well, that could be because the window manager (XFCE) reports back a 0 size. So why would the window manager do that? That could be coming from the X server (tightvnc in your case), which gets a size wrong. And the X server may get this wrong because it is doing a call to the Android API which isn’t supported in Android 8.

Another possibility, is that the image that Java is trying to measure is corrupted or not there at all. As far as I can gather, it is the image /icons/48x48/bug.png which is the culprit. That image should live inside the Vassal jar archive.

So how to proceed.

  • Check that your device is connected to the internet and whether that makes a difference.
  • Try changing your window manager to fluxbox
  • Try another VNC client
  • Try with X again. Perhaps you need to re-run the xvassal-setup.sh script again if something got partially installed. In fact, you may want to run the entire procedure again. Note that log files are written, so you may want to check these for errors or the like too.
  • See if you can upgrade your device to a newer Android.

Other than those, I do not have any good ideas at the moment - sorry. The problem you are seeing, I believe, comes from some weird interaction between Java - VNC (window manager) - and Android Oreo.

Yours,
Christian

1 Like