Skip to content

Fix startup and runtime crashes (experimental branch)#9606

Merged
Machine-Maker merged 5 commits into
PaperMC:experimentalfrom
BlockyTheDev:fix/experimental/compile-runtime-fixes
Aug 15, 2023
Merged

Fix startup and runtime crashes (experimental branch)#9606
Machine-Maker merged 5 commits into
PaperMC:experimentalfrom
BlockyTheDev:fix/experimental/compile-runtime-fixes

Conversation

@BlockyTheDev
Copy link
Copy Markdown
Contributor

Like written on Discord with @Machine-Maker , here the pull request to fix a startup crash and the runtime crash occuring around three minutes after startup, found while wanting to experiment with the experimental Paper branch.

Changes following things:

  • An erroneous change in the Custom-Potion-Mixes-Patch leading to a server crash at startup
  • A server crash occuring around three minutes after startup, coming from the timings system because of an unexpected exception of the type java.lang.ClassCastException. While doing this I also migrated the code away from using the deprecated class OldEnum, introduced in the (Craft-)Bukkit pull request for enum to class migration for backwards compatibility, used in the EntityType related code of the timings system.

All the code changes were successfully tested through several server startups and several created timings reports (with different worlds and situations).

If i should post pictures of the exceptions, just write and I will post them here.

- The code with '.getKey().getKey().getKey()' looks a bit strange but is necessary so the results on the timings website are the same as before. It gets the key (String) from the NamespacedKey, of the key from the Keyed, from the key of the Map.Entry.
@BlockyTheDev BlockyTheDev requested a review from a team as a code owner August 15, 2023 00:53
Comment thread patches/api/0010-Timings-v2.patch Outdated
@Leguan16
Copy link
Copy Markdown
Contributor

Isn't the timing stuff subject to be replaced with spark? So any changes to that would be kind of a waste of time. Or not?

@BlockyTheDev
Copy link
Copy Markdown
Contributor Author

Isn't the timing stuff subject to be replaced with spark? So any changes to that would be kind of a waste of time. Or not?

Yes it should be replaced in the future as I read, but until it is replaced it should not lead to server crashes. The EntityType change was mainly for the reason that BlockType and EntityType are similiar.

Copy link
Copy Markdown
Member

@Machine-Maker Machine-Maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, looks good.

I skipped the timings stuff cause it is all deprecated, but I didn't realize that it caused a crash so yeah, I guess it should be migrated.

Comment thread patches/api/0010-Timings-v2.patch
@Machine-Maker Machine-Maker merged commit 6dc8e30 into PaperMC:experimental Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants