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()) {
ClaudioC wrote: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
uckelman wrote: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.)
Malnorma wrote:uckelman wrote: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.)
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.
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)
uckelman wrote: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.
Users browsing this forum: No registered users and 2 guests