Test builds for 3.3.0

Thus spake Malnorma:

“uckelman” wrote:

The problem is not specific to launching java to kick off the tiling.
I set up a Catalina VM last night so I could try this myself. I found
that replacing the call to java with a shell script fails in the same
way, as does invoking /bin/bash directly. It seems like
java.lang.ProcessBuilder isn’t seeing the filesystem.

It may be an auto-sandboxing thing. Is it able to launch /usr/bin/java?

I don’t have a system Java installed on this VM.

Using the bundled Java, I get the same IOException with this trivial
program:

package VASSAL.test;

import java.lang.Process;
import java.lang.ProcessBuilder;

public class RunTest {
public static void main(String args) throws Exception {
final ProcessBuilder pb = new ProcessBuilder(“/bin/ls”);
pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);
final Process proc = pb.start();
proc.waitFor();
}
}

This has no problem listing the contents of the working directory
on Linux.

I had no problems when using that instead of the embedded JRE
(providing java appears in the security and privacy exception list).

Is there anywhere one can check if you’re running into sandboxing?
Are denials logged? The error message is rubbish if that’s what’s
happening.


J.

If I run the Module Manager from the app bundle, VASSAL shows up as not sandboxed in the Activity Monitor.

I found something - under jre/lib there is an executable called jspawnhelper, but it does not have execute permissions. When I chmod +x that, the problem is resolved.

I just found that very thing about an hour ago. It’s used by ProcessBuilder to handle some issues with forking. Aggravatingly, jlink strips the execute bits off that file when it produces a java bundle.

Try svn9285.

Yep, all sorted now.

Hello Joel,
I figured out why 3.3.0 seems to display everything with a kind of zoom.
I have setup my windows display properties to have a zoom of 125. (You can set that by right clicking on the desktop background and selecting Display Parameters (well in French it is “Paramètres d’Affichage”. That opens a Win 10 parameter screen where above the Display Resolution you have a Dropdown titled “Modify the size of Text, Applications and other elements” where I had set it to 125 just after installing Win 10.

THis 125% setting seems to be ignored by 3.2.17 whereas it is taken into account by 3.3.0.

So in fact it is not an issue, but a new way to react to that parameter. For the “Manager window” (where all the modules are listed) it is nice that this happens, but if it could be controlled in the code of Vassal, it would be better that the Game Maps do not react to this Windows setting, as the bitmap of the game does not seem to be magnified well by this.

Kr
Claudio

Joel, I am now trying to play all my ongoing games with the latest build.
Yesterday I opened the log of a Vietnam game and got the following module errors.

  • VG Vietnam version 4.3.4
  • Loading Claudio_vs_Petri_Vietnam_01236.vlog …
  • Bad Data in Module: Illegal date format 7/6/19 8:15 PM
  • Bad Data in Module: Illegal date format 7/24/18 12:24 PM
  • Bad Data in Module: Illegal date format 6/28/18 10:28 PM
  • Bad Data in Module: Illegal date format 6/26/18 9:42 PM
  • Bad Data in Module: Illegal date format 6/26/18 8:47 PM
  • Bad Data in Module: Illegal date format 5/31/18 10:50 PM
  • Bad Data in Module: Illegal date format 5/29/18 10:35 PM
  • Bad Data in Module: Illegal date format 5/29/18 8:54 PM
  • Bad Data in Module: Illegal date format 5/28/18 9:41 PM
  • Bad Data in Module: Illegal date format 5/28/18 7:06 PM
  • Bad Data in Module: Illegal date format 5/7/18 10:07 PM
  • Bad Data in Module: Illegal date format 5/7/18 7:51 AM
  • Bad Data in Module: Illegal date format 5/5/18 11:05 PM
  • Bad Data in Module: Illegal date format 5/4/18 10:28 PM
  • Bad Data in Module: Illegal date format 5/6/18 8:16 AM
  • Bad Data in Module: Illegal date format 5/6/18 6:43 PM
  • Bad Data in Module: Illegal date format 5/29/18 8:50 PM
  • Bad Data in Module: Illegal date format 5/29/18 8:59 PM
  • Bad Data in Module: Illegal date format 7/24/18 9:31 AM
  • Bad Data in Module: Illegal date format 7/24/18 10:37 PM
  • Bad Data in Module: Illegal date format 10/29/18 7:14 PM
  • Bad Data in Module: Illegal date format 11/4/18 9:35 PM
  • Bad Data in Module: Illegal date format 7/7/19 10:55 PM
  • Bad Data in Module: Illegal date format 10/4/19 10:27 PM
  • Loaded Claudio_vs_Petri_Vietnam_01236.vlog

The same module loads without problem in 3.2.17
I saw in some games in 3.1.17 “Bad Data” errors that come up the 1st time you load a module so I delete the module from the list of recent modules. Tried to do that in 3.1.17 but it did not occur.
I am in France and the french date format is more like DD/MM/YYYY. But my adversary might use
I tried to see into the vlog with Notepadd++if I could find a date that matches in palin text.

I create a new game in 3.2.17. Moved some counters, saved the logfile, then reopened it in 9287
The error does not appear.

No more ideas about how to identify the cuase of this error.
If you give me some indications, I might run further tests. Or send you the files themselves.
Used 9287

Kr
Claudio

Thus spake ClaudioC:

Joel, I am now trying to play all my ongoing games with the latest
build.
Yesterday I opened the log of a Vietnam game and got the following
module errors.

We’ve changed nothing in our own code which parses dates. This is
probably due to a change in Java between versions 6 and 13. I’ll need
a vlog file which triggers the error in order to troubleshoot the
problem.


J.

Joel, are you running on Windows 10? I have noticed the same problem on 3.3.3.

I think the issue is that never versions of the JDK honors the scaling of the operating system. The means the images used both in the user interface and on the map is scaled twice (once by Vassal, and once by the JVM honoring the scale setting in the operating system). This makes the images render blurred (with jagged lines).

One easy fix that worked for me is to set the scaling in Windows 10 to 100% (this might not be the best solution if you are running a very high resolution monitor) as it affects all applications. If you are running Windows 10, just right click on the desktop, and choose Screen Settings → Scaling & Layout.

I haven’t looked in to this yet, but I think you can disable operating system scaling on the JVM during startup, or at least disable it specifically on the Vassal application.

Hope this helps.

I did a bit more digging. Turns out you can disable the scaling subsystem in the JVM by setting the following system property on the JVM.

-Dsun.java2d.uiScale=1.0

I can’t test it, as I dont know how to set system properties on 3.3.3 beta distribution.

@Uckelman, if you can build a test distribution which sets the system property, i’ll be happy to help test it out.

Thus spake bolabola:

I did a bit more digging. Turns out you can disable the scaling
subsystem in the JVM by setting the following system property on the
JVM.

-Dsun.java2d.uiScale=1.0

Isn’t this going to make the UI elements too small in comparison with
everything else on the system?


J.

No, I don’t think so. It will simply revert the JVM back to working the way it did before HDPI support was added in Java 9.

For reference, the issue is known by the JRE developers, see here: bugs.openjdk.java.net/browse/JD … 22image%22

I think the reason you can’t reproduce the issue on your development setup must likely is that your have your operating system scaling set to 100%, which doesn’t cause any issues.

I’ll create a couple of screenshots, so you can see how the issue manifests itself.

I have added a couple of screenshots so you can see the issue.

As you can see, when I set my operating system scaling to 100%, everything looks fine, but on 150% scaling all images becomes blurred.

Thus spake bolabola:

I have added a couple of screenshots so you can see the issue.

As you can see, when I set my operating system scaling to 100%,
everything looks fine, but on 150% scaling all images becomes blurred.

I must not be grasping the problem here. It seems obvious to me if
you upscale the UI by 50%, it will become blurry. Why is that a bug
in VASSAL rather than an expected consequence of upscaling?


J.

It is not a bug in Vassal, it is a bug in the JDK image rendering engine. In JDK 9 HDPI monitor support was added. This scales the UI in the Java application according to the scaling settings in the operating system. This works fine for UI elements (button, labels, text), but causes issues with Image rendering.

No matter which zoom level I use in Vassal when having the scaling in the operating system set to anything other than 100%, images (map, counters, UI icons) gets blurred and jagged, because the Image / BufferedImage has a bug. Images are run through the image scaling transformation twice (once by the JDK, and once by the operation system (D3D), resulting in a blurred image).

Note that if I set my operating system scaling to 100%, and zoom to 150% in Vassal, maps and images still look very smooth.

As I wrote in my previous post, the issue is known to the JDK developers: bugs.openjdk.java.net/browse/JD … 22image%22

Most users (except users running on HDPI laptops) will have the operating system scaling set to 100%, and will not experience the issue at all.

I think the fix is relatively easy. If HDPI support is disabled by the system property (-Dsun.java2d.uiScale=1), Vassal will work exactly as it did on HDPI screen as it did before the upgrade to JDK 9.

I hope this makes it a bit clearer. If not, please let me know.

/Bo

Hello Joel, file is too big to attach. (forum limits me to 256kB). Can you send me your email so that I can send you the file? Or tell me how to proceed.
Kr
Claudio

Hello Joel,
I tried to make a change in a game module, and saved it to a new vmod file.
When I tried to open the module with 9287, I got this error

“The module you are trying to use (E:\Vassal\TLD\Tld-0.1.9.019.vmod) was created with VASSAL 3.3.0-svn9287. This version of VASSAL (3.3.0-svn9287) cannot edit or play modules which are that new.”

Kr
Claudio

"

Thus spake ClaudioC:

Hello Joel, file is too big to attach. (forum limits me to 256kB). Can
you send me your email so that I can send you the file? Or tell me how
to proceed.
Kr
Claudio

There’s a little icon with an envelope and an @ symbol under my avatar
to the right of my posts. That has a link with my email address. (Everyone
has one of those.)


J.

I don’t see that icon on anyone:

[attachment=0]Annotation 2019-11-04 090051.png[/attachment]