-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
World generation crashes the server #52
Comments
[05:51:22] [Region Scheduler Thread #6/INFO]: Checking version, please wait... the crash still occurs |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: masmc05 <masmc05@gmail.com>
Date: Thu, 20 Apr 2023 20:37:35 +0300
Subject: [PATCH] TempFix
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 2fbfdf1fdba12417e2dbca041b9c7e29af27d02d..39408e5df67464843c6c37524ebf078f6fb9cc91 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -449,7 +449,7 @@ public abstract class ChunkGenerator {
crashreportsystemdetails = crashreport1.addCategory("Feature");
Objects.requireNonNull(supplier1);
crashreportsystemdetails.setDetail("Description", supplier1::get);
- throw new ReportedException(crashreport1);
+ //throw new ReportedException(crashreport1);
}
}
}
I'll pray that this won't break anything else, because it's a huge problem now, crashes became too often |
@masmc05 Could you give this diff a try? I don't think we want to be accessing captured states from world gen threads (this is a CB issue and is probably present on Paper as well in the form of a thread safety issue instead of an error). diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index f4c4951f8..2f94a2467 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -515,7 +515,7 @@ public class LevelChunk extends ChunkAccess {
return null;
} else {
// CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
- if (!this.level.isClientSide && doPlace && (!this.level.getCurrentWorldData().captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Folia - region threading
+ if (!this.level.isClientSide && doPlace && (!io.papermc.paper.util.TickThread.isTickThread() || !this.level.getCurrentWorldData().captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Folia - region threading
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
}
@@ -562,7 +562,7 @@ public class LevelChunk extends ChunkAccess {
@Nullable
public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
// CraftBukkit start
- BlockEntity tileentity = level.getCurrentWorldData().capturedTileEntities.get(pos); // Folia - region threading
+ BlockEntity tileentity = io.papermc.paper.util.TickThread.isTickThread() ? level.getCurrentWorldData().capturedTileEntities.get(pos) : null; // Folia - region threading
if (tileentity == null) {
tileentity = (BlockEntity) this.blockEntities.get(pos);
}
|
The underlying issue is that the world state is being accessed by the world gen threads, which is unacceptable in the first place. |
The returned TE may be in the world, in which case it is unsafe for the current thread to modify or access its contents. Fixes PaperMC#52
Stack trace
https://mclo.gs/LwjfUMD
Plugin and Datapack List
[12:29:00 INFO]: Paper Plugins:
[12:29:00 INFO]: - MiniScoreBoard
[12:29:00 INFO]: Bukkit Plugins:
[12:29:00 INFO]: - Chatty, Chunky, CoreProtect, DiscordSRV, floodgate, FreedomChat, LuckPerms, spark, TAB, Vault
[12:29:00 INFO]: ViaBackwards, ViaVersion
Actions to reproduce (if known)
No response
Folia version
[12:29:13 INFO]: This server is running Folia version git-Folia-"41c5548" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 41c5548)
You are 2 version(s) behind
Download the new version at: https://papermc.io/downloads
Other
i'll try now to update to dddaab9 , but still wanted to report in case if that was not related to this
The text was updated successfully, but these errors were encountered: