DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
215 stars 107 forks source link

StackOverflowError on server start-up #2286

Closed SlimeDog closed 3 years ago

SlimeDog commented 3 years ago

(I don't Discord)

>version
[22:22:44] [Server thread/INFO]: This server is running CraftBukkit version 3262-Spigot-dc75aca-f0f801e (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
[22:22:44] [Server thread/INFO]: You are running the latest version
>version denizen
[22:22:52] [Server thread/INFO]: Denizen version 1.2.1-SNAPSHOT (build 5817-DEV)
[22:22:52] [Server thread/INFO]: Author: The DenizenScript Team

No changes to configuration or server content is build 5817. On server start-up (with the formatting codes stripped):

Error within error (??!!!! SOMETHING WENT SUPER WRONG!): Internal exception was thrown!
java.lang.StackOverflowError
java.base/java.io.OutputStreamWriter.write(OutputStreamWriter.java:205)
java.base/java.io.BufferedWriter.flushBuffer(BufferedWriter.java:120)
java.base/java.io.PrintStream.write(PrintStream.java:698)
java.base/java.io.PrintStream.print(PrintStream.java:863)
org.apache.logging.log4j.io.internal.InternalPrintStream.print(InternalPrintStream.java:143)
java.base/java.io.PrintStream.println(PrintStream.java:1031)
org.apache.logging.log4j.io.internal.InternalPrintStream.println(InternalPrintStream.java:205)
org.apache.logging.log4j.io.LoggerPrintStream.println(LoggerPrintStream.java:212)
org.bukkit.craftbukkit.v1_17_R1.command.ColouredConsoleSender.sendMessage(ColouredConsoleSender.java:67)
org.bukkit.craftbukkit.v1_17_R1.command.ServerCommandSender$1.sendMessage(ServerCommandSender.java:115)
com.denizenscript.denizen.utilities.debugging.Debug$ConsoleSender.sendMessage(Debug.java:578)
com.denizenscript.denizen.utilities.debugging.Debug.finalOutputDebugText(Debug.java:496)
com.denizenscript.denizen.utilities.debugging.Debug.echoError(Debug.java:241)
com.denizenscript.denizen.utilities.implementation.DenizenCoreImplementation.debugError(DenizenCoreImplementation.java:79)
com.denizenscript.denizencore.utilities.debugging.Debug.echoError(Debug.java:34)
com.denizenscript.denizencore.utilities.CoreUtilities.journallingLoadFile(CoreUtilities.java:818)
com.denizenscript.denizencore.objects.notable.NoteManager.reload(NoteManager.java:155)

then 334 times the following:

com.denizenscript.denizencore.objects.notable.NoteManager.getSaveConfig(NoteManager.java:162)
com.denizenscript.denizencore.objects.notable.NoteManager.loadFromConfig(NoteManager.java:90)
com.denizenscript.denizencore.objects.notable.NoteManager.reload(NoteManager.java:157)
mcmonkey4eva commented 3 years ago

Running dev builds without being on Discord is a bit of a risky move. You should probably stick to release builds.

Need the full log, you snipped out critical information

mcmonkey4eva commented 3 years ago

Did some guesswork and replicated+fixed for build DEV-5820.

If you're unwilling or unable to create an account on the website we use to maintain a changelog and provide support, I strongly recommend sticking to the stable release builds @ https://ci.citizensnpcs.co/job/Denizen/

SlimeDog commented 3 years ago

I supplied the only log information reported for Denizen. The following log lines were irrelevant.

I run plugin test servers. As you well know, I have reported many issues over the years. The fact that I refuse to Discord should not be a limiting factor. I see the change summaries and commits on Jenkins. I have willing provided whatever information is requested in tickets. Since you were able to do the guesswork in 5 minutes, I'm not sure you need more information, but please let me know.

The issue did not recur with b5819 or b5820. Interestingly, b5820 reports no changes from b5819.

SlimeDog commented 3 years ago

I thought my testing was contributing useful information to your team, but apparently not. As you request, I will henceforth test only Denizen REL builds.

mcmonkey4eva commented 3 years ago

The following log lines were irrelevant. You did in fact snip out relevant information. Though no as the issue was already traced by guesswork, it's not needed anymore. General rule of thumb to go by: if you knew exactly what information was needed, you wouldn't be posting here you'd be fixing it yourself. See also https://wiki.citizensnpcs.co/Logs#Should_I_Edit_Or_Trim_The_Logs.3F

Interestingly, b5820 reports no changes from b5819. the change that fixed it was a core commit, so it's listed on DenizenCore not Denizen_Developmental. The issue did not recur with b5819 or b5820 it was a legacy file format compatibility issue, so after the first failed load it resaves and was gone regardless of updating (the old format stored an empty file if there was no Notables data, the modern format removes the file entirely when empty - you had an empty file, and it tried to load that and borked).

The fact that I refuse to Discord should not be a limiting factor. I see the change summaries and commits on Jenkins. these are not the same. For reference, here's the last few days of Discord changelog posts:

As you can see, there was even a specific message about the notes change that is what bit you.

Being able to see these changelogs, as well as discuss them live on Discord, is critical if you want to run the dev builds regularly. Without this live & detailed connection, you have no need for the live unstable builds. The majority of dev builds are made for somebody on Discord.

Also, again, I need to emphasize: Discord is at the most basic just a website you can pop open to look at from time to time, for things like the changelog channel. There's no reason to entirely refuse something so basic. If you don't want to download the app version, or participate in the chatroom parts of it - sure whatever that's your choice. But refusing to even open it to be able to read information that's on it? I can't think of any way to justify that. It's not harmful, it's not invading your privacy, it doesn't cost money, it doesn't support any monopolistic corporations, it doesn't require installing software or large downloads, ... I got nothing.