Test builds for 3.3.0

I’ve been working off and on for a while now to update VASSAL 3.2 for use with Java 9 or later. That was surprisingly complicated, because:

  • All of the audio classes we used were removed in Java 9.

  • Java 9 uses a “modular” system, which has the effect of hiding a few JDK internal classes which we use to work around bugs in the JDK which still exist in Java 9 and later.

  • There is no longer a separate JRE from Java 9 onwards, and due to changes on java.com automatic downloading of an older JRE had stopped working.

  • The com.apple.eawt classes we use for handling certain parts of the GUI on Macs also no longer exist in recent versions of OS X.

Here’s what I’ve done:

  • Our audio classes now use a different audio API in the JDK.

  • Our Mac-specific GUI code now uses java.awt.Desktop, which is the replacement for the old com.apple.eawt classes.

  • The build and run scripts are adjusted to deal with Java 9 modularity.

  • The Windows build now has a stripped-down version of Java 13 bundled with it. This lets us avoid dealing with installing Java separately at all. (There was no good way of doing this prior to Java 9, as even a full JRE was quite large, but Java 9 and later provide some tools for producing a bundle containing just the bits of Java you need for your application.) Note that the Windows bundle is 64-bit only now. If you’re still running 32-bit Windows, you’ll need to install Java and run VASSAL from the .zip bundle.

  • I also took this opportunity to update our dependencies. A few of our dependencies are gone: xalan, xml-apis, xerxes, swing-layout, swing-worker, and BrowserLauncher all provided things which Java 9 provides now. The rest have been updated to their current versions.

  • Java 9 is now a minimum requirement.

As this is turned out to be a significant batch of changes, I thought it made sense to call the next release 3.3.0 rather than 3.2.18.

Test builds may be found here:

vassalengine.sourceforge.net/builds/

Please give the most recent test build for 3.3.0 a try and let us know what problems you find.

I found a problem with a specific module. I’m not sure what’s different, as this doesn’t report an error in 3.2.17, but the classes in the stacktrace haven’t changed a lot either. I’ve trimmed the rest of the stacktrace as it’s all java.desktop/awt stuff for painting:

java.lang.NullPointerException: null
at java.desktop/java.awt.Point.(Point.java:82)
at VASSAL.build.module.Map.componentCoordinates(Map.java:972)
at VASSAL.build.module.map.StackMetrics.draw(StackMetrics.java:330)
at VASSAL.build.module.Map.drawPiecesInRegion(Map.java:1511)
at VASSAL.build.module.Map.paintRegion(Map.java:1479)
at VASSAL.build.module.Map.paintRegion(Map.java:1472)
at VASSAL.build.module.Map$View.paint(Map.java:2597)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:908)

The failure occurs when loading a map for a new game. The module main map uses a couple of “card” decks that aren’t really cards at all (just card bjects with no images attached, used to spawn some map templates when a player clicks a button). I’m mentioning that because I think it may be related to the problem, but I haven’t tried to actively debug it at all and may be way off.

Module Path_of_Glory_9.0.vmod
Tried to load a vlog file.
Map area is black then bug occur
I find the same error messages as in the preceding post from Malnorma

Trying out 3.3.0-svn9280

Mostly seems fine, but the only module I have with sound is an early version of the v4 Commands & Colors Ancients module. (I’ve largely stuck 3.2 because of the sound.)

When trying to open a scenario in that, I got:
2019-10-18 13:38:50,509 [0-main] INFO VASSAL.launch.StartUp - Starting
2019-10-18 13:38:50,520 [0-main] INFO VASSAL.launch.StartUp - OS Windows 7 6.1
2019-10-18 13:38:50,521 [0-main] INFO VASSAL.launch.StartUp - Java version 13
2019-10-18 13:38:50,521 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.3.0-svn9280
2019-10-18 13:38:50,718 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2019-10-18 13:39:06,534 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file D:\Games\VASSAL\F&E\F&E 2.1.vmod
2019-10-18 13:39:16,019 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2019-10-18 13:39:16,058 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2019-10-18 13:39:16,113 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2019-10-18 13:39:16,116 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module Federation & Empire
2019-10-18 13:39:16,161 [0-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.3.0-svn9280\jre\bin\java -Xms256M -Xmx4096M -DVASSAL.id=1 -DVASSAL.port=61286 -Duser.home=C:\Users\James -Duser.dir=C:\Program Files\VASSAL-3.3.0-svn9280 -cp lib\Vengine.jar VASSAL.launch.Player --load – D:\Games\VASSAL\F&E\F&E 2.1.vmod
2019-10-18 13:39:16,957 [1-main] INFO VASSAL.launch.StartUp - Starting
2019-10-18 13:39:16,962 [1-main] INFO VASSAL.launch.StartUp - OS Windows 7 6.1
2019-10-18 13:39:16,962 [1-main] INFO VASSAL.launch.StartUp - Java version 13
2019-10-18 13:39:16,963 [1-main] INFO VASSAL.launch.StartUp - VASSAL version 3.3.0-svn9280
2019-10-18 13:39:16,963 [1-main] INFO VASSAL.launch.Launcher - Player
2019-10-18 13:39:18,070 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - VASSAL images folder found at jar:file:/C:/Program%20Files/VASSAL-3.3.0-svn9280/lib/Vengine.jar!/images/
2019-10-18 13:39:18,072 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL created for VASSAL.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL-jabber created for VASSAL-jabber.png
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-idle created for network-idle.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family yes created for yes.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-down created for go-down.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family bug created for bug.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family no created for no.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family calculator created for calculator.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family jabber created for jabber.png
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-up created for go-up.svg
2019-10-18 13:39:18,073 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-server created for network-server.svg
2019-10-18 13:39:20,213 [1-AWT-EventQueue-0] WARN VASSAL.launch.BasicModule - Federation & Empire version 2.1
2019-10-18 13:39:20,240 [1-AWT-EventQueue-0] INFO VASSAL.build.module.ExtensionsLoader - Loading extension D:\Games\VASSAL\F&E\F&E 2.1_ext\Auxilliary 2.0.mdx
2019-10-18 13:39:20,278 [1-AWT-EventQueue-0] INFO VASSAL.build.module.ExtensionsLoader - Extension Auxilliary 2.0 v2.0.1 loaded
2019-10-18 13:39:20,278 [1-AWT-EventQueue-0] INFO VASSAL.build.module.ExtensionsLoader - Loading extension D:\Games\VASSAL\F&E\F&E 2.1_ext\Extra 2.0.mdx
2019-10-18 13:39:20,296 [1-AWT-EventQueue-0] INFO VASSAL.build.module.ExtensionsLoader - Extension Extra 2.0 v2.0.1 loaded
2019-10-18 13:39:29,905 [1-AWT-EventQueue-0] INFO VASSAL.build.module.GameState - Loading save game D:\Games\VASSAL\F&E\Konya Wa Hurricane\KWH T19-1 - P2-01.vlog, created with module version 2.1
2019-10-18 13:41:29,948 [1-AWT-EventQueue-0] INFO VASSAL.build.GameModule - Exiting
2019-10-18 13:41:30,549 [0-IPC receiver for 24294253] ERROR VASSAL.tools.ipc.IPCMessageReceiver -
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.read(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl$1.read(Unknown Source)
at java.base/java.net.Socket$SocketInputStream.read(Unknown Source)
at java.base/java.net.Socket$SocketInputStream.read(Unknown Source)
at java.base/java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
at VASSAL.tools.ipc.IPCMessageReceiver.run(IPCMessageReceiver.java:35)
at java.base/java.lang.Thread.run(Unknown Source)
2019-10-18 13:41:36,025 [0-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.AbstractLaunchAction - Loading module file D:\Games\VASSAL\CCA\CCAncientsV4.vmod
2019-10-18 13:41:37,916 [0-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.TilingHandler - No images to tile.
2019-10-18 13:41:37,918 [0-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.AbstractLaunchAction - Loading module Commands & Colors Ancients
2019-10-18 13:41:37,933 [0-SwingWorker-pool-2-thread-2] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.3.0-svn9280\jre\bin\java -Xms256M -Xmx512M -DVASSAL.id=5 -DVASSAL.port=61298 -Duser.home=C:\Users\James -Duser.dir=C:\Program Files\VASSAL-3.3.0-svn9280 -cp lib\Vengine.jar VASSAL.launch.Player --load – D:\Games\VASSAL\CCA\CCAncientsV4.vmod
2019-10-18 13:41:39,603 [5-main] INFO VASSAL.launch.StartUp - Starting
2019-10-18 13:41:39,608 [5-main] INFO VASSAL.launch.StartUp - OS Windows 7 6.1
2019-10-18 13:41:39,609 [5-main] INFO VASSAL.launch.StartUp - Java version 13
2019-10-18 13:41:39,609 [5-main] INFO VASSAL.launch.StartUp - VASSAL version 3.3.0-svn9280
2019-10-18 13:41:39,609 [5-main] INFO VASSAL.launch.Launcher - Player
2019-10-18 13:41:40,574 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - VASSAL images folder found at jar:file:/C:/Program%20Files/VASSAL-3.3.0-svn9280/lib/Vengine.jar!/images/
2019-10-18 13:41:40,576 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL created for VASSAL.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL-jabber created for VASSAL-jabber.png
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-idle created for network-idle.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family yes created for yes.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-down created for go-down.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family bug created for bug.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family no created for no.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family calculator created for calculator.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family jabber created for jabber.png
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-up created for go-up.svg
2019-10-18 13:41:40,577 [5-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-server created for network-server.svg
2019-10-18 13:41:41,614 [5-AWT-EventQueue-0] WARN VASSAL.launch.BasicModule - Commands & Colors Ancients version 4.0
2019-10-18 13:41:56,279 [5-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog -
java.lang.NullPointerException: null
at java.desktop/java.awt.Point.(Unknown Source)
at VASSAL.build.module.Map.componentCoordinates(Map.java:972)
at VASSAL.build.module.map.StackMetrics.draw(StackMetrics.java:330)
at VASSAL.build.module.Map.drawPiecesInRegion(Map.java:1511)
at VASSAL.build.module.Map.paintRegion(Map.java:1479)
at VASSAL.build.module.Map.paintRegion(Map.java:1472)
at VASSAL.build.module.Map$View.paint(Map.java:2597)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JViewport.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JSplitPane.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
at java.desktop/javax.swing.JComponent.paint(Unknown Source)
at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.desktop/java.awt.Container.paint(Unknown Source)
at java.desktop/java.awt.Window.paint(Unknown Source)
at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Probably a result of the build version having the -svnXXXX tag, but I tried to make a simple module to see if I could make the bare minimum that would fail, and the test build will not load modules created by itself. You can create a new module, but once you save and try to re-open the module, it won’t do it because the versions “don’t match” (it reports the same version string twice in the error).

Joel,
I am playing an OCS Tunisia II game with 3.3.0.
One general remark, as I noticed that with other modules I opened yesterday, is that the game menu icons and the game board itself are displayed at a much higher “zoom” (not sure it is the right term here) than 3.2.17.
So for the same zoom level in the game, the hexes and counters look bigger, but also you see more the individual pixels of the images.

You notice that straight away by looking at the hex lines that look more jagged in 3.3.0.

I do not know if that change in resolution from 3.2.17 is voluntary, but it seems to have negative an impact (in my opinion) on the look of the game. On the other hand, the Vassal control box (where all available modules are listed) is also bigger, and that is a good point.

Hope this helps,
Claudio

On the null reference error, I believe I’ve found an explanation. It happens when the max visible size of the Deck is less than the total number of cards in it, because the return value of StackMetrics.getContents is ignored, but it has not populated the entire positions array. This patch avoids the issue (but there may be a better fix, I do not know the project that well):

Index: src/VASSAL/build/module/map/StackMetrics.java
===================================================================
--- src/VASSAL/build/module/map/StackMetrics.java	(revision 9280)
+++ src/VASSAL/build/module/map/StackMetrics.java	(working copy)
@@ -320,7 +320,7 @@
     Rectangle region = visibleRect == null ? null : map.mapRectangle(visibleRect);
     Point[] positions = new Point[stack.getPieceCount()];
     Rectangle[] bounds = region == null ? null : new Rectangle[stack.getPieceCount()];
-    getContents(stack, positions, null, bounds, mapLocation.x, mapLocation.y);
+    int limit = getContents(stack, positions, null, bounds, mapLocation.x, mapLocation.y);
 
     for (PieceIterator e = new PieceIterator(stack.getPiecesIterator(),
                                              unselectedVisible);
@@ -327,6 +327,7 @@
          e.hasMoreElements();) {
       GamePiece next = e.nextPiece();
       int index = stack.indexOf(next);
+      if (index >= limit) continue;
       Point pt = map.componentCoordinates(positions[index]);
       if (bounds == null || isVisible(region, bounds[index])) {
         if (stack.isExpanded() || !e.hasMoreElements()) {

Those of you who had the NullPointerException, please try 3.3.0-svn9280 to see if it still occurs. (I made a one-line change to Map.java as cleanup, but accidentally changed how Decks are handled.)

I can’t replicate this. Can you post screenshots of both?

My original report was while using svn9280. Since your cleanup change was in rev 9258, I tried svn9251, but the same error occurred. I’ve attached a module for you that crashes, and one that doesn’t. The only difference is a third card added to the deck. That deck has its visible size limited to 2.

I haven’t been able to reproduce the problem on Linux. Does it still happen for you with svn9284?

9284 on macOS seems to have a problem with the embedded JRE and launching the Player from the module manager. Instead I tested by running the command line from the log (adding --standalone), and then by updating the shell script to run with the system JRE instead. Both methods showed no null reference failure for my Crash module, so that’s good news.

When launching the module from the manager, it reports a socket error with this trace:

java.util.concurrent.ExecutionException: java.io.IOException: Cannot run program "/Applications/VASSAL.app/Contents/MacOS/jre/bin/java": error=2, No such file or directory
	at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.get(Unknown Source)
	at VASSAL.launch.AbstractLaunchAction$LaunchTask.done(AbstractLaunchAction.java:604)
	at VASSAL.launch.Player$LaunchAction$1.done(Player.java:188)
	at java.desktop/javax.swing.SwingWorker$5.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at java.desktop/sun.swing.AccumulativeRunnable.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: Cannot run program "/Applications/VASSAL.app/Contents/MacOS/jre/bin/java": error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(Unknown Source)
	at java.base/java.lang.ProcessBuilder.start(Unknown Source)
	at VASSAL.tools.io.ProcessLauncher.launch(ProcessLauncher.java:111)
	at VASSAL.tools.io.ProcessLauncher.launch(ProcessLauncher.java:87)
	at VASSAL.tools.io.ProcessLauncher.launch(ProcessLauncher.java:65)
	at VASSAL.launch.AbstractLaunchAction$LaunchTask.doInBackground(AbstractLaunchAction.java:489)
	at VASSAL.launch.AbstractLaunchAction$LaunchTask.doInBackground(AbstractLaunchAction.java:244)
	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
	at java.base/java.lang.ProcessImpl.start(Unknown Source)

The path to bin/java (as logged) does exist and is executable (after all, it runs the manager). I’m not entirely sure what this is about.

Thus spake Malnorma:

When launching the module from the manager, it reports a socket error
with this trace:

I cannot see a reason why this should happen—as you say, the Manager
would not start if that path did not exist or was not executable.

I’m not sure how to proceed from here.


J.

Possibly the embedding of the JRE will need to be reversed. It’s a shame, because not having to deal with dozens of different JRE versions would be better. Roll on, Vassal 4.

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 had no problems when using that instead of the embedded JRE (providing java appears in the security and privacy exception list).

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.