module file size? > running out of virtual memory

i have been handed the reigns on the star wars pocket models module, and i’m having a bit of trouble. I decided to ramp up the card image quality, so i found the files online, and replaced all of lower quality images. Now, when i start a game, i get the “low virtual memory” error. i tried turning almost everything else off, but it didn’t work.

i did notice that the original mod size was 5 MB, and my updated mod is 16 MB. does this have anything to do with it?

im running a macbook with 1GB of RAM, and OSX 10.4

thanks in advance for any tips!
-BASS

Thus spake “bassplayerace”:

Is this an error for which you’re getting a bug report dialog? Is this an
error being shown to you by your OS instead of VASSAL? (I ask this because
there are no error messages for which VASSAL itself provides the text which
contain the words “low virtual memory”.)


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

hmm. good point. i do not believe it is anything that would go into a vassal error log.

here’s the exact wording of the message:

“The application has run out of memory.
Java heap space
To decrease memory usage, try reducing the number of colors in your display”

I tried reducing my color settings, but that didn’t work. What happens is that nothing shows up in the module. No game board, no click-able area, etc.

This same thing has happened when I loaded way too many extensions into my star wars epic duels game.

lastly, it is ONLY within vassal that i have ever received this error (both on a mac and windows)

any suggestions?

Ah, I’ve seen that same error. It’s an OS-error, but it is complaining about Vassal running out of memory…

bassplayerace: it sounds like you need to try adjusting your heap size. Hopefully one of the regulars will be along soon to tell you how to do it, as I’ve never had to fiddle with it. I can tell you that the generic advice to change your desktop color settings isn’t going to help.

And yes, you’re getting zapped by the increased image size. Keep in mind that if the dimensions double, the area (and therefore raw image size) quadruples. Do you know what the original and your image sizes (in pixels) are?

I’ll note the only times I’ve gotten that error are when I’ve done a lot of opening and closing of files in VASL. This implies a memory leak there, but since VASL is based off an older version of Vassal, what I need to remember to do is try out the same activity in Vassal and see if the leak is still there. :slight_smile:

thanks Rindis, that seems to have set me in the right direction.

HOWEVER, i cannot figure out for the life of me how to change the heap size for OSX. I’ve searched high and low, but nothing seems to make sense. apparently, i need to edit a certain file’s “-Xmx [#]”, aka, the heap size minimum and maximum.

if someone could shed some light on this issue on my mac, i would be very much appreciative!

BASS

feel free anyone to correct if this wrong, but…

java heap space you set inside a vassal module - the setting is only on a module-by-module basis. EDIT - I would add that it might also reset back to the default if/when you change passwords on that module?

start a game in the module, or open it with the editor (easier maybe if you are hitting this error loading the game - opening with the editor does not load the map etc until you start a game from within the editor)

go to file->preferences
there are two settings - java heap min and java heap max
the default is 256/512 at least on my systems.

and do not change it to 3gb or anything too outlandish - that will cause other problems as your os starves.

i opened the game in the editor (“edit module” right?) and went to file>edit preferences.

i didn’t see anywhere to change the heap sizes. could you be a bit more specific. (like obnoxiously specific, as i am new at using java)

thanks!
BASS

The option to set the JVM size in the preferences was only added in Vassal 3.1.

You find it in the ‘General’ tab.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Rindis”:

It’s not an OS error. It’s an error from VASSAL 3.0 or earlier. That’s
why I wanted to know the exact wording of the error message.

Please try running the same module in the current 3.1.0 beta release,
which presently is VASSAL 3.1.0-beta5, and let us know if that works
better for you:

sourceforge.net/project/showfile … p_id=90612


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Hmm. I remember it being a windows-generated error box, not a java generated one, which I figured meant that Windows was complaining about what Java was doing.

Note, this error is in VASL, not Vassal, so yes, it’s in an old version. I do plan to test for it in the current beta, and will report in if I can get it to happen again. (I kind of suspect it’s been taken care of.)

Now I developed the B5 CCG module and I have about 2500 40K images in the module via extensions, and indeed the java stack problem is a constant concern. Now all my players have learned to set the java stack size, so we can run, but when we get to about turn 12 and everything slows down to crawl. Closing the game board window and re-opening the play table helps for the next couple of actions, but eventually the speed slows again.

Can someone give me a hand revamping the module. Currently the whole card image is contained with enough detail to read the text on the card. My thought is to cut out the small image from the show contained on the card, about an 1/8 of the total card. Then use a low resolution background with text for most of the card, and overlay the image. The result would be a 5K image pasted on a 2K image with text. There would be 10-20 2k background images, and then the 2500 5K images.

Does anyone have a way to “know” if this technique will work better in the game than 40 K image? Is there another way to do this, other than just using low resolution images?

This is the method I use to build cards - via multi layering with layers. It
also gives a lot of flexibility in being able to use DP’s, shared common
tasks with protos etc… The cards also seem to be more efficient although
I have no proof that they are instead of a single 40k image.

Post generated using Mail2Forum (mail2forum.com)

It is unlikely to have any effect whatsoever unless you can reduce the physical size of the images. A 500x200 hi resolution image requires exactly the same amount of memory to display as a 500x200 lo resolution image. On the other hand, a 250x100 image of any resolution only requires one quarter of the memory to display.

Also, what version of Vassal have you tried? This problem does not necessarily have anything to do with the images izess. There are other issues that have only been fixed in the latest 3.1 beta’s that cause similiar symptoms to those you describe.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Could you please email me (b.easton at exemail.com.au) a Turn 12+ Saved Game showing the poor performance?

Thanks,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yes this is no doubt a superior way to build a module. I have added the prototypes for common actions, so there is very little specific to any card anymore other than the image. What module can I look at that you’ve developed that uses cards? I learn by example better than reading documentation, so I’m willing to steal ideas from anyone.

I mentioned that the inset image was 1/8 the size of the full card, therefore 1/8 the memory, so yes there is considerable savings from cutting the image size, overlaying, and using text. My hold up on doing this is laziness. I was in this process about a year ago, when Vassal upgraded to version 3. I was in the process of going back to recreate the module by developing a single card correctly and then using a perl script to generate the build file.

Thought I was current, but I see I am only at 3.0.17.
And yes I have a saved gamed, I’ll send that to you right away. If we could upgrade and have this problem go away before the next time we continue the game, we all would be much happier.

Thanks,
Don


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)
[/quote]

The other advantage of doing the card build will be the reduced time of download of the extension(s).

Has anyone consider making a generic deck builder to include into Vassal with card search capabilities?

I wouldn’t for sure say that this fixes the problem (smaller better cards would probably help too), but from a first glance, it certainly feels better - much more responsive.

Also a text field that was errant for some cards in the piece palette, but fine in play was also fixed. So thanks for that too.

Don

Hi Don,

Thanks for sending that.

The Good News:

I have had a look and can confirm that your module is not running our of memory. The problems you are encountering are not related to the size of your images at all, and there is no reason to change them for performance reasons. Loading up the save game you supplied uses less than 300Mb of Heap size.

The problems you have are the result of bugs in Vassal that have now been fixed.

When I load the same save game up using the latest beta release of Vassal, it is quite responsive and runs with no problems.

The Bad News:

However, I believe you are going to have to change the way you are packaging your module to be able to edit it effectively using Vassal 3.1. The way you have defined all of the counters in the basic module, but not included any of the images (they being supplied in extensions) is not compatible with the error checking in Vassal 3.1. As far as Vassal is concerned, your module is missing all of it’s images and will generated large numbers of error messages.

Regards,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Nov 21, 2008, at 8:58 PM, bassplayerace wrote:

Which version of Vassal?
Are you starting it by using the Vassal application?


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)