DailyStruggle / RTP

fun with spatial math
25 stars 6 forks source link

[BUG] rtp randomly stops working with no error #34

Closed Paradis4432 closed 1 year ago

Paradis4432 commented 1 year ago

Describe the bug At some point in the server rtp stops working, command is registered but executing it does nothing, not even an error in console nor chat

Context Java version: 8 Server build: Arclight Server version: 1.16.5 Player version: 1.16.5 Plugins: AlonsoTags-v2.0.7-BETA (1).jar AutomaticBroadcast (1).jar Backpack-2.7.1.jar BanItem-3.4 (4).jar BuycraftX.jar CMI-9.6.1.0.jar CMILib1.3.1.2.jar CMILib1.4.0.0.jar CMILib1.4.0.1.jar Chat Color v1.5.2.jar ChatSentry-5.3.8.jar ChatSharePlugin-1.0.6.jar Citizens (1).jar Citizens.jar CitizensCMD-2.6.12.jar CommandAliases.jar CommandCooldown-2.5.0.jar CoreProtect-21.3.jar DailyRewardsPlus-1.2.5 (1).jar DeluxeMenus-1.13.7-Release.jar DiscordSRV-Build-1.26.2.jar DiscordSRV-Staff-Chat-1.4.4.jar EverNifeCore-2.0.3.3.jar FastAsyncWorldEdit-Bukkit-1.17-426.jar HeadDatabase-4.17.3.jar ImageMaps.jar KixsAutoAnnouncer-1.3.7.jar LuckPerms-Bukkit-5.4.40.jar MarriageMaster (4).jar Multiverse-Core-4.3.1.jar PhysicsControl (1).jar PixelmonEconomyBridge-1.0.9.jar PlaceholderAPI-2.11.3.jar Plan-5.5-build-2172.jar PluginManager.jar ProtocolLib.jar RTP-2.0.15.jar RTP-MixedSeedFix-1.0-SNAPSHOT (2).jar RandomCommand-1.0.jar SCore-1.7.3.6.jar ShopGUIPlus-1.87.0.jar SimpleStaffChat2-2.7.jar SpecializedCrates-3.3.6.jar TAB v4.0.2.jar TangledMaze-v2.1.0.jar UltimateAutoRestart Build 54a.jar Vault-1.7.3 (2).jar VotingPlugin.jar WorldBorder (2).jar autoLogger-1.1.jar commandtimer-java8.jar griefdefender-bukkit-2.3.9-DEV4.jar item-nbt-api-plugin-2.11.1 (2).jar nuvotifier.jar spark-1.10.34-bukkit.jar

To Reproduce Steps to reproduce the behavior:

  1. Install and wait, sometimes it brakes, sometimes it doesnt

Expected behavior Not brake

Screenshots error when loading https://paste.md-5.net/jujuxoqola.rb

when it "brakes" /rtp command is registered, but it does nothing [16Jul2023 17:11:34.898] [Server thread/INFO] [net.minecraft.network.play.ServerPlayNetHandler/]: Paradis120202 issued server command: /rtp [16Jul2023 17:11:36.528] [Server thread/INFO] [HappyBosses/]: Successfully set Trevenant boss tier to common

when reloading with PM https://paste.md-5.net/mayopudiya.md

DailyStruggle commented 1 year ago

first fix duplicate plugins and check folder write permissions and drive space, one of these looks to be a failure to create a file.

Paradis4432 commented 1 year ago

folder write permissions? why would that change randomly? disk usage is at 67%

DailyStruggle commented 1 year ago

I can't answer that, anything can change file permissions or ownership at any time

DailyStruggle commented 1 year ago

are you able to run administrative commands, e.g. rtp info, when rtp is not able to teleport a player?

Paradis4432 commented 1 year ago

image RTP seems to have the same perms as all other plugins, if not this, what should it be?

Paradis4432 commented 1 year ago

i can run any command yes /rtp info returns no message in chat, but i get this in console: https://paste.md-5.net/ejijufemif.bash

DailyStruggle commented 1 year ago

This is an issue that seems to be caused by a missing implementation of certain classes. This plugin references spigot classes in some places, so arclight might have this sort of issue that would require code restructuring to work.

Paradis4432 commented 1 year ago

from what i know, restarting the server fixes this issue, but shouldn't /pm restart RTP do the same thing?

DailyStruggle commented 1 year ago

runtime plugin loading, e.g. plugman, is notoriously unpredictable

DailyStruggle commented 1 year ago

If you find a way to get this to work on both spigot and arclight, I will test and merge your code changes for CommandsAPI and RTP

DailyStruggle commented 1 year ago

Currently, it probably won't work with general bukkit implementations and I'm surprised it works at all at first startup

DailyStruggle commented 1 year ago

actually, more likely pluginmanager isn't handling dependencies in the same way that the server does at startup.

Paradis4432 commented 1 year ago

yea to fix this i did:

Paradis4432 commented 1 year ago

sorry, this solution doesnt fully work, some values in config files are custom and we would have to set them up every time it crashes, is there a proper solution for this issue?

DailyStruggle commented 1 year ago

there's nothing for me to do without info on how and when it "crashes", and using any sort of plugin manager makes me consider the possibility that your stacktraces are not related to any native issue but caused by attempting to load plugins in clearly unsupported ways.

Paradis4432 commented 1 year ago

i have some start logs from times it doesnt seem to work https://paste.md-5.net/vomicifapu.md , https://paste.md-5.net/ogunupowow.md

DailyStruggle commented 1 year ago

seems there's some sort of issue here - https://github.com/DailyStruggle/RTP/blob/V2/src/main/java/io/github/dailystruggle/rtp/common/configuration/ConfigParser.java#L256

which should have been fixed in the latest patch, that I forgot to push to github until now

Paradis4432 commented 1 year ago

aight so latest version should fix this issue?

DailyStruggle commented 1 year ago

if you aren't using the latest version, an update should help with part (or all) of the problem, as there was also a recent patch for a discovered memory leak

DailyStruggle commented 1 year ago

if you check the version changelog on spigot,

image

the next patch, 2.0.13, covered an issue relating to holding references unnecessarily, which should fix a memory leak 2.0.14 contained fixes for configuration issues 2.0.15 added necessary logs for debugging silent teleportation failures

DailyStruggle commented 1 year ago

If this can be replicated by anyone, lmk how to do so. I won't be able or willing to debug this issue until then.

Paradis4432 commented 1 year ago

i think it fixed itself, i honestly have no idea what caused this, but if i discover it i will let you know