VASSAL-src trunk missing package

I tried to set up an alternate build machine tonight and after I downloaded the latest VASSAL src trunk and built it, I got four errors when I moved on to build the VASL mod. As I checked out the errors, I noticed at least one of them was referring to a package that appeared to be missing in the VASSAL trunk. I went back to my other machine and found the it there. The 4 errors are:

MappedBufferedImage cannot be resolved to a type ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line 377 Java Problem
PREFER_MEMORY_MAPPED cannot be resolved or is not a field ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line 361 Java Problem
The import VASSAL.tools.image.memmap cannot be resolved ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line 53 Java Problem
The method useMappedImages() is undefined for the type ImageUtils ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line 377 Java Problem

I cannot find VASSAL.tools.image.memmap package in the new trunk but it is there on my other machine.

Lance

Thus spake lancel:

I tried to set up an alternate build machine tonight and after I
downloaded the latest VASSAL src trunk and built it, I got four errors
when I moved on to build the VASL mod. As I checked out the errors, I
noticed at least one of them was referring to a package that appeared to
be missing in the VASSAL trunk. I went back to my other machine and
found the it there. The 4 errors are:

MappedBufferedImage cannot be resolved to a
type ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line
377 Java Problem
PREFER_MEMORY_MAPPED cannot be resolved or is not a
field ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker line
361 Java Problem
The import VASSAL.tools.image.memmap cannot be
resolved ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker
line
53 Java Problem
The method useMappedImages() is undefined for the type
ImageUtils ASLBoard.java /ASL-src/src/VASL/build/module/map/boardPicker
line
377 Java Problem

I cannot find VASSAL.tools.image.memmap package in the new trunk but it
is there on my other machine.

The VASSAL.tools.image.memmap package doesn’t exist in the trunk anymore.
It wasn’t correct for VASL (or anything other than ImageUtils) to use
clases from this package to begin with.


J.

The VASL module can’t be built now though without that package.

Lance

Thus spake lancel:

The VASL module can’t be built now though without that package.

Then that code has to be rewritten not to use it. I’ll have a look
at it when I get home.


J.

Here’s a patch for ASLBoard.java. I haven’t compiled this, but I think this or something close to it is what’s needed.

I guess this is the trunk for VASSALengine 3.2? While the compiling with the new changes looked okay but something else crashed when I tried to test it. I may take a look at it when I get a chance if that has not been resolved yet.

Lance

Thus spake lancel:

I guess this is the trunk for VASSALengine 3.2? While the compiling
with the new changes looked okay but something else crashed when I tried
to test it. I may take a look at it when I get a chance if that has not
been resolved yet.

Yes, the trunk will become 3.2.

Would be good to get this sorted out. I think the VASL guys don’t have
any dedicated developers at present.


J.

How do you define the “VASSAL.port” property as referenced inside Launcher.java? I tried other modules without any problem but when I tried VASL, then it crashed at that point. So I added -DVassal.port=5800 as VM arguments to the debug configuration and the launch ended with a caught exception. Wrong port number?

Lance

Thus spake lancel:

How do you define the “VASSAL.port” property as referenced inside
Launcher.java? I tried other modules without any problem but when I
tried VASL, then it crashed at that point. So I added
-DVassal.port=5800 as VM arguments to the debug configuration and the
launch ended with a caught exception. Wrong port number?

This is the port on the loopback device on which the Module Manager
listens. The port number is specified by the MM when it launches a
Player or Editor, and is likely to change with each run of the MM.

If you’re running the Player in a debugger, you should be using the
–standalone flag and omit defining VASSAL.port.


J.

I added the standalone flag and debugged it as Launch.Player and I ran into this attached uncaught exception in jpg. It is not just VASL but other modules as well. So I think something is missing for the debugging of the Launch.Player main class.[attachment=0]error.jpg[/attachment]

Hi Lance,
That error is actually indicating that Vassal can’t find the icons that included in the trunk source. In your src folder, there should be a folder named icons containing 5 more folders containing the icons. The icons missing are VASSAL.svg from the scalable folder and VASSAL.png from the other folders. I’ve just run Player under the eclipse debugger on the latest trunk with no problems.
Brent.

It turned out the problem did have something to do with the VASL mod. I wonder for the 3.2 build, how should the VASL map files be set up in the package? Currently, when I try to load up VASL, start a new game offline and then select a new board, the program will crash at:

vassal.build.module.map.boardPicker.Board.java’s line 389:

if (obs == map.getView()) …

The map object is null.

Note that I used Vassal 3.2’s VASL and CASL classes to recreate a corresponding VASL.mod for this test. (Current VASL.mod contains classes that use VASSAL.tools.image.memmap.MappedBufferedImage package.) I wonder why map is null here. How was it done before in 3.1?

Lance

Thus spake lancel:

It turned out the problem did have something to do with the VASL mod. I
wonder for the 3.2 build, how should the VASL map files be set up in the
package? Currently, when I try to load up VASL, start a new game
offline and then select a new board, the program will crash at:

vassal.build.module.map.boardPicker.Board.java’s line 389:

if (obs == map.getView()) …

The map object is null.

You might be able to change this to

if (map != null && obs == map.getView())

but I don’t know whether this will be hiding a deeper problem.

Note that I used Vassal 3.2’s VASL and CASL classes to recreate a
corresponding VASL.mod for this test. (Current VASL.mod contains
classes that use VASSAL.tools.image.memmap.MappedBufferedImage package.)
I wonder why map is null here. How was it done before in 3.1?

Have you checked your changes into the repo so we can see them?


J.

I added the changes as suggested but instead of the crash, I got blank maps. So, it seems to be that something new in 3.2’s Vassalengine code is not working well with VASL. (As an experiment, instead of the current release of VASL.mod, I replaced it with a copy of the VASL.mod that was built with 3.2’s code and loaded it up with Vassal 3.1 GA build. Then I had no problem loading up the mapboard.)

I have not checked in the change done in ASLboard.java. I will do it soon.

Lance

Oh, I just noticed that there are quite a few lines of “FIXME” in that Board.java file, especially around the problem areas. I wonder if they are related.

Lance

Thus spake lancel:

Oh, I just noticed that there are quite a few lines of “FIXME” in that
Board.java file, especially around the problem areas. I wonder if they
are related.

Many of those indicate that the exceptions being caught are bugs if
they occur, but won’t be bugs if/when some other code is written. I
doubt that those are relevant.


J.

Thus spake lancel:

I added the changes as suggested but instead of the crash, I got blank
maps. So, it seems to be that something new in 3.2’s Vassalengine code
is not working well with VASL. (As an experiment, instead of the
current release of VASL.mod, I replaced it with a copy of the VASL.mod
that was built with 3.2’s code and loaded it up with Vassal 3.1 GA
build. Then I had no problem loading up the mapboard.)

I have not checked in the change done in ASLboard.java. I will do it
soon.

You might have been having problems with bugs in the trunk which have
been fixed since you posted this. Do you setill have problems with
trunk@HEAD?


J.

Yes, unfortunately as late as the trunk dated on 10/11/11. I checked for the map object’s null value. That fixed up the crash but the VASL board cannot be loaded at all. When I click the “Finish” button, the VASL controls panel will post lines of output like this:

  • Bad Data in Module: Image not found 2980ec082ac2a9411d7e0f…

I thought someone working on VASL might have noticed this by now but still it seemed to be only me. So, any clue on what is going on here or where the above error could have come from?

Lance

Thus spake lancel:

Yes, unfortunately as late as the trunk dated on 10/11/11. I checked
for the map object’s null value. That fixed up the crash but the VASL
board cannot be loaded at all. When I click the “Finish” button, the
VASL controls panel will post lines of output like this:

  • Bad Data in Module: Image not found 2980ec082ac2a9411d7e0f…

I thought someone working on VASL might have noticed this by now but
still it seemed to be only me. So, any clue on what is going on here or
where the above error could have come from?

The filename in the error message is for a map tile. (Map tiles are
identified by the SHA1 of some of their identifying data. See
TileUtils.tileName() if you want to see exactly how this is computed.)

What’s the full error message? This appears to be truncated.


J.

Lance, would you like me to take a look at this, since I know the tile loading code well? What revision in the VASL repo are you running?