Skip to content
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

Folia issues: Cannot read field "captureTreeGeneration" #192

Closed
RitaSister opened this issue Dec 24, 2024 · 7 comments
Closed

Folia issues: Cannot read field "captureTreeGeneration" #192

RitaSister opened this issue Dec 24, 2024 · 7 comments

Comments

@RitaSister
Copy link

[15:38:20] [Region shutdown thread/INFO]: [GSit] Disabling GSit v1.12.1
[15:38:20] [Region shutdown thread/ERROR]: Error occurred while disabling GSit v1.12.1
java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.Level.getCurrentWorldData()" is null
at net.minecraft.world.level.Level.getBlockState(Level.java:1311) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.craftbukkit.block.CraftBlock.getType(CraftBlock.java:244) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at GSit-1.12.1.jar/dev.geco.gsit.manager.SitManager.removeSeat(SitManager.java:132) ~[GSit-1.12.1.jar:?]
at GSit-1.12.1.jar/dev.geco.gsit.manager.SitManager.removeSeat(SitManager.java:119) ~[GSit-1.12.1.jar:?]
at GSit-1.12.1.jar/dev.geco.gsit.manager.SitManager.clearSeats(SitManager.java:44) ~[GSit-1.12.1.jar:?]
at GSit-1.12.1.jar/dev.geco.gsit.GSitMain.unload(GSitMain.java:178) ~[GSit-1.12.1.jar:?]
at GSit-1.12.1.jar/dev.geco.gsit.GSitMain.onDisable(GSitMain.java:171) ~[GSit-1.12.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugins(PaperPluginInstanceManager.java:161) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugins(PaperPluginManagerImpl.java:97) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:541) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:616) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:1098) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:856) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at io.papermc.paper.threadedregions.RegionShutdownThread.run(RegionShutdownThread.java:135) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]

Looks like a internal server error. GSit just uses "Block.getType()" which is a default method of Spigot/Paper.

I read again this like "internal server error" but you don't understand what I'm running on Folia and how Folia is worked and this not != Paper/Spigot. you can review this or this

@RitaSister
Copy link
Author

another bug

[20:51:26 ERROR]: Could not pass event PlayerToggleSneakEvent to GSit v1.12.1
java.lang.IllegalStateException: Cannot read world asynchronously at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:38) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.craftbukkit.block.CraftBlock.getNMS(CraftBlock.java:80) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.craftbukkit.block.CraftBlock.getBlockData(CraftBlock.java:181) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at GSit-1.12.1.jar/dev.geco.gsit.mcv.v1_21.objects.GCrawl.stop(GCrawl.java:169) ~[GSit-1.12.1.jar:?] at GSit-1.12.1.jar/dev.geco.gsit.manager.CrawlManager.stopCrawl(CrawlManager.java:75) ~[GSit-1.12.1.jar:?]
at GSit-1.12.1.jar/dev.geco.gsit.mcv.v1_21.objects.GCrawl$3.PTogSE(GCrawl.java:86) ~[GSit-1.12.1.jar:?] at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:44) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerCommand(ServerGamePacketListenerImpl.java:2676) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07] at net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket.handle(ServerboundPlayerCommandPacket.java:46) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket.handle(ServerboundPlayerCommandPacket.java:18) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:58) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$2(PacketUtils.java:86) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07] at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:181) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1709) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:540) ~[folia-1.21.1.jar:1.21.1-DEV-2e7bc07]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@gecolay
Copy link
Owner

gecolay commented Dec 30, 2024

The first error is Folia internal and should be fixed by Folia. The second bug can be fixed by GSit and will be fixed with the next update.

@gecolay gecolay closed this as completed Dec 30, 2024
@RitaSister
Copy link
Author

omg, you don't understand me, so I should need fork your project and made full support for Folia.

@RitaSister
Copy link
Author

so you should skip support for folia, because you don't fully understand how folia is work. Thanks for fix)

@gecolay
Copy link
Owner

gecolay commented Dec 30, 2024

so you should skip support for folia, because you don't fully understand how folia is work.

I know how Folia works and that certain things need to be accessed through a special context, such as an entity, async or global context, but the first error message doesn't provide any information about why it fails (other than the fact that a server-internal field is null).

@RitaSister
Copy link
Author

so you should skip support for folia, because you don't fully understand how folia is work.

I know how Folia works and that certain things need to be accessed through a special context, such as an entity, async or global context, but the first error message doesn't provide any information about why it fails (other than the fact that a server-internal field is null).

No, you don't know if you can't fix it because you don't how fix it. Okey.

@gecolay
Copy link
Owner

gecolay commented Dec 30, 2024

@RitaSister If you know everything about Folia, go ahead and open a PR instead of an issue to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants