Working Launchfile for Maptool

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

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. :)
User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

I updated the launcher and like I wrote in the first post, I moved the Thread to a new location.

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

Oh wow, has this thread been moved now?
Well, then i have to delete the other one..

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

Of course the reason for me writing here, is that I updated the launcher.

Moreover, maybe I should clarify, that the Launcher also works for MT1.4 .


Minor Fix:
Adapted configuration. This should fix the quite rare problem, that a user using 32bit Java might see some black pictures, while its server, using 64bit, Java could still see all of the pictures.


User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

Your welcome dude! :)

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

Updated.

The current configuration is set, so that 64bit servers and 32bit clients run out of memory roughly at the same time.


This has been my goal with the last update already, but a Java problem got in the way.
If it is not possible to reserve enough memory on a system (FYI: just because Windows says that there is 1GB free Ram, does not mean this ram can be reserved), then you still can launch Java with the respective parameters, but at some point it will stop increasing the HeapSize (the MaxMemSize).
This problem only seems to exist with Java 32bit.
There fore I recommend to update to Java 64bit in general.

With best regards,
Clyde.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Working Launchfile for Maptool

Post by taustinoc »

I suspect the problem is that Java requires contiguous memory, and Windows (especially 32 bit) does not allocate contiguous blocks very well. 32 bit Windows can address up to 3.something GB of memory, but the biggest contiguous block possible is about 1.6 GB, under the most ideal conditions. (Realistically, 1.4 is about the highest you can hope for, and 1.2 is more reliable.)

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

Yea, that sounds like an explanation.
Well, you already get problems with way less than that memory.
For testing I used the System of a friend who has about 2.5GB/4GB free Ram before the start of Maptool.
Thereby I could pinpoint 896MB on 32bit to be the corresponding value for 1152MB on a 64bit system.

None the less, no matter on what system I tested that, as soon as I tried to allocate like 1024MB for Maptool, Java 32bit (maybe Windows, likely not Maptool) stopped increasing the HeapSize beyond a point of like 300MB.

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

P.s.: to Post http://forums.rptools.net/viewtopic.php ... 66#p262166

Well, reading this post today, I am not sure if it became clear, that I think I reached that goal with the current configuration.
The background of this was a friend of mine, seeing red X'es while others still saw new graphics. After I set the 32bit MaxMemSize to 1024 the same friend saw black instead of graphics.
So I started testing on some machines and came up with the current config.

Ofcourse the prerequisite is that you have enough free ram on your computer.

Therefore I wanted to inform you about the difficulties, so you guys know what screws you have to adjust, if you or one of your friends has problems like black graphics in Maptool (and cannot install 64bit Java for some reason).

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Working Launchfile for Maptool

Post by taustinoc »

Clyde wrote:Yea, that sounds like an explanation.
Well, you already get problems with way less than that memory.
Yeah, you need to keep it firmly in mind that "available memory" and "memory that Java can actually use" aren't necessarily related to one another. Windows (especially 32 bit) does a very poor job of managing memory, and Java has some really, really messed up architecture. (None of this is helped by the need to launch MT through some kind of launcher to get memory settings to usable levels, since the launcher that comes with it suppresses the DOS window, and you don't see error messages.)

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

@all:
I set the download link to a zip file since the new hoster does not post a DL window but just shows the file as Text.

@taustinoc:
I did not have these problems with 32 bit versions so much, while i am usualy using quite big campaigns.
As well usually it is working for the people with my launcher, since 4 years now.
I just tell these details, for people that have these problems, so that they can reduce their memory size, since the smaller (fitting) memory sizes are properly used and you effectively have more memory available like when you have set larger values that get not properly used.

User avatar
quikdagger
Giant
Posts: 128
Joined: Tue Jul 27, 2010 10:15 am
Location: Indianapolis, IN
Contact:

Re: Working Launchfile for Maptool

Post by quikdagger »

So for a few days I have been unable to run Maptools campaign with anything except default memory settings. I have installed 64-bit Java , older versions of java, redownloaded, manually set the mt.cfg file and no matter what I chose I always got the same stack overflow errors. This simple file fixed my issue immediately. Thanks!!!!!!!
RPGA#: 5223824963
Recruiting: World's Largest Dungeon
Camapign Session Summary Page
In Development: World of Deiradh
SkypeID:quikdagger
LFR Character:Malcrere Krylon (Human Pursuing Avenger 1)

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Working Launchfile for Maptool

Post by Craig »

taustinoc wrote:I suspect the problem is that Java requires contiguous memory, and Windows (especially 32 bit) does not allocate contiguous blocks very well. 32 bit Windows can address up to 3.something GB of memory, but the biggest contiguous block possible is about 1.6 GB, under the most ideal conditions. (Realistically, 1.4 is about the highest you can hope for, and 1.2 is more reliable.)
It shouldn't be a contiguous memory issue, we should all at least hope that the virtual memory management could handle that. The problem is one of address space and not enough of it which is exacerbated by an oddball -- and quite frankly very bad -- decision oh how it should be split up. It highly likely on 32 bit Windows machines your os is set up so windows will split the address space in half unless you have modified this, so the 4 gig of address mapped for your process only gives you 2 gig that the process can use, the other 2 gig is for Windows kernel... Fine you say but that's 2 gig... But then you also have to consider your video card, at least part of its memory will be mapped into your usable address space, then libraries will need to be mapped to that address space, then the jvm code which will need more libraries and then there is memory the jvm needs to perform its tasks, after all that you end up 1 or 1.2 or 1.4 gig free (depends on your set up). Then if you set it to 1.2 and I works you may find later at some stage it crashes because something triggered a thread to be created and the jvm had to ask the OS for memory and there is no free address space to map it to.

Generally in windows 32 bit versions you are better off setting it lower (say about 800meg) and leaving your self plenty of room outside of the heap allocated by java. Throwing large amounts more memory at the heap than it is using provides no benefit, but does have downsides.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: Working Launchfile for Maptool

Post by taustinoc »

Craig wrote:
taustinoc wrote:I suspect the problem is that Java requires contiguous memory, and Windows (especially 32 bit) does not allocate contiguous blocks very well. 32 bit Windows can address up to 3.something GB of memory, but the biggest contiguous block possible is about 1.6 GB, under the most ideal conditions. (Realistically, 1.4 is about the highest you can hope for, and 1.2 is more reliable.)
It shouldn't be a contiguous memory issue, we should all at least hope that the virtual memory management could handle that.
One would think. But that is not, apparently, the case, with 32 bit Windows Java. If insufficient contiguous memory is not available at launch, Java errors out. That's why a machine with 2+ GB of free memory will not work if you put in a max memory of 2 GB.

I know from personal experience that any value of 1.6 GB simply will not launch, and 1.4 GB is flakey, at best.

This is also a known, confirmed (by Oracle) limitation on 32 bit Windows. There's a technical explanation here:

https://blogs.oracle.com/moazam/entry/w ... i_allocate

in one of the replies to the post. It's an old post, but so far as I can tell, this limitation has never changed, for the reasons given - more requests for faster than for more. There are many other web pages, some pretty recent, that mention the requirement as still there.

User avatar
Clyde
Cave Troll
Posts: 40
Joined: Sun Jan 05, 2014 9:28 am

Re: Working Launchfile for Maptool

Post by Clyde »

quikdagger wrote:So for a few days I have been unable to run Maptools campaign with anything except default memory settings. I have installed 64-bit Java , older versions of java, redownloaded, manually set the mt.cfg file and no matter what I chose I always got the same stack overflow errors. This simple file fixed my issue immediately. Thanks!!!!!!!
Your Welcome!
That's what it's for. :)

Post Reply

Return to “MapTool”