cpburnz / minecraft-prometheus-exporter

Prometheus exporter for Minecraft.
MIT License
44 stars 8 forks source link

Minecraft 1.18.2 Forge Crash on Vault Hunters 3 Crash on Start #19

Closed Aiidoneus closed 4 months ago

Aiidoneus commented 4 months ago

Hello, Thank you for all that you did to get this working on 1.18.2! All of my 1.18.2 server on our network work besides Vault Hunters 3 modpack for whatever reason.

https://www.curseforge.com/minecraft/modpacks/vault-hunters-1-18-2

Here is the crash report:

https://gist.github.com/Aiidoneus/60becb44fb1289d968919db91e49c029

Is this something that can be fixed?

cpburnz commented 4 months ago

Thanks for the report. It looks like the tick event on two different "vault" dimensions overlapped. I didn't think it was possible for dimensions ticks to overlap. I'll make an adjustment to support overlapping dimension ticks because I suspect it's an implementation quirk of iskallia.vault.world.data.VirtualWorlds which initiated the tick.

cpburnz commented 4 months ago

I have a fix implemented here if the problem is what I think it is. Can you try it out?

Aiidoneus commented 4 months ago

I have a fix implemented here if the problem is what I think it is. Can you try it out?

I can try it out! Give me 20 minutes as I am setting this up right now! I will let you know what comes of it!

Aiidoneus commented 4 months ago

Hello, I got this crash again. Seems pretty similar?

https://gist.github.com/Aiidoneus/6ec7f6eb33316304bc5d494d34cd172a

cpburnz commented 4 months ago

In that case the problem is the dimension ticks are not properly being ended (no end tick event), which would give the appearance of overlapping ticks.

cpburnz commented 4 months ago

Try this version here. Instead of throwing an IllegalStateException, it will log a DEBUG level message.

Depending on how badly behaved the ticks are on "vault" dimensions, the "logs/debug.log" file could grow quickly. There should be a way to ignore them by configuring log4j2 but I haven't figured that out yet. If that turns out to be too cumbersome, I'll add an option to the config file to disable the messages.

Aiidoneus commented 4 months ago

Try this version here. Instead of throwing an IllegalStateException, it will log a DEBUG level message.

Depending on how badly behaved the ticks are on "vault" dimensions, the "logs/debug.log" file could grow quickly. There should be a way to ignore them by configuring log4j2 but I haven't figured that out yet. If that turns out to be too cumbersome, I'll add an option to the config file to disable the messages.

Sounds good! I will be testing it here in a little bit. I will let you know what comes of this!

Aiidoneus commented 4 months ago

I can probably figure out the Log4J stuff myself. Might be a good idea though to add it for other people if they do tend to use it. Not sure how many people would need it though.

Otherwise, I have tested this and seems to be working as intended!

cpburnz commented 4 months ago

Great! I skimmed the Vault Hunters mod code, and it does implement its own dimensions (virtual worlds) and multi-threads them (based on some setting). It didn't look like start/end tick events should be skipped but based on the crashes some must.

Aiidoneus commented 4 months ago

Going to keep this open for the possibility to have a setting to disable the debug message then. Thank you for the support!

cpburnz commented 4 months ago

I've just released v1.2.0 (Github, Curse Forge). You can now disable the debug message by setting collector.mc_dimension_tick_errors to "IGNORE" in world/serverconfig/prometheus_exporter-server.toml.