Giter Club home page Giter Club logo

Comments (4)

masmc05 avatar masmc05 commented on May 18, 2024

[05:51:22] [Region Scheduler Thread #6/INFO]: Checking version, please wait...
[05:51:22] [Thread-66/INFO]: This server is running Folia version git-Folia-"dddaab9" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: dddaab9)
You are running the latest version
Previous version: git-Folia-"41c5548" (MC: 1.19.4)

the crash still occurs

from folia.

masmc05 avatar masmc05 commented on May 18, 2024
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: masmc05 <[email protected]>
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

from folia.

jpenilla avatar jpenilla commented on May 18, 2024

@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);
         }

from folia.

Spottedleaf avatar Spottedleaf commented on May 18, 2024

The underlying issue is that the world state is being accessed by the world gen threads, which is unacceptable in the first place.

from folia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.