1.3b91 out of memory errors

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
Post Reply
User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

1.3b91 out of memory errors

Post by celestian »

I get this while working on a very small framework. I have 1024/1024/16 set on the launcher settings. Running java8 on windows 8.1.

Any thoughts on what I can do to correct this? System has 16gig, at the time of this only 50% of that was used. Guessing this has something to do with the settings I am using. I've tried to tweak them but can't seem to get much larger than the ones I listed.

Code: Select all

==== Java Information ====
Java Vendor.: Oracle Corporation
Java Home...: C:\Program Files (x86)\Java\jre1.8.0_40
Java Version: 1.8.0_40
Result of executing 'java -version':
............: Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
............: Java HotSpot(TM) Client VM (build 25.40-b25, mixed mode)
---------------------------------------
java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.addWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
	at org.jdesktop.swingworker.SwingWorker$7.execute(Unknown Source)
	at org.jdesktop.swingworker.SwingWorker.execute(Unknown Source)
	at net.rptools.maptool.client.AppActions.doSaveCampaign(AppActions.java:2251)
	at net.rptools.maptool.client.AppActions.access$4(AppActions.java:2201)
	at net.rptools.maptool.client.AppActions$56.execute(AppActions.java:2181)
	at net.rptools.maptool.client.AppActions$ClientAction.actionPerformed(AppActions.java:2802)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at javax.swing.AbstractButton.doClick(Unknown Source)
	at de.muntjak.tinylookandfeel.TinyMenuItemUI$ClickAction.actionPerformed(Unknown Source)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
	at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
	at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
	at javax.swing.JMenuBar.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)



User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: 1.3b91 out of memory errors

Post by aliasmask »

Those are horrible settings. You min memory equals your max for one. With a 16 gig system you're running a 64bit system. You should probably uninstall java (all of them) and redownload java 8 using the manual method which is the only way to get the 64bit version (link to the side). Then you set your max to 2048, min to 256 and stack to 3, 4 if you're feeling adventurous.

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

Re: 1.3b91 out of memory errors

Post by Craig »

As aliasmask said this will be because you are running the 32bit version of Java.

With that programs only have 2 gig of addressable memory
You have allocated 1 gig to the heap (max size, the min size doesn't matter here).
That leaves 1gig, part of that 1gig is taken up by the Virtual machine, more is taken up by stuff windows maps into that address space (like libraries).
Also things like your video card are mapped into that memory space so that 1 gig left after your heap space shrinks rapidly.
At some stage Java has tried to create a new thread and asked the OS for more memory and the OS has come back and said sorry you have used
up all of your address space.

Moving to a 64bit JVM will increase the address space vastly, for those that cant move to a 64bit JVM they should have lower max memory size
(in a lot of cases 1 gig is over kill anyway).

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: 1.3b91 out of memory errors

Post by Full Bleed »

celestian wrote:I have 1024/1024/16 set on the launcher settings.
Out of curiosity, what made you select those settings? Maybe some clarity somewhere could help others avoid making the same mistake.

On 32 bit Java--

If your system has 2 gigs of ram: 256/1024/4

If your system has 4 gigs of ram you could go to around 256/1320/4.


On 64 bit Java (which is highly recommended if you are using a 64 bit OS)--

256/2048/4 is a reasonable starting point. Few campaigns will need this much.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

Re: 1.3b91 out of memory errors

Post by celestian »

Full Bleed wrote:
celestian wrote:I have 1024/1024/16 set on the launcher settings.
Out of curiosity, what made you select those settings? Maybe some clarity somewhere could help others avoid making the same mistake.
For whatever reason that's what it defaulted to at the time. Actually it was 1024/512/16.

I could have sworn I forced it to use 64bit java using the launcher options. I'll do as recommended above and see what I come up with.

edit: looks like it's using 64 and I was able to set the memory settings as suggested. Thanks!

Code: Select all


==== MapTool Information ====
MapTool Version: 1.3.b91
Max mem avail..: 1,820M
Max mem used...: 491M


==== Java Information ====
Java Vendor.: Oracle Corporation
Java Home...: C:\Program Files\Java\jre1.8.0_40
Java Version: 1.8.0_40
Result of executing 'java -version':
............: Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
............: Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)



Post Reply

Return to “Bug Reports”