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

crash/kick #1

Open
1 task
spaghettube opened this issue Jan 20, 2023 · 13 comments
Open
1 task

crash/kick #1

spaghettube opened this issue Jan 20, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@spaghettube
Copy link

Describe the bug
game crash or singleplayer kick

To Reproduce
Steps to reproduce the behavior:
its kind of random but just loading the world or even moving a bit may crash the game

Expected behavior
not crashing

Screenshots
no

Runtime info (please complete the following information):

  • OS: Windows
  • Minecraft version: 1.19.2
  • Mod version: 1.0.1
  • Mod branch: (fill this if you are not using the default ver branches) dk what this is

Crash reports / logs
https://pastebin.com/n83vdjCq

Other mods
https://pastebin.com/WceV1BT1

Checklist

  • [x ] I am using the official version of the mod.
  • I tried the latest development version but the issue persists.
  • [x ] I searched for similar open issues and could not find an existing bug report on this.

Additional context

im using loads of other mods, also im sure its your mod the culprit because ive tried binary splitting to scout out which one it was, even though the crash/kick is kind of inconsistent

@spaghettube spaghettube added the bug Something isn't working label Jan 20, 2023
@ishland
Copy link
Collaborator

ishland commented Jan 21, 2023

@ishland ishland added the question Further information is requested label Jan 21, 2023
@spaghettube
Copy link
Author

[21:50:01] [Render thread/INFO]: Animated skins loaded and ready to use!
[21:50:02] [Render thread/INFO]: Reloading entity icon resources...
[21:50:02] [Render thread/INFO]: Done!
[21:50:02] [Render thread/INFO]: Started 2 worker threads
[21:50:02] [Render thread/WARN]: Shader 953babc61b7d3bc9bfd95a62e6dc933dc8629aeb could not find uniform named subpixel_amount in the specified shader program.
[21:50:02] [Render thread/INFO]: Loaded 75 advancements
[21:50:02] [Render thread/INFO]: Found Player {Tigersenpai} with texture features in skin.
[21:50:02] [Netty Local Client IO #0/ERROR]: Exception occurred in netty pipeline
java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Thread[Render thread,10,main], current: Thread[Netty Local Client IO #0,5,main])
	at com.ishland.uwrad.common.CheckedThreadLocalRandom.method_43156(CheckedThreadLocalRandom.java:32) ~[unsafe-world-random-access-detector-1.0.0.jar:?]
	at net.minecraft.class_6566.method_43055(class_6566.java:43) ~[client-intermediary.jar:?]
	at net.minecraft.class_638.handler$gfn000$onPlaySound(class_638.java:6648) ~[client-intermediary.jar:?]
	at net.minecraft.class_638.method_43207(class_638.java) ~[client-intermediary.jar:?]
	at net.minecraft.class_638.method_8465(class_638.java:464) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_11146(class_634.java:1669) ~[client-intermediary.jar:?]
	at net.minecraft.class_2767.method_11895(class_2767.java:91) ~[client-intermediary.jar:?]
	at net.minecraft.class_2767.method_11054(class_2767.java:10) ~[client-intermediary.jar:?]
	at qouteall.imm_ptl.core.network.PacketRedirectionClient.handleRedirectedPacketFromNetworkingThread(PacketRedirectionClient.java:67) ~[imm_ptl_core-2.2.5-d20ad637191bf446.jar:?]
	at qouteall.imm_ptl.core.network.PacketRedirection.do_handleRedirectedPacketFromNetworkingThread(PacketRedirection.java:93) ~[imm_ptl_core-2.2.5-d20ad637191bf446.jar:?]
	at net.minecraft.class_2658.handler$gdc000$onHandle(class_2658.java:595) ~[client-intermediary.jar:?]
	at net.minecraft.class_2658.method_11457(class_2658.java) ~[client-intermediary.jar:?]
	at net.minecraft.class_2658.method_11054(class_2658.java:8) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.method_10759(class_2535.java:167) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.method_10770(class_2535.java:152) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.channelRead0(class_2535.java:50) ~[client-intermediary.jar:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.local.LocalChannel.readInbound(LocalChannel.java:299) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:445) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:50) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:403) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.77.Final.jar:?]
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
[21:50:02] [Server thread/INFO]: Tigersenpai lost connection: Disconnected
[21:50:02] [Server thread/INFO]: Tigersenpai left the game
[21:50:02] [Netty Local Client IO #0/INFO]: Saving grave backup data
[21:50:02] [Server thread/INFO]: Disconnecting client Tigersenpai
[21:50:02] [Server thread/INFO]: Stopping singleplayer server as player logged out
[21:50:02] [Server thread/INFO]: Stopping server
[21:50:02] [Server thread/INFO]: Saving players
[21:50:02] [Server thread/INFO]: Saving worlds

this appeared in the log as soon as i tried to create a new singleplayer world, is this what you were looking for?

@ishland
Copy link
Collaborator

ishland commented Jan 22, 2023

Yeah and a mod seems to be broken by some non-standard sound handling behavior of rsls.
Try adding -Dmixin.debug.export=true to jvm flags, reproduce the crash then provide .mixin.out/class/net/minecraft/class_638.class

@spaghettube
Copy link
Author

class_638.zip
3 different 638 class files came up, github wouldnt let me upload because of an unsopported file type

@ishland
Copy link
Collaborator

ishland commented Jan 22, 2023

So it crashed in immersive portals at here.
A possible workaround is to turn off enableCrossPortalSound.
You may want to report to immersive portals.

@spaghettube
Copy link
Author

got it, will do, thanks!

@qouteall
Copy link

@ishland How do you think this can be fixed?

@ishland ishland removed the question Further information is requested label Jan 23, 2023
@ishland
Copy link
Collaborator

ishland commented Jan 23, 2023

@ishland How do you think this can be fixed?

In newer versions of Minecraft the vanilla sound packet from the server actually include a seed. I don't think regenerating a seed on client-side is a good idea because it is not going to be vanilla parity.

@qouteall
Copy link

I see. Forgot to update old code when mc upgrades. Should be fixed in the next version of ImmPtl.

@qouteall
Copy link

qouteall commented Feb 5, 2023

The packet handling should normally occur in client thread, so accessing the random won't cause an issue. However the packet is acually handled from networking thread. This may be caused by other optimization mods.

@qouteall
Copy link

qouteall commented Feb 5, 2023

As I tested, ImmPtl 2.4.9 with RLSL in MC 1.19.3 does not crash.

@ishland
Copy link
Collaborator

ishland commented Feb 5, 2023

The packet handling should normally occur in client thread, so accessing the random won't cause an issue. However the packet is acually handled from networking thread. This may be caused by other optimization mods.

The packet handler is called from the networking thread as described here

However, you cannot draw the highlight box immediately. This is because the receiver is called on the netty event loop. The event loop runs on another thread, and you must draw the highlight box on the render thread.

@qouteall
Copy link

qouteall commented Feb 5, 2023

@ishland Yes I know that the packet apply is invoked on networking thread. In the vanilla packet handling code, NetworkThreadUtils.forceMainThread will throw an exception on networking thread and then add it into a queue to handle it on client thread. So the actual handling code is invoked on client thread.

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

No branches or pull requests

3 participants