From 60118bbf978c09f5294a427cb0fcacba963f3495 Mon Sep 17 00:00:00 2001 From: Stian Grenborgen Date: Sat, 30 Apr 2022 17:18:34 +0200 Subject: [PATCH] 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. --- build.xml | 4 ++-- build/startup.jsmooth | 4 ++-- packaging/common/README | 4 ++-- packaging/common/freecol.cmd | 2 +- packaging/common/freecol.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.xml b/build.xml index 2749e235a..63e7a83d4 100644 --- a/build.xml +++ b/build.xml @@ -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 @@ - + diff --git a/build/startup.jsmooth b/build/startup.jsmooth index 2abfeb8c3..57d5599fe 100644 --- a/build/startup.jsmooth +++ b/build/startup.jsmooth @@ -15,13 +15,13 @@ false freecol.exe ../packaging/icons/freecol.ico - 134217728 + 1073741824 sun.java2d.d3d false net.sf.freecol.FreeCol - 536870912 + 2147483647 1.8 Windowed Wrapper diff --git a/packaging/common/README b/packaging/common/README index b0dd1a7ae..72f83af40 100644 --- a/packaging/common/README +++ b/packaging/common/README @@ -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 diff --git a/packaging/common/freecol.cmd b/packaging/common/freecol.cmd index 3a37ba8d1..614c4b977 100644 --- a/packaging/common/freecol.cmd +++ b/packaging/common/freecol.cmd @@ -1 +1 @@ -java -Xmx1G -Dsun.java2d.d3d=false -jar FreeCol.jar %* +java -Xmx2G -Dsun.java2d.d3d=false -jar FreeCol.jar %* diff --git a/packaging/common/freecol.sh b/packaging/common/freecol.sh index 9606991e7..cd6cc91fe 100755 --- a/packaging/common/freecol.sh +++ b/packaging/common/freecol.sh @@ -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