Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

MewnBase

Space-cat crafting/survival game with base building. · By Cairn4

[BUG] Game crashes seemingly because too many modules lose oxygen

A topic by jmschr created Jul 14, 2020 Views: 243 Replies: 2
Viewing posts 1 to 3

Hello! 

Great game. Rather than accept that I've beaten the tutorial, I've decided to build an empire on the Mewn. I am now day 560 and have a very large main base as well as several mining colonies. The resulting sprawl contains a large number of base modules (I don't know exactly but I'd estimate well over 100), and so every day many of them lose oxygen. The number of base modules has gotten to the point where, at the beginning of the day, the game will either lag a lot and then display a flurry of "Base is losing oxygen messages," or crash.  During the day the game seems to run fine mostly without lag, though it will slow down occasionally.

I went through all the options that users can mess with, trying to find a setting to either turn down or turn off the oxygen leaks. Is there a way to do that? I could confirm that processing the leaks is causing the issue that way.

Here is the crashlog.

MewnBase Crashlog v0.51
Build 5
2020-7-13_12.17.23AM
Itch.io Version
amd64 | Windows 10 | 10.0

data/

Current save: CROOKSHANKS
data/

OutOfMemoryError: Java heap space
java.util.Arrays.copyOfRange(Arrays.java:3664)
java.lang.StringBuffer.toString(StringBuffer.java:669)
java.io.StringWriter.toString(StringWriter.java:210)
com.badlogic.gdx.utils.Json.toJson(Json.java:236)
com.badlogic.gdx.utils.Json.toJson(Json.java:224)
com.cairn4.moonbase.GameLoader.writeWorldDataFile(GameLoader.java:309)
com.cairn4.moonbase.GameLoader.saveGame(GameLoader.java:199)
com.cairn4.moonbase.ui.PausePopup$3.clicked(PausePopup.java:144)
com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:59)
com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:351)
com.badlogic.gdx.InputMultiplexer.touchUp(InputMultiplexer.java:124)
com.badlogic.gdx.InputMultiplexer.touchUp(InputMultiplexer.java:124)
com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:86)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Input.update(Lwjgl3Input.java:205)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:390)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:137)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:111)
com.cairn4.moonbase.desktop.DesktopLauncher.main(DesktopLauncher.java:62)

Thanks!

Developer

It looks like the game's running out of memory when it's saving.  

You could try upping the amount of memory that the game can use - open the "config.json" file in the same folder as the exe. It should look like this:

{
  "classPath": [
    "game/desktop-1.0.jar"
  ],
  "mainClass": "com.cairn4.moonbase.desktop.DesktopLauncher",
  "vmArgs": [
    "-Xmx1G"
  ]
}
The line "-Xmx1G" is the max Java heap size (1 GB) -  you can try increasing that to see it it runs smoother and crashes less often.  Like to set the max to 4 GB, make it say "- Xmx4G"

That seems to have fixed the issue. The game is running very smoothly now. Thanks!