1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

how to change d20pro memory setting

Discussion in 'General Discussion' started by mahhand, Dec 18, 2012.

  1. mahhand

    mahhand Member

    Joined:
    Jun 21, 2011
    Messages:
    59
    Likes Received:
    6
    I was wondering is there an easy way to change the memory settings that the program uses at launch? right now i am using the fefault because when i tried to use the max settings the program would just give me the "cant create the bah bah bah machine java error. my laptop has 16 gigs of ram and I am using large DPI tiles for my maps (150 dpi) so i want to try and make the higher d20pro setting work if it is possible. any suggestions?
     
  2. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    Change the extension:
    FROM: d20Pro.dat
    TO: d20Pro.jar

    Then open d20Pro, if you have 64-bit Java installed, it will utilize more RAM than 32-bit Java will allow.
     
  3. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    Also.. for 32bit machines.. you can create a shortcut on your desktop and use ->

    Code:
    Target Field = "C:\Program Files\Java\jre6\bin\javaw.exe" -Xmx1280m -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw -Dsun.java2d.d3d=false -DBypassJavaVersionCheck=true -jar d20Pro.dat
    
    Start In Field = "C:\Program Files\MindGene\d20Pro"
    
    adjusting the paths to suite of course.

    then you can adjust -Xmx to find the best setting for your environment..
     
  4. Golkiwu

    Golkiwu Member

    Joined:
    Sep 7, 2010
    Messages:
    365
    Likes Received:
    5
    Ed,

    When I try this it tells me it cannot open the .jar file. I have both 32 and 64 bit Java installed (6-37). What am I doing incorrectly?
     
  5. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    Ok, seems the computer didn't correctly change the file type. Easiest way to resolve is to download the Linux version (ZIP file), then drag the d20Pro.JAR file into your d20Pro main directory. Then start d20Pro (from the newly created jar file - make sure to download the same version as you currently have installed). I've tested this and it opened with java-64bit utilizing 2.67GB memory (12GB installed on computer).

    [​IMG]
     
  6. Golkiwu

    Golkiwu Member

    Joined:
    Sep 7, 2010
    Messages:
    365
    Likes Received:
    5
    Did that, now I get this error (when I try to launch the campaign):


    Failed to initialize RES
    Caused by: Not enough memory for loading images (Max avail for image cache: 47.5M, Minimum needed: 100M, Theshold: 200M, Max memory: 247.5M). Please increase max heap and try again.

    I am no noob, but where exactly should I change this?
     
  7. Golkiwu

    Golkiwu Member

    Joined:
    Sep 7, 2010
    Messages:
    365
    Likes Received:
    5
    I have tried changing values in the .bat files to no avail.

    I really could use a hint of instruction on this.

    Java is not my bag.

    Thanks!
     
  8. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    Sorry for not getting this info sooner, I had a bout of food poisoning.
    Note to self: no more rum cake from non-fda approved sources.

    Anyway, the easiest way is to create an alternative bat file (inside your main d20Pro directory - you can always create a shortcut to it and place the shortcut elsewhere - I have my shortcut pin'd to the start menu). Here is what mine states:

    Code:
    @echo off
    setlocal
    
    REM By default, we locate java in the path.
    REM If you do not have a valid 64bit JRE found first in the path
    REM then update the below with a full absolute path to a javaw.exe
    set JAVA=javaw
    
    start %JAVA% -Xmx3g -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw -Dsun.java2d.d3d=false -jar d20Pro.jar
    
    If you get a "cannot create java virtual machine" error it is usually due to java32 trying to open. You can correct this by going to http://www.java.com/en/download/manual.jsp and downloading Java for Windows Offline (64-bit) download and install. Then try again.

    Testing environment:
    Windows 7 Ultimate sp1
    Java 64 bit: Version 7 Update 10
     
  9. Golkiwu

    Golkiwu Member

    Joined:
    Sep 7, 2010
    Messages:
    365
    Likes Received:
    5
    Thanks Curtis.

    That clarified it for me.

    Totally was over thinking it in the first place, I was.

    Gratis!
     
  10. Akmenos

    Akmenos New Member

    Joined:
    Jan 1, 2013
    Messages:
    1
    Likes Received:
    0
    Hey all,

    Im having the following issue with D20Pro when I try to connect to a game as a player OR attempt to load as a Judge to sort characters through the 64 bit batch file (it wont recongnize java is installed if I run the .exe and the normal batch file works but same issue, and I get a "cant find jarfile" issue if I have UAC enabled):

    Failed to initialize RES
    Caused by: Not enough memory for loading images (Max avail for image cache: 45.38M, Minimum needed: 100M, Theshold: 200M, Max memory: 245.38M). Please increase max heap and try again.

    I have changed the heap though the isntaller to higher and lower values and I still get the same issue, I have also attempted to use the .jar file instead of the .dat file and I have also tryed the .bat file as shown above, I have also disabled my UAC in order to run the program.

    My system is as follows:

    OS - Windows 7 Ultimate SP1 64 bit
    Java - 7.10 64 bit
    RAM - 8gig

    I have no idea why im getting this error, I have the latest version of D20Pro installed, the latest version of 64 bit Java and 8gig of RAM, I dont see why I have a memory issue. Please advice.

    Thanks in advance

    PS. I have attempted to use the .jar file instead of the .dat file, same problem. I have also attempted to use your .bat file with the .jar file and the same problem occurs.
     
  11. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    The installer creates registry memory settings when using the .EXE file to open d20Pro. Always "run as admin."
    If you load d20Pro via .BAT file, the settings from the .BAT file are used.
    If you load d20Pro via .JAR file, Java's default settings are used.
    You can install d20Pro outside of the normal "Program Files" or "Program Files (x86)" directories to avoid UAC issues. Many people install it right on C:\d20Pro\ to avoid UAC issues.

    If you are having trouble loading d20Pro with all three methods, I would recommend:
    1) Uninstall all versions of Java.
    2) Download the newest 64-bit Java version manually (as indicated in a previous post).
    3) Install the newest 64-bit Java version.
    4) Restart your computer. Yes, restart your computer.

    If you are happy with the installer's memory property, you can use the .EXE file to open d20Pro.
    If you need to allocate more memory, edit the .BAT file for up to 25% of your total RAM (in this example - 3GB) then save. This setting is found:
    Code:
    -xmx3g
    If using the .JAR file as part of the .BAT loading sequence make sure your .BAT file includes:
    Code:
    d20Pro.jar
     
  12. mahhand

    mahhand Member

    Joined:
    Jun 21, 2011
    Messages:
    59
    Likes Received:
    6
    Thanks so much for this info and help. I followed your instructions here with your last post and was able to get my d20pro running java 64bit and upped the memory usage to 4gb (my laptop has 16gb), seems to just breeze through anything now.

    :)
     
  13. Entola

    Entola Member

    Joined:
    Jul 23, 2012
    Messages:
    128
    Likes Received:
    0
    I keep getting the
    error.

    I can't find where to "Run As Administrator" in the .jar file. I can normally right click and run as admin or go into properties->compatibility tab and set it to always run as admin, but with the .jar file those options aren't available. So how do I set the file to Run as Admin?
     
  14. Entola

    Entola Member

    Joined:
    Jul 23, 2012
    Messages:
    128
    Likes Received:
    0
    I just reinstalled D20Pro at c:\d20pro and it works fine now.
     
  15. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    properties->compatibility->Advanced
     
  16. Entola

    Entola Member

    Joined:
    Jul 23, 2012
    Messages:
    128
    Likes Received:
    0
    Yeah that's not there for a .jar in Win 8
     
  17. baraccus

    baraccus New Member

    Joined:
    Jan 14, 2010
    Messages:
    15
    Likes Received:
    0
    I am getting sooooo frustrated with this. :evil: I'm having a very difficult time following half that's in the posts to fix this, and everything I try is to no avail. I had purchased a few items through the Marketplace and am not able to use them due to their size, one being the Tomb of Horrors Complete that I got through the last kickstarter. There is no way this should be this difficult with the expense that I have put into this product.

    If I try to run either of the .bat files as an administrator, it tells me "Unable to access jarfile d20Pro.dat. I can't change and save the .bat file because it says "access is denied". I have reinstalled d20Pro about 50 times now with every setting I can try, and the only thing that works is 784 Max heap size in Megabytes and 128 Max permanent size in Megabytes. I have deleted all versions of Java and installed manually jre-7u67-windows-x64.exe. But d20Pro kept telling me that it couldn't find Java so I had to install jxpinstall.exe to get d20Pro to work again. No change.

    How do I fix this......in English I can follow please.

    My system is as follows:

    OS - Windows 7 Professional SP1 64 bit
    RAM - 8gig
     
  18. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    On your desktop, you should have (or create) a shortcut to run d20pro...

    right click on it, and select 'properties'

    change the "target" line as follows;
    "C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -Xmx1280m -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw -Dsun.java2d.d3d=false -DBypassJavaVersionCheck=true -jar d20Pro.dat

    -- you'll need to adjust this to meet your set up and version of java.. mine there is the default jre7... you can change memory by adjusting the -Xmx####m (the # portion), I'd start with 512 and work up in 256 increments.. (((use the arguments -Xms<memory> -Xmx<memory>. Use M or G after the numbers for indicating Megs and Gigs of bytes respectively. -Xms indicates the minimum and -Xmx the maximum.)))

    Make sure the "Start In" line of the shortcut is pointed at where ever you installed d20pro..
    "C:\Program Files (x86)\MindGene\d20Pro"

    by using this method, you'll also have access to "Compatibility Mode & Run as Admin" (tab)...
     
  19. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    The above should help with issue one (java & memory)... issue two "access denied" win8 permissions... Win8 is foobarred when it comes to this.. it's overly aggressive and a real pain in the backside.. You have 2 choices ... either navigate to where you installed d20pro...

    C:\Program Files (x86)\MindGene

    right click the d20pro folder, select properties.. then select the "security" tab... then edit permissions... give full control (check all boxes) to all access levels..

    the alternative and better choice is to install d20pro outside of "\Program Files (x86)\"... to something like C:\d20pro\ ...doesn't complete get around all permission issues, but stops a lot of it ...
     
  20. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    yeah it is, see my comments above
     

Share This Page