Running Into Memory Errors
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
- goldensword52
- Cave Troll
- Posts: 42
- Joined: Thu Jul 31, 2014 1:24 am
Running Into Memory Errors
Hi all, I'm hoping that you can help me with a problem I'm having with map tools. I've been able to use the launcher with version 1.3.b90 to get up to 1 gig of memory, but I'm still running into errors where map tool runs out of memory. As far as I can tell, nothing I'm doing should be using too much memory. About half the time, just trying to insert a single 7500 x 6500 image (138 mb on disk), causes map tools to run out of memory. And on top of all that, I can't seem to get the launcher to work if I tell it to use more than 1 gb at startup; if I try, it just hangs and does nothing. So can anyone help me figure out why maptools seems to be using so much memory, and/or how I can get more memory to work with? Thanks in advance.
Re: Running Into Memory Errors
If you're not using the launcher then mt does not het Amy memory assigned by java and thus nothing will work. What you can try is running a .bat or command line, but you'll either have to wait for someone to post it here or search the forum for it. Might be in my signature but not sure
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Running Into Memory Errors
If you're not using the launcher then mt does not het Amy memory assigned by java and thus nothing will work. What you can try is running a .bat or command line, but you'll either have to wait for someone to post it here or search the forum for it. Might be in my signature but not sure
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- goldensword52
- Cave Troll
- Posts: 42
- Joined: Thu Jul 31, 2014 1:24 am
Re: Running Into Memory Errors
Thanks for the reply. I have been using the new 1.3.b90 launcher, and it seems like map tools is correctly using 1 gb of memory. What I can't figure out is why a single image takes up all the memory, and why I can't seem to assign any more than 1gb. Would any kind of .bat or command line help with that?
Re: Running Into Memory Errors
well you can check for certain with having a look at 'debug info' under help menu. Actually copy paste that here so i can have a look and tell you a bit more instead of guessing.goldensword52 wrote:Thanks for the reply. I have been using the new 1.3.b90 launcher, and it seems like map tools is correctly using 1 gb of memory. What I can't figure out is why a single image takes up all the memory, and why I can't seem to assign any more than 1gb. Would any kind of .bat or command line help with that?
o and btw, what format is the pic? cause if a picture is fully loaded in mt, its done uncompressed, so if you we're to use a 138mb jpg pic, that probly burn down on my pc as well. It would probly be around 2Gb in memory size and if you have java 32 installed then no more then... 1300 mb (IRC) can be assigned.
what you need to do is cut the pic into 2 or 4 pieces (would start with 2) and then try again.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Running Into Memory Errors
That is a big map. What scale (DPI) are you using? Do you need to be using that high resolution?goldensword52 wrote:As far as I can tell, nothing I'm doing should be using too much memory. About half the time, just trying to insert a single 7500 x 6500 image (138 mb on disk), causes map tools to run out of memory.
For comparison, I'm using a 4600x6500 map and that uses about 700 megs of memory with almost no other assets on it. The graphic file is a jpg that's only 6.5 megs. If I blow it up to 6500x7500 it's still under 10 megs. Your 138 meg image file must be a tiff or a png (a format you do not need to use for the vast majority of background maps). I suggest you turn it into a jpg... it won't save you memory usage exactly, but it will transfer significantly faster and keep your campaign file MUCH smaller.
For kicks, I tested the 6500x7500 map to see how much memory it would use in MT. It uses about 1200mb and spikes up to 1400+ on load. That's what's causing your memory errors. You're going to have a hard time using that size file on a 32 bit system (or with 32 bit java).
Speaking of which...
If you are using a 32 bit OS or 32 bit java (and the info you've provided above suggests one or both of these), then you will not be able to set the memory, reliably, above 1500mb. I did some tests on this years ago on 32bit XP, but I don't remember what my results were and I can't find my post. But better to shoot low or you will run into stability issues.And on top of all that, I can't seem to get the launcher to work if I tell it to use more than 1 gb at startup; if I try, it just hangs and does nothing. So can anyone help me figure out why maptools seems to be using so much memory, and/or how I can get more memory to work with? Thanks in advance.
If you have a 64 bit OS and you install 64 bit Java you'll have all the wiggle room you need (though, keep in mind that your players need to have similarly specced system to not run into problems.) I suggest you build maps that don't spike above 1400 for this reason. You may want to consider breaking the map up or reducing the DPI (for example, you can probably get away with 25-30 dpi on large overland maps.)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- lmarkus001
- Great Wyrm
- Posts: 1867
- Joined: Sat Mar 29, 2008 12:30 am
- Location: Layfayette Hill, PA
Re: Running Into Memory Errors
Yeah I can't get above 1200MB for 32-bit Java.
And yeah, that is a BFM...
And yeah, that is a BFM...
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Running Into Memory Errors
I bet when you load into that 1200mb map it spikes, briefly, into the 1400's before settling down into your "workable" range. That spike is what usually gets people on 32bit.lmarkus001 wrote:Yeah I can't get above 1200MB for 32-bit Java.
And yeah, that is a BFM...
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- goldensword52
- Cave Troll
- Posts: 42
- Joined: Thu Jul 31, 2014 1:24 am
Re: Running Into Memory Errors
Those were some very good recommendations. The first thing I tried was converting the image from a .jpg into a .bmp, which reduced the size to about 6 mb. Strangely enough, this helped out slightly with the memory problems as well; I was able to fit 4 completely different images of that same size before running out of memory. I have no idea why that would happen, but I certainly won't complain.
After that I ran the debug tool, and, as you all correctly guessed, my java was running as a 32 bit program even though I have a 64 bit operating system. I managed to download and install the 64 bit version and that completely solved the issue of being unable to allocate more memory. Now I can set the max memory pretty much as high as I want.
So both of the problems are solved. Thank you all so much for your help!
After that I ran the debug tool, and, as you all correctly guessed, my java was running as a 32 bit program even though I have a 64 bit operating system. I managed to download and install the 64 bit version and that completely solved the issue of being unable to allocate more memory. Now I can set the max memory pretty much as high as I want.
So both of the problems are solved. Thank you all so much for your help!
Re: Running Into Memory Errors
This seems counter intuitive since .bmp files are bigger than .jpg files, by a lot. Perhaps you meant the other way around?The first thing I tried was converting the image from a .jpg into a .bmp, which reduced the size to about 6 mb.
Also, if you plan to use the image with other players logging in they may not be able to see the picture because their memory settings are too low. I've done some pretty large images and I can usually get away with 1024 max with 3m stack. One trick to do is to reduce the image size by 50% then stretch it in MapTool. This uses 1/4 of the memory and difference isn't very noticeable. The easy way is to paste the image, then paste it again at lower right corner. Then drag top left image lower right corner to lower right corner of other image for. I also recommend making sure the original image has dimensions divisible by 50 so you can snap to grid by holding ctrl key.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- goldensword52
- Cave Troll
- Posts: 42
- Joined: Thu Jul 31, 2014 1:24 am
Re: Running Into Memory Errors
Oops, yeah I guess I did mean the other way around. Currently I only plan to use map tools locally. But that sounds like a really useful trick if I ever do need to save on space.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Running Into Memory Errors
*.bmp to .jpggoldensword52 wrote:The first thing I tried was converting the image from a .jpg into a .bmp *, which reduced the size to about 6 mb. Strangely enough, this helped out slightly with the memory problems as well; I was able to fit 4 completely different images of that same size before running out of memory. I have no idea why that would happen, but I certainly won't complain.
JPG is a lossy format, so an image that size may have a slightly reduced memory footprint (but would totally depend on the image and viewing program). But if you got 4 same-sized, different images in the same footprint I suspect it may have reduced your resolution during the conversion as well (probably by half as that's what the math indicates).
Anyway, glad you got everything working... and make sure your players can use the same memory settings you are using.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."