Create account / Log in

Intitial Tiling Fails for Large Graphics (Maps)

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » June 14th, 2015, 12:22 pm

Hi,
I have looked for previous posts of this type and didn't find any that were similar so I am posting this.

I just downloaded two Vassal modules from the Decision Games website and found that the "Cobra" module works fine but the "War between the States" fails to tile correctly and hangs at 26% leaving the tiling window open. After a while it brings up the game selection menus (which work) but only displays a single fragment of the main map in the top left corner. I suspect other graphics may also be missing. I have attached the two error logs, one successful for 10MB files and the other unsuccessful for 13MB files.

The only difference I can see is the size of the graphic file being processed and that the conversion switches to FileImageTypeConverter and the process then fails.

2015-06-14 17:54:08,204 [2-main] INFO VASSAL.tools.image.tilecache.FileArchiveImageTiler - Tiling images/WbtS edited.jpg
2015-06-14 17:55:06,678 [2-main] INFO VASSAL.tools.image.FallbackImageTypeConverter - Switching to FileImageTypeConverter...
2015-06-14 17:56:53,626 [2-main] ERROR VASSAL.tools.image.tilecache.ZipFileImageTiler -
java.net.SocketException: Connection reset by peer: socket write error


I tried an old module that I was working on a while back (under Vassal 3.2.6) with a 13MB map file and it fails in a similar manner to WBTS. It used to tile just fine. I tried increasing initial memory heap size and it made no difference.

Hardware: Compaq NC8430 with T5600 processor and 3GB memory recently upgraded to Win8.1 from XP. Java 1.8.0_45 also recently installed (which may or may not have anything to do with it). Otherwise Vassal seems to be running just fine.

Cheers,
Reg
.
Attachments
Vassal_Error_Log_2015-06-14_18-59_OK.txt
Error log with successful tiling of 10MB map graphic file (Cobra)
(4.74 KiB) Downloaded 256 times
Vassal_Error_Log_2015-06-14_17-56.txt
Error log with failure to tile 13MB map graphic file (WBTS)
(45.25 KiB) Downloaded 210 times
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » June 14th, 2015, 12:31 pm

Thus spake reg129:
> Hi,
> I have looked for previous posts of this type and didn't find any that
> were similar so I am posting this.
>
> I just downloaded two Vassal modules from the Decision Games website and
> found that the "Cobra" module works fine but the "War between the
> States" fails to tile correctly and hangs at 26% leaving the tiling
> window open. After a while it brings up the game selection menus (which
> work) but only displays a single fragment of the main map in the top
> left corner. I suspect other graphics may also be missing. I have
> attached the two error logs, one successful for 10MB files and the other
> unsuccessful for 13MB files.
>
> The only difference I can see is the size of the graphic file being
> processed and that the conversion switches to FileImageTypeConverter and
> the process then fails.

The tiler might be running out of memory.

The tiler runs in a separate process and guesses how much memory will be
needed. I see that you're using Java 8, which is newer than anything
we tested aginst. If Java 8 requires more memory to do the same work
than Java 6, that would explain why this fails for you.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » June 14th, 2015, 12:55 pm

uckelman wrote:Thus spake reg129:

The tiler might be running out of memory.

J.


Which is what I was suspecting.... :(

This appears to be the applicable area. Is there any way this setting can be increased???

2015-06-14 17:53:47,923 [0-SwingWorker-pool-6948595-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\Java\jre1.8.0_45\bin\java -classpath lib\Vengine.jar -Xmx599M -DVASSAL.id=2 -Duser.home=C:\Users\Rennie -DVASSAL.port=52836 VASSAL.tools.image.tilecache.ZipFileImageTiler C:\Users\Rennie\Documents\Vassal Mods\Modules_Owned\WBTS.vmod C:\Users\Rennie\AppData\Roaming\VASSAL\tiles\2e5b354ff8c385d76b53bc5e3c551f2d823665f4 256 256


Cheers,
Reg
.
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » June 17th, 2015, 8:24 pm

Thus spake reg129:
>
> Which is what I was suspecting.... :(
>
> This appears to be the applicable area. Is there any way this setting
> can be increased???

Not without recompiling, no. If you file a bug report, there's a chance
I'll look into readjusting the heap estimates for Java 8, but I'm not
promising anything.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » June 27th, 2015, 1:30 am

Hi,

I ran the resource meter and it appears that the 740kB allocated memory is indeed max'ed out even though I have plenty of system memory left. (See attached).

Another option is to load Java 6/7 for Vassal only but that is not recommended by Oracle for security reasons (Hobson's choice here...).

By the way, is this user account valid for Bugzilla as I can't seem to log in to report this problem but it says my account name already exists when I try to create it.

Cheers,
Reg
Attachments
Java8_Memory_Use.jpg
Java8 Memory Use
Java8_Memory_Use.jpg (208.89 KiB) Viewed 8029 times
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » June 27th, 2015, 9:40 am

Thus spake reg129:
> Hi,
>
> I ran the resource meter and it appears that the 740kB allocated memory
> is indeed max'ed out even though I have plenty of system memory left.
> (See attached).

That's 740_000_ KB (i.e., about 720MB).

What are the dimensions of the image you were trying to tile?

> Another option is to load Java 6/7 for Vassal only but that is not
> recommended by Oracle for security reasons (Hobson's choice here...).

The warnings I've seen have to do with the web plugin (don't install
it) and sandboxing. They shouldn't affect you with VASSAL.

> By the way, is this user account valid for Bugzilla as I can't seem to
> log in to report this problem but it says my account name already exists
> when I try to create it.

Yes, it is, but you can't log in at the moment because of a problem
we're strill trying to resolve from the system upgrade last week.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » June 28th, 2015, 2:05 am

What are the dimensions of the image you were trying to tile?


jpg, 9757 x 7293, 12.7MB

Yes, it is, but you can't log in at the moment because of a problem
we're still trying to resolve from the system upgrade last week.


Thanks, I'll try later

Another option is to load Java 6/7


I have installed Java 1.7 CPU 79 and attempted to run Vassal under this version to see if it made a difference but no luck. (I don't want to uninstall 8 ). A web search said you should be able to open a shell and set the PATH & JAVA_HOME env variables to run an application under an older version of Java. "java -version" indeed flags the older version but when Vassal.exe is run in the shell, it still uses Java 8 (as evidenced by the absolute path in the error log).

Where does Vassal pick up the Java path?? Does it get it from the symlinks at C:\ProgramData\Oracle\Java\javapath??

Cheers,
Reg
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » June 28th, 2015, 11:07 am

Thus spake reg129:
>
> I have installed Java 1.7 CPU 79 and attempted to run Vassal under this
> version to see if it made a difference but no luck. (I don't want to
> uninstall 8 ). A web search said you should be able to open a shell and
> set the PATH & JAVA_HOME env variables to run an application under an
> older version of Java. "java -version" indeed flags the older version
> but when Vassal.exe is run in the shell, it still uses Java 8 (as
> evidenced by the absolute path in the error log).
>
> Where does Vassal pick up the Java path?? Does it get it from the
> symlinks at C:\ProgramData\Oracle\Java\javapath??

I assume that have a Windows install rather than a generic one, so
you're launching VASSAL using VASSAL.exe. Launch4j builds VASSAL.exe for
us. I wasn't able to track down a precise statement of how it selects
a JVM, but my guess is that it looks at the Windows registry to find the
most recent usable version.

You could instead run the JVM directly:

java -jar lib\Vengine.jar VASSAL.launch.ModuleManager

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » June 28th, 2015, 8:31 pm

Thus spake reg129:
> [This message has been edited.]
>
>
> >
> > What are the dimensions of the image you were trying to tile?
>
>
> jpg, 9757 x 7293, 12.7MB
>

The only thing relevant for tiler memory usage is the pixel dimensions,
since that determines the size of the raw pixel data. File type and file
size aren't relevant.

The formula we use for setting the max heap for the tiler is 1.66*M+150,
where M is the size in MB of the pixel data for the image with the most
pixel data.

In the case of WBtS, it's this map, which has 9757*7293 = 71157801
pixels. At 4 bytes per pixel, that's 284631204 bytes, or just under
272MB. 1.66*272+150 is right around 600MB. (Your error log is showing
599MB, which is going to be due to rounding.)

We might be able to solve this by making the first and zeroth order
coeficients in the formula adjustible. The reason I didn't opt for this
in the first place is that hardly anyone will understand how to set
these reasonably, and setting them poorly will cause many modules to
fail to tile.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » July 2nd, 2015, 10:58 am

uckelman wrote:
You could instead run the JVM directly:

java -jar lib\Vengine.jar VASSAL.launch.ModuleManager

--
J.


Correct. I have the Vassal.exe install.

I tried running directly with java as you describe above but it failed to run with "VASSAL: File 'VASSAL.launch.ModuleManager' of unknown type" error. Obviously a consequence of using the exe.

Looks like I will have to wait for you guys to solve this.

Interestingly someone has just released a module on Three Days of Gettysburg which is the other module I was working on. However because they broke the map into 4 x 2MB pieces it tiles and runs OK on my machine. My module with exactly the same map in one 17MB file doesn't tile. :(

(I still like my module better - it does more. :D )

Cheers,
Reg
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » July 2nd, 2015, 11:38 am

Thus spake reg129:
>
> "uckelman" wrote:
> >
> >
> > You could instead run the JVM directly:
> >
> > java -jar lib\Vengine.jar VASSAL.launch.ModuleManager
> >
> > --
> > J.
>
>
> Correct. I have the Vassal.exe install.
>
> I tried running directly with java as you describe above but it failed
> to run with "VASSAL: File 'VASSAL.launch.ModuleManager' of unknown
> type" error. Obviously a consequence of using the exe.

It's not---nothing at all to do with using the exe.

From what directory did you issue the above command?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » July 3rd, 2015, 7:22 am

The current directory was the folder containing the Vassal.exe file and where lib\Vengine.jar was also valid.

I assume ModuleManager is a class defined within Vassal.exe?
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby uckelman » July 3rd, 2015, 9:26 am

Thus spake reg129:
> The current directory was the folder containing the Vassal.exe file and
> where lib\Vengine.jar was also valid.
>
> I assume ModuleManager is a class defined within Vassal.exe?

No, ModuleManager is a class in lib\Vengine.jar.

My appologies, I had the syntax wrong. It should be:

java -cp lib\Vengine.jar VASSAL.launch.ModuleManager

The -jar flag tells the JRE to look for the designated entry point in
the JAR, and then the next argument is passed on to that class, which
isn't what was intended.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » July 3rd, 2015, 10:31 am

That worked better. :D

Unfortunately running java 7 didn't fix the original problem.

2015-07-03 20:20:21,056 [0-main] INFO VASSAL.launch.StartUp - Starting
2015-07-03 20:20:21,102 [0-main] INFO VASSAL.launch.StartUp - OS Windows 8.1 6.3
2015-07-03 20:20:21,102 [0-main] INFO VASSAL.launch.StartUp - Java version 1.7.0_79
2015-07-03 20:20:21,102 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.15
2015-07-03 20:20:22,030 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager

2015-07-03 20:22:23,370 [2-main] INFO VASSAL.tools.image.FallbackImageTypeConverter - Switching to FileImageTypeConverter...
2015-07-03 20:24:15,964 [2-main] ERROR VASSAL.tools.image.tilecache.ZipFileImageTiler -
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.7.0_79]
at java.net.SocketOutputStream.socketWrite(Unknown Source) ~[na:1.7.0_79]
at java.net.SocketOutputStream.write(Unknown Source) ~[na:1.7.0_79]
at java.io.DataOutputStream.writeByte(Unknown Source) ~[na:1.7.0_79]
at VASSAL.tools.image.tilecache.ZipFileImageTiler$4.receive(ZipFileImageTiler.java:156) ~[Vengine.jar:na]
at VASSAL.tools.image.tilecache.ZipFileImageTiler$4.receive(ZipFileImageTiler.java:154) ~[Vengine.jar:na]
at VASSAL.tools.image.tilecache.TileSlicerImpl.slice(TileSlicerImpl.java:104) ~[Vengine.jar:na]
at VASSAL.tools.image.tilecache.FileArchiveImageTiler.run(FileArchiveImageTiler.java:91) ~[Vengine.jar:na]
at VASSAL.tools.image.tilecache.ZipFileImageTiler.main(ZipFileImageTiler.java:173) ~[Vengine.jar:na]
2015-07-03 20:24:15,964 [2-main] INFO VASSAL.tools.image.tilecache.ZipFileImageTiler - Exiting


Cheers,
Reg
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Re: Intitial Tiling Fails for Large Graphics (Maps)

Postby reg129 » July 22nd, 2015, 10:22 am

Now that's interesting.

After upgrading to Java 1.8.0_51 I tried to load the "War between the States" module again. After it started to tile I decided to close Thunderbird and Firefox which would have freed up a heap of memory.

And the module tiled and loaded correctly!!! Woohoo!!

To see if that was it I tried to load one of my custom modules (3DoG_100.vmod) with a 17MB map and it failed (several times), even when I tried the trick of closing Thunderbird/Firefox to create some free up memory. I noted when the tiling fails the free memory (as opposed to standby memory) drops to zero. So it looks like there is a bit more to this but it does look available memory related.

Log attached. (looks like there is still an error in there).

Cheers,
Reg
Attachments
Vassal_Error_Log_2015-07-22.txt
Vassal Error Log 22Jul15 - Successful WBTS module (13MB map) tiling, fails 3DoG_100 module (17MB map).
(43.56 KiB) Downloaded 210 times
reg129
 
Posts: 10
Joined: June 14th, 2015, 11:45 am

Next

Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests