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

[BUG] Game rendering freeze when joing loyisa #3943

Open
commandblock2 opened this issue Sep 17, 2024 · 4 comments
Open

[BUG] Game rendering freeze when joing loyisa #3943

commandblock2 opened this issue Sep 17, 2024 · 4 comments
Assignees
Labels
🐛 bug Something isn't working 👷 development build development build issue 🌑 nextgen

Comments

@commandblock2
Copy link
Contributor

commandblock2 commented Sep 17, 2024

LiquidBounce Branch

Nextgen

LiquidBounce Build/Version

git-2aa367e

Operating System

Linux

Minecraft Version

1.21.1

Describe the bug

When I joined the loyisa server I see my game rendering freeze but the chat(log) and the sound works. This does not reliably reproduce and sometime it's after you have a few normal frames in the server already but other time it stucks in the loading terrain ui. Happens like 80% of the time for me, I am on KDE/wayland/mesa/intel, also tested with proprietary nvidia driviers.
Oddly enough, loyisa is the only server had this happening for me

Steps to reproduce

  • Modify build.gradle to include viafabricplus to include the mod in launch
  • Launch LiquidBounce with Intellij idea
  • Join mc.loyisa.cn if it doesn't reproduce then join another server and comeback and join mc.loyisa.cn

Client Log

Github says the comment can't be longer than 65536 so I put it here instead,
https://privatebin.net/?6e9f22e9a7e93e76#2q1NtJMS6gFiwo3NNMg6Tjp1UsbUgtipUhZiuiF3HtNh

Screenshots

stuck.mp4

Listen to the audio in this attachment.

@github-actions github-actions bot added 🌑 nextgen 🐛 bug Something isn't working 👷 development build development build issue labels Sep 17, 2024
@commandblock2
Copy link
Contributor Author

commandblock2 commented Sep 17, 2024

I put a log point Breakpoint reached at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1166) (the start of the render function, line 1214 after genSources) here, this log point can be reached when I am in other servers, but when I am in loyisa's setting server it's not reached.

@commandblock2
Copy link
Contributor Author

It maybe is a bit of misleading to say that the break point can not be reached at all, it is actually somehow stuck in the render function executing a task (looks like a StorageESP one), here is the thread dump,

"Render thread@1" tid=0x1 nid=NA runnable
  java.lang.Thread.State: RUNNABLE
	  at net.ccbluex.liquidbounce.features.module.modules.render.ModuleStorageESP$StorageScanner.invalidateChunk(ModuleStorageESP.kt:234)
	  at net.ccbluex.liquidbounce.utils.block.WorldChangeNotifier.chunkDeltaUpdateHandler$lambda$3$lambda$2(WorldChangeNotifier.kt:43)
	  at net.ccbluex.liquidbounce.utils.block.WorldChangeNotifier$$Lambda/0x00007fad09744cc0.invoke(Unknown Source:-1)
	  at net.ccbluex.liquidbounce.utils.block.WorldChangeNotifier.notifyAllSubscribers(WorldChangeNotifier.kt:76)
	  - locked <0x8b85> (a java.util.ArrayList)
	  at net.ccbluex.liquidbounce.utils.block.WorldChangeNotifier.chunkDeltaUpdateHandler$lambda$3(WorldChangeNotifier.kt:42)
	  at net.ccbluex.liquidbounce.utils.block.WorldChangeNotifier$$Lambda/0x00007fad091b4298.invoke(Unknown Source:-1)
	  at net.ccbluex.liquidbounce.event.EventManager.callEvent(EventManager.kt:197)
	  at net.minecraft.client.network.ClientPlayNetworkHandler.handler$bpm000$liquidbounce$onChunkDeltaUpdateEnd(MixinClientPlayNetworkHandler.java:78)
	  at net.minecraft.client.network.ClientPlayNetworkHandler.onChunkDeltaUpdate(ClientPlayNetworkHandler.java:701)
	  at net.minecraft.network.packet.s2c.play.ChunkDeltaUpdateS2CPacket.apply(ChunkDeltaUpdateS2CPacket.java:77)
	  at net.minecraft.network.packet.s2c.play.ChunkDeltaUpdateS2CPacket.apply(ChunkDeltaUpdateS2CPacket.java:36)
	  at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils.java:27)
	  at net.minecraft.network.NetworkThreadUtils$$Lambda/0x00007fad0962c9c8.run(Unknown Source:-1)
	  at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor.java:140)
	  at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor.java:24)
	  at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor.java:114)
	  at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor.java:103)
	  at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1233)
	  at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:885)
	  at net.minecraft.client.main.Main.main(Main.java:228)
	  at java.lang.invoke.LambdaForm$DMH/0x00007fad08294000.invokeStaticInit(LambdaForm$DMH:-1)
	  at java.lang.invoke.LambdaForm$MH/0x00007fad08009400.invokeExact_MT(LambdaForm$MH:-1)
	  at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	  at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	  at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	  at java.lang.invoke.LambdaForm$DMH/0x00007fad08005c00.invokeStatic(LambdaForm$DMH:-1)
	  at java.lang.invoke.LambdaForm$MH/0x00007fad08009400.invokeExact_MT(LambdaForm$MH:-1)
	  at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

@commandblock2
Copy link
Contributor Author

commandblock2 commented Sep 17, 2024

If I change

private val chunkUpdateQueue = ArrayBlockingQueue<UpdateRequest>(600)
to private val chunkUpdateQueue = ArrayBlockingQueue<UpdateRequest>(6000) the game will freeze after a few minutes of playing. Putting log points here
fun enqueueChunkUpdate(request: UpdateRequest) {
this.chunkUpdateQueue.put(request)
}
does indicate that it keeps growing and the game freezes when it reaches 6000, it's some times do decrease to 5999 but it is probably because of the ChunkScannerThread cannot keep up with this update request

@commandblock2
Copy link
Contributor Author

Looks like this is happening because loyisa puts way too many beds in it's map and the ModuleBedPlates listens for block changes and this part is called when doing the chunk scan. The visualvm profile is attached, look for the ChunkScannerThread, which might be a bit difficult to find
snapshot-1726583221997.nps.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 👷 development build development build issue 🌑 nextgen
Projects
None yet
Development

No branches or pull requests

2 participants