Fixes a crash on Windows caused by low default memory (512MB). Increasing default memory to 2GB. This amount of memory is needed for the highest scaling+zoom level+map size.

This commit is contained in:
Stian Grenborgen 2022-04-30 17:18:34 +02:00
parent bb8f3e4db3
commit 60118bbf97
5 changed files with 9 additions and 9 deletions

View File

@ -529,7 +529,7 @@
name="FreeCol"
mainclass="${freecol.main.class}"
version="${freecol.version}"
vmoptions="-Xmx1G -Dapple.awt.fakefullscreen=true"
vmoptions="-Xmx2G -Dapple.awt.fakefullscreen=true"
jvmversion="1.11+"
arguments="--windowed --freecol-data FreeCol.app/Contents/Resources/"
stubfile="${freecol.build.dir}/skeletons/universalJavaApplicationStub"
@ -962,7 +962,7 @@
<!-- This is a shortcut for NetBeans, and possibly other IDEs. -->
<target name="run" depends="package" description="Runs the game">
<java jar="FreeCol.jar" fork="true">
<jvmarg value="-Xmx1G" />
<jvmarg value="-Xmx2G" />
</java>
</target>

View File

@ -15,13 +15,13 @@
<embeddedJar>false</embeddedJar>
<executableName>freecol.exe</executableName>
<iconLocation>../packaging/icons/freecol.ico</iconLocation>
<initialMemoryHeap>134217728</initialMemoryHeap>
<initialMemoryHeap>1073741824</initialMemoryHeap>
<javaProperties>
<name>sun.java2d.d3d</name>
<value>false</value>
</javaProperties>
<mainClassName>net.sf.freecol.FreeCol</mainClassName>
<maximumMemoryHeap>536870912</maximumMemoryHeap>
<maximumMemoryHeap>2147483647</maximumMemoryHeap>
<maximumVersion></maximumVersion>
<minimumVersion>1.8</minimumVersion>
<skeletonName>Windowed Wrapper</skeletonName>

View File

@ -51,10 +51,10 @@ the directory where you executed the 'ant' command (in case you
downloaded the source package).
Make sure the file named 'FreeCol.jar' is in your current directory.
Execute the command 'java -Xmx1G -jar FreeCol.jar'
Execute the command 'java -Xmx2G -jar FreeCol.jar'
Windows users may need to execute
'java -Xmx1G -cp . -jar FreeCol.jar'
'java -Xmx2G -cp . -jar FreeCol.jar'
In case the command could not be found, check your Java installation
and make sure that the java (*nix) or java.exe (Windows) file is in

View File

@ -1 +1 @@
java -Xmx1G -Dsun.java2d.d3d=false -jar FreeCol.jar %*
java -Xmx2G -Dsun.java2d.d3d=false -jar FreeCol.jar %*

View File

@ -79,7 +79,7 @@ fi
# Clean up the data argument and run.
if test "x${FCDAT}" = "xDONTSET!" ; then
exec java -Xmx1G -cp "${FCJAR}" net.sf.freecol.FreeCol ${1+"$@"}
exec java -Xmx2G -cp "${FCJAR}" net.sf.freecol.FreeCol ${1+"$@"}
else
exec java -Xmx1G -cp "${FCJAR}" net.sf.freecol.FreeCol --freecol-data "${FCDAT}" ${1+"$@"}
exec java -Xmx2G -cp "${FCJAR}" net.sf.freecol.FreeCol --freecol-data "${FCDAT}" ${1+"$@"}
fi