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

Using Integrated terminal causes client side disconnects after terminals have been in use for a while (PacketCodecException) #112

Closed
Panthe1 opened this issue Nov 22, 2023 · 10 comments

Comments

@Panthe1
Copy link

Panthe1 commented Nov 22, 2023

Issue type:

  • 🐛 Game kicks user when using any of the variants of the integrated terminal

Short description:

Accessing an integrated terminal that is connected to a logic cable/ logic network results in an error along with the user begin disconnected from server. Terminal has to be connected and in use for some time ( time it takes to actually produce error is a constant variable. )

Steps to reproduce the problem:

  1. In and world, place down a logic cable and a terminal and right click it, when clicking it you will get a cyclops error and disconnected.

Time it takes to reproduce this error is a variable and I did not take a count of how long it takes, I can provide world file if that would help

Expected behaviour:

When right clicking the storage terminal it should open and show inventory.


Versions:

  • This mod: 1.20.1-1.4.11
  • Minecraft: 1.20.1
  • Forge: 47.1.3

Log file:

Client log files: https://mclo.gs/vHdMjMm
Server Log file: https://mclo.gs/pNki2ne

@rubensworks
Copy link
Member

Could you share the error message? I don't see it anywhere in the logs.

@Panthe1
Copy link
Author

Panthe1 commented Nov 22, 2023 via email

@rubensworks
Copy link
Member

Ok, that's the one I need! :-)

Do you have a log file where you see more details of this error message (PacketCodecException)?
Your earlier logfile only contained partial information.
There should be a full stacktrace somewhere.

@katomaro
Copy link

Chippin in after a player on a server I host for friends made the terminal and would crash when trying to use it.

Our server is a custom instance of ATM 9 xxx.21 (some added mods really, nothing that should really interact with it).
It is claim independent and always happens on SERVERS, not too familiar with how Minecraft's "Internal Server" works, but I asked him to try messing around with the mod on Singleplayer and it worked fine.

I did some digging on server files and found this SERVER/config/integratedterminals-common.toml:
#The maximum number of terminal storage instances that can be sent in a single packet. Reduce this when you have packet overflows. terminalStoragePacketMaxInstances = 1024

Since the error just reads Internal Exception: org.cyclops.cyclopscore.network.PacketHandler$PacketCodecException: An exception occurred during decoding of packet org.cyclops.integratedterminals.network.packet.TerminalStorageIngredientCraftingOptionsPacket@79242032 I figured it had to do with packets so I changed the value on the config from 1024 to 128 (@Panthe1 try this), and it seems to work fine, my friend is able to now use his terminal and link up stuff and all.

There's really no StackTraces anywhere, looked on all server logs and also on client logs to try and add to this issue, best I could get after I right clicked and got the insta-kick was the generic disconnect due packet decoding or whatever. Hope this helps in some way, not sure of the implications of my temporary fix yet, but it is working, this came out after a lot of testing between other mods and all of that.

@rubensworks
Copy link
Member

Thanks for sharing your insights @katomaro!
I'll look into lowering the default value for terminalStoragePacketMaxInstances.

@katomaro If you lower it to a higher value, e.g. 512, does it still work on your end?

@LyraelRayne
Copy link

I am having the same issue on an ATM9 server. I was fine using integrated terminals for quite a while, but recently I added the following setup (not sure if it caused the issue, but I had the crash immediately upon trying to test this setup):

image

And now I can't interact with any terminal, otherwise I get the PacketCodecException. This includes a terminal on a network by itself with no interfaces

image

I am not an operator on the server, so I can't immediately test the new setting, but I'll ask the owner later on whether they'll test it with 512.

@katomaro
Copy link

@rubensworks Good morning!
I just woke up and asked players if I could do a quick restart to try changing the value for terminalStoragePacketMaxInstances from 128 to 512 as asked, and asked the player in question to try adding stuff and removing things, after a 5 minutes testing session of opening stuff and adding resources and all of that, it seems like it works fine, if crashes happens I guess I will lower it to 258...?

Again, I am really not sure what are the implications of this change, but hey, seems like a fix in my eyes for the time being.

I should note that our server is still quite small as its a "friends" thing (albeit public), but I am not sure if errors would start showing up on with more and more items added to chests/network, I expect it to at least have some freezing happening in the long run, but honestly, to be expected since we are playing with ATM. Again, thanks for the mod and attention.

@rubensworks
Copy link
Member

Thanks for checking @katomaro! I'll look into changing the default value of terminalStoragePacketMaxInstances to 512 in the next update.

Again, I am really not sure what are the implications of this change, but hey, seems like a fix in my eyes for the time being.

The only impact will be that when opening terminals over very large networks, slightly more network packets will be sent. But players should experience no changes because of this.

@LyraelRayne
Copy link

The owner of the server I was running on set theirs to 256 which also fixed the issue (as we'd expect, knowing that 128 and 512 both work)

@katomaro
Copy link

katomaro commented Dec 2, 2023

Got the ping on my e-mail, a couple days ago I updated our ATM9 server to .24 which adds a couple more items and recipes and the issue is back, changing terminalStoragePacketMaxInstances to 128 even didn't fix. I didn't mess around with it anymore as people decided to use another storage mod rather than relying on brain work to try and fix it, but I suspect that the issue now might be related to terminalStoragePacketMaxRecipes, by logic, I think increasing the value might fix it (since basically what changed was the addition of recipes), but I haven't had time to test it myself as people are playing all the time and I can't just restart the server at will. Same behavior as before, works fine on single player, on multiplayer gives the generic disconnect. Needs to be looked into further @rubensworks. If I get some free window with no one playing I will try to check it out, but so far, this is all the info I got. Nothing really useful on logs.

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

No branches or pull requests

4 participants