Possible 3.6.7 bug

Posted to World in Flames Facebook site.
There seems to be some kind of bug with 3.6.7. When we load the module with version 3.17 vassal just draws memory and CPU until the PC crashes.
Sorry cannot provide any other info. I did ask the author to advise you guys, but I do not see a post from him.
BTW, my response was - send stuff to you. No use asking me.

That’s not enough information for us to take action, sorry.

Yep, know that. Trying to get a copy of the error log. But that would be unlikely as it seems to reset every new day. Something to keep an eye on though.

Confirmed by me. Vassal enters into ‘infinite loop’ mode. How can a text label go into an infinite loop? RAM usage is up to 5.9GB ATM. I’ve some screen shots. Shutting Vassal down via Task Manager.
I then did exactly the same things using Vassal 3.6.6. Not one issue.
Screen shot Pics attached (hopefully). Vassal 1 thru 7 are from the 3.6.7 attempt (spread over 10 minutes. Vassal 1a & 2a (the last 2) are 23 secs apart.









Which module is it? Where can I find it?

The stack trace, which is in the third screenshot, is illegible. It’s also in the errorLog; it would be helpful to have that.

Module is WiF CE Maps and Units, version 3.18a. I have not uploaded this version to google drive yet. However, the chap first reporting this to me used 3.17. This is on google drive and the link is on the Vassal Modules under World in Flames.
Link to snapshot of Error log is - Vassal 3_6_7 error log.txt - Google Drive
Note I said snapshot, it just keeps on growing, even after forcing the closure of the game module.
ATM the error log consists of only this:
2022-06-08 19:55:53,072 [20924-main] INFO VASSAL.launch.StartUp - Starting
2022-06-08 19:55:53,087 [20924-main] INFO VASSAL.launch.StartUp - OS Windows 11 10.0 amd64
2022-06-08 19:55:53,087 [20924-main] INFO VASSAL.launch.StartUp - Java version 17.0.2
2022-06-08 19:55:53,087 [20924-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.6\jre
2022-06-08 19:55:53,087 [20924-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.6
2022-06-08 19:55:53,165 [20924-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2022-06-08 19:55:59,987 [20924-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file C:\Vassal Modules\3_6 modules\WiF CE Maps and Units Ver 3_18a.vmod
2022-06-08 19:56:01,134 [20924-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2022-06-08 19:56:01,134 [20924-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module WiF CE Maps and Units
2022-06-08 19:56:01,150 [20924-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.6.6\jre\bin\java -Xms5500M -Xmx5500M -Duser.home=C:\Users\donsg -Duser.dir=C:\Program Files\VASSAL-3.6.6 -cp lib\Vengine.jar VASSAL.launch.Player --load – C:\Vassal Modules\3_6 modules\WiF CE Maps and Units Ver 3_18a.vmod
2022-06-08 19:56:01,790 [4792-main] INFO VASSAL.launch.StartUp - Starting
2022-06-08 19:56:01,806 [4792-main] INFO VASSAL.launch.StartUp - OS Windows 11 10.0 amd64
2022-06-08 19:56:01,806 [4792-main] INFO VASSAL.launch.StartUp - Java version 17.0.2
2022-06-08 19:56:01,806 [4792-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.6\jre
2022-06-08 19:56:01,806 [4792-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.6
2022-06-08 19:56:01,806 [4792-main] INFO VASSAL.launch.Launcher - Player
2022-06-08 19:56:06,667 [4792-AWT-EventQueue-0] INFO VASSAL.build.GameModule - WiF CE Maps and Units version 3.18a
2022-06-08 19:56:14,507 [4792-AWT-EventQueue-0] INFO VASSAL.build.GameModule - Exiting
2022-06-08 19:56:22,754 [20924-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.AbstractLaunchAction - Loading module file C:\Vassal Modules\3_6 modules\WiF CE Maps and Units Ver 3_18a.vmod
2022-06-08 19:56:23,455 [20924-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.TilingHandler - No images to tile.
2022-06-08 19:56:23,455 [20924-SwingWorker-pool-2-thread-2] INFO VASSAL.launch.AbstractLaunchAction - Loading module WiF CE Maps and Units
2022-06-08 19:56:23,455 [20924-SwingWorker-pool-2-thread-2] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.6.6\jre\bin\java -Xms5500M -Xmx5500M -Duser.home=C:\Users\donsg -Duser.dir=C:\Program Files\VASSAL-3.6.6 -cp lib\Vengine.jar VASSAL.launch.Editor --edit – C:\Vassal Modules\3_6 modules\WiF CE Maps and Units Ver 3_18a.vmod
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.StartUp - Starting
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.StartUp - OS Windows 11 10.0 amd64
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.StartUp - Java version 17.0.2
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.6\jre
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.6
2022-06-08 19:56:24,095 [9492-main] INFO VASSAL.launch.Launcher - Editor
2022-06-08 19:56:28,579 [9492-AWT-EventQueue-0] INFO VASSAL.build.GameModule - WiF CE Maps and Units version 3.18a
2022-06-08 20:06:03,382 [9492-AWT-EventQueue-0] INFO VASSAL.build.GameModule - Exiting

Ok, in that case what I need is the contents of that error dialog in a readable format.

Error log via link is a text doc.

I have seen this before; when the text label has got an error in it, or results in an error during expression evaluation. However, I’ve not seen that recently and that particular cause may have been fixed - @Brent_Easton ?

No maths involved. Just displays the result of one. Everything seemed focused on one ‘counter’. There are 21 of these that are almost identical, the main difference each one is meant for one major power, as 2 groups of eight and one of 5 - usage depends on what particular scenario is being played.

Just tried an experiment. Opened the module in 3.6.7 and saved it. Closed, reopened and then started a pre-defined game (same one as before). My thought was that maybe saving the module using 3.6.7 might circumvent/mitigate the issue. Result - nope.

EDIT: Never mind, found the download and the piece config in question.

1 Like

The error log is indicating a an infinite loop is being generated inside the infinite loop handler trying to report the name of the piece.

1 Like

bpoints - (Math.round(((chinared+chinablue-unfacts)>(chinares+chinaoil-oilsave)?(chinares+chinaoil-oilsave):(chinared+chinablue-unfacts))*prodmult/100.0)+bpoint)
prodmult - (gameyear<=1937?10:(gameyear==1938?25:(gameyear==1939?50:(gameyear<=1942?75:(gameyear<=1946?100:(gameyear<=1949?125:150)))))) (this one varies between major powers)
promult - prodmult/100.0

As Vassal gets iffy with non integers, the prodmult (production multiple) is by 100.
red/blue/res/oil are what that MajP has available to them. These are derived from their associated GPs and their summation follows that detailed in How to calculate total of numeric Property of all pieces in particular location/state. - Vassal (vassalengine.org)
In fact I use those little counting pieces on a couple more areas where counting what’s there is required. Very versatile that tip/trick.

Thought I would try a beta ‘master’ version. VASSAL-3.6.8-SNAPSHOT-29009d9-master-windows-x86_64.
Still not working.

Can you please supply a link to download the module and reproduction instructions and I will investigate.

Thanks

Links to all 3 modules are here: Module:World in Flames - Vassal (vassalengine.org)
They are the 2nd to 4th from the top. I have tested 2 of the modules (2 & 3). After the tiling process competes and the module is available for use select one the 4 map predefined game setups.

What did you mean by:

?

Looks like the “leading zero means keep it a string” fix strikes again! Here’s an example of one of the errors with audit trails on:

2022-06-11 22:29:06,885 [17200-Thread-0] WARN  VASSAL.tools.ErrorDialog - Piece: france DoD BPs (<html>Force<p>Reset) (DoD BPs) (Oil Saved:) (0) (Strat Bomb Losses:) (0) (Prod Mult:) (0.25) (BPs Lent or Rec'd:) (0) (Build Points:) () Trait: Calculated Property - bpoints Source: {(Math.round(((franceres+franceoil-oilsave)>(francered+franceblue-unfacts)?(francered+franceblue-unfacts):(franceres+franceoil-oilsave))*frpm)+bpoint)} Error: Expression evaluation error. See the errorlog for more details. 
Expression Audit:
   Source type=Piece Trait
   Source name=Piece: france DoD BPs (<html>Force<p>Reset) (DoD BPs) (Oil Saved:) (0) (Strat Bomb Losses:) (0) (Prod Mult:) (0.25) (BPs Lent or Rec'd:) (0) (Build Points:) ()
   Source description=Trait: Calculated Property - bpoints
   Source field=Expression
   Source Expression={(Math.round(((franceres+franceoil-oilsave)>(francered+franceblue-unfacts)?(francered+franceblue-unfacts):(franceres+franceoil-oilsave))*frpm)+bpoint)}
   franceres=0
   franceoil=0
   oilsave=0
   francered=0
   franceblue=0
   unfacts=0
   frpm=0.25
   bpoint=0

What they all have in common is that they are trying to multiply by a variable called xxpm (xx varies by country), which is always a fraction below 1.0. I’m guessing that leading 0 is causing Beanshell to treat it as a string instead of converting to a real.

@palad0n : if you want an immediate fix (for VASSAL 3.6.7), I would recommend splitting those xrpm decimals into two, xxpm_numerator & xxpm_denominator (feel free to use shorter names!), and multiply by the numerator then divide by the denominator. That way, you’re not trying to get VASSAL to perform math with properties that start with a zero. I’m pretty sure BeanShell won’t accept Double.parseDouble(xxpm), which would otherwise be the simpler fix, but feel free to try that first.

Otherwise, I’m guessing VASSAL 3.6.8 will make the “treat leading zeros as strings” an option that needs turning on, as this is now the 2nd module we’ve found that that change breaks! If you actually need leading zeros treated at strings, you will need to change your expressions in any case.

Edit: Note that if you do split xxpm into 2 values, you will still want at least one of them to be a decimal number, to force BeanShell to do real arithmetic instead of integer arithmetic. E.g., for frpm you would want frpm_numerator to be 1.0, frpm_denominator to be 4.0: if you just make them 1 and 4, BeanShell will perform integer division and drop the fractions from the calculation.

Predefined games under File in module main menu.
Actually xxpm, the pm being an acronym for production multiple and the xx being an abbreviated major power name (fr = france). The country PMs increase as the years progress (up to 2 in 1950) - see Charts and then the tab headed PMs, Facts & Res.
But, what exactly is the problem? I’m not using a leading zero, I’m using a zero. The expression cited should mathematically be zero.
Perhaps the problem is that as the xxpm is a decimal number, it is the root cause. Perhaps I should include (float), post the Math.round, so that the expression is happy with decimals (xxpm) and then the Math.round sort of puts the result back to an integer (and perhaps adding an (int) at the start of the expression ensures that.