Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on invalid config value type #869

matthi4s opened this issue Mar 17, 2018 · 0 comments

Crash on invalid config value type #869

matthi4s opened this issue Mar 17, 2018 · 0 comments


Copy link

@matthi4s matthi4s commented Mar 17, 2018

Glowstone build: 2018.3.0-SNAPSHOT.98b00f3 (MC: 1.12.2)

After searching for a problem with Glowstone server starts, I've discovered a bug in our system, which sets all lines with only monsters: in it to monsters: true/false. Glowstone completely crashes on start because of this (see output below) and doesn't even log anything, which makes it hard to find the issue. I don't know if the server should start when the config is invalid (reading it seems that it should only warn and use the default value), but it should probably still log the error and maybe give an information about the invalid option to simplify the debugging here.

To reproduce:

Set a glowstone.yml config option to an invalid type (e.g. set creatures.limit.monsters to true)


22:37:28 [INFO] This server is running Glowstone version 2018.3.0-SNAPSHOT.98b00f3 (MC: 1.12.2) (Implementing API version 1.12.2-R2.0-SNAPSHOT)
22:37:29 [SEVERE] Error during server startup.
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Integer
	at java.util.function.Predicate.lambda$or$2(
	at net.glowstone.util.config.ServerConfig.load(
	at net.glowstone.GlowServer.loadConfig(
	at net.glowstone.GlowServer.(
	at net.glowstone.GlowServer.createFromArguments(
	at net.glowstone.GlowServer.main(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants