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

Disconnected from server upon receiving certain messages #47

Open
Pablete1234 opened this issue Oct 8, 2024 · 11 comments
Open

Disconnected from server upon receiving certain messages #47

Pablete1234 opened this issue Oct 8, 2024 · 11 comments
Labels
bug Something isn't working seen Issue has been seen and is probably being worked on

Comments

@Pablete1234
Copy link

Pablete1234 commented Oct 8, 2024

[02:00:41] [Render thread/ERROR]: Failed to handle packet class_7439[content=empty[siblings=[literal{ No block in sight! (or too far)}[style={color=light_purple}]]], overlay=false]
java.lang.IndexOutOfBoundsException: Index: 6000, Size: 0
	at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:838) ~[?:?]
	at java.base/java.util.ArrayList.add(ArrayList.java:510) ~[?:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addWrappedComponents(ChatTab.java:243) ~[chatplus-fabric-2.0.2.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:84) ~[chatplus-fabric-2.0.2.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:26) ~[chatplus-fabric-2.0.2.jar:?]
	at com.ebicep.chatplus.events.EventBus$Bus.post(EventBus.java:30) ~[chatplus-fabric-2.0.2.jar:?]
	at com.ebicep.chatplus.events.EventBus.post(EventBus.java:88) ~[chatplus-fabric-2.0.2.jar:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addNewMessage(ChatTab.java:546) ~[chatplus-fabric-2.0.2.jar:?]
	at net.minecraft.class_338.handler$zec000$chatplus$addMessage(class_338.java:660) ~[client-intermediary.jar:?]

This occurs when the same message is sent several times (ie: the messages stack and chatplus just shows them as [Message] (2) ) after it has reached the max chat size, i believe

@ebicep
Copy link
Owner

ebicep commented Oct 8, 2024

What is your mc version and can you send a ss of what you're talking about with the

[Message] (2)

I also see you are using v2.0.2, try updating to the latest version, there were some issues fixed with compacting messages.

@Pablete1234
Copy link
Author

Pablete1234 commented Oct 8, 2024

image
this is what i mean by Message (2)
playing in 1.21.1

@ebicep ebicep added bug Something isn't working seen Issue has been seen and is probably being worked on labels Oct 8, 2024
@ebicep
Copy link
Owner

ebicep commented Oct 15, 2024

Do you have steps to reproduce this issue or does it just happen randomly?

@Pablete1234
Copy link
Author

It doesn't happen consistently, but when it does start happening then its reproducible every time (log in server, get the message twice, instantly get disconnected)
It may require to have had the client open for long enough that some list has filled itself with messages or something alike

@ebicep
Copy link
Owner

ebicep commented Oct 15, 2024

  1. The next time it happens can you post your logs and config
  2. Also, if it happens next time can you try going into single player and resizing the chat window that receives the message then try logging back in and seeing if you still get kicked
  3. You suspected that it had something to do with max chat message limit, if you reduce your limit, does it happen more often?
  4. Do you recall using the Find Message/Bookmark feature anytime prior to the kick?

@Pablete1234
Copy link
Author

  1. sure, will do
  2. sure, will do
  3. I haven't been able to reproduce it again, it could be that 2.1.0 fixed it
  4. It's likely that i did, the bug only happens if i've had my client open for a long while and it's a feature i use every so often

@ebicep
Copy link
Owner

ebicep commented Oct 15, 2024

Added index check + other potential fixes in v2.2.0, problem may still exist and the original message might get deleted (but not compacted) but at least you won't be kicked. Reopen if any more issues.

@ebicep ebicep closed this as completed Oct 15, 2024
@Pablete1234
Copy link
Author

Pablete1234 commented Oct 27, 2024

I have not updated to v2.2.0, and i've managed to reproduce this again in 2.1.0. Minecraft 1.21.1

Logs:

[00:28:19] [Render thread/INFO]: [CHAT]  No block in sight! (or too far)
[00:28:19] [Render thread/INFO]: [CHAT]  No block in sight! (or too far)
[00:28:19] [Render thread/ERROR]: Failed to handle packet class_7439[content=empty[siblings=[literal{ No block in sight! (or too far)}[style={color=light_purple}]]], overlay=false]
java.lang.IndexOutOfBoundsException: Index: 1754, Size: 0
	at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:838) ~[?:?]
	at java.base/java.util.ArrayList.add(ArrayList.java:510) ~[?:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addWrappedComponents(ChatTab.java:252) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:86) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:38) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.events.EventBus$Bus.post(EventBus.java:30) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.events.EventBus.post(EventBus.java:88) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addNewMessage(ChatTab.java:561) ~[chatplus-fabric-2.1.0.jar:?]
	at net.minecraft.class_338.handler$zec000$chatplus$addMessage(class_338.java:657) ~[client-intermediary.jar:?]
	at net.minecraft.class_338.method_44811(class_338.java:216) ~[client-intermediary.jar:?]
	at net.minecraft.class_338.method_1812(class_338.java:208) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44736(class_7594.java:196) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_43596(class_634.java:904) ~[client-intermediary.jar:?]
	at net.minecraft.class_7439.method_43631(class_7439.java:25) ~[client-intermediary.jar:?]
	at net.minecraft.class_7439.method_11054(class_7439.java:11) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:27) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:162) [client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:136) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:121) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1240) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.2.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]

I did use the search function a bit earlier
Modifying the max messages setting (lowering from 95k to 1k) made it stop happening without restarting the client.

Then i could get it to start happening again by bumping up the max messages, filtering chat and searching "asd", then un-filtering, and getting the repeated message, and got kicked again:

[00:33:37] [Render thread/ERROR]: Failed to handle packet class_7439[content=empty[siblings=[literal{ No block in sight! (or too far)}[style={color=light_purple}]]], overlay=false]
java.lang.IndexOutOfBoundsException: Index: 1071, Size: 0
	at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:838) ~[?:?]
	at java.base/java.util.ArrayList.add(ArrayList.java:510) ~[?:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addWrappedComponents(ChatTab.java:252) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:86) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.CompactMessages$1.invoke(CompactMessages.java:38) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.events.EventBus$Bus.post(EventBus.java:30) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.events.EventBus.post(EventBus.java:88) ~[chatplus-fabric-2.1.0.jar:?]
	at com.ebicep.chatplus.features.chattabs.ChatTab.addNewMessage(ChatTab.java:561) ~[chatplus-fabric-2.1.0.jar:?]
	at net.minecraft.class_338.handler$zec000$chatplus$addMessage(class_338.java:657) ~[client-intermediary.jar:?]
	at net.minecraft.class_338.method_44811(class_338.java:216) ~[client-intermediary.jar:?]
	at net.minecraft.class_338.method_1812(class_338.java:208) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44736(class_7594.java:196) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_43596(class_634.java:904) ~[client-intermediary.jar:?]
	at net.minecraft.class_7439.method_43631(class_7439.java:25) ~[client-intermediary.jar:?]
	at net.minecraft.class_7439.method_11054(class_7439.java:11) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:27) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:162) [client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:136) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:121) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1240) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.2.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]

My config:
chatplus-v2.1.0.json

@Pablete1234
Copy link
Author

cc @ebicep, maybe you want to reopen this one

@ebicep ebicep reopened this Oct 29, 2024
@ebicep
Copy link
Owner

ebicep commented Oct 29, 2024

@Pablete1234 so you were able to reproduce the issue everytime? If so can you write the exact steps you took, the one above is unclear to me.

@Pablete1234
Copy link
Author

So i don't have exact reproduction steps on how to get to the situation, but i was on a server for very long so i had a ton of messages in chat, i had filtered chat before, and it happened.

Once it had started happening, i could reliably join the server, hit air twice to get that duplicate message, and get kicked. Every time.
Then i modified the setting of max saved messages, and could not longer reproduce it.
But then i filtered, searched something, unfiltered, and could start replicating it again every time.

So all i know is it is related to filtering, and related to max messages in the chat in some way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working seen Issue has been seen and is probably being worked on
Projects
None yet
Development

No branches or pull requests

2 participants