Integrated Terminals

Integrated Terminals

39M Downloads

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

Panthe1 opened this issue ยท 23 comments

commented

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

commented

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.

commented

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?

commented

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.

commented

@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.

commented

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.

commented

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

commented
commented

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.

commented

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)

commented

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.

commented

I was seeing this with Gravitas 2 0.4.8 which uses Integrated Dynamics 1.23.12, I. Crafting 1.1.9, I. Terminals 1.6.2 and I. Tunnels 1.8.32.

Lowering the value to 512 did not help, also it was set to 1024. I set it to 128 which did help. (I only tried 512 and 128, no other values.)

commented

Those aren't the latest versions. I suggest to update Dynamics and Terminals and trying again. If it then still doesn't work as expected, I suggest to open a new report for it. Considering this issue was fixed a long time ago and the situation might have changed.

commented

Thanks for your reply.

Considering the "fix" consists of nothing but changing the default value, which did not help in this case, I'm not convinced that updating the mods is going to help. But of course I don't know what else might have changed that relates to this issue.

Gravitas2 encourages using ID for storage in the early game. I may be wrong but I think in other packs it's rarely used for this purpose nowadays.

@thevortex maybe you could still consider updating the ID mods in the pack?

Otherwise I'll keep an eye on this in the next pack if I'm using ID for storage. It is a nice early game digital storage option after all.

commented

Thanks for the update @TauPan!

commented

I've decided to test this with more recent mod versions and could not reproduce the error any more.

Old versions:

IntegratedCrafting-1.20.1-1.1.9.jar
IntegratedTerminals-1.20.1-1.6.2.jar
IntegratedDynamics-1.20.1-1.23.13.jar
IntegratedTunnels-1.20.1-1.8.32.jar

New versions:

IntegratedCrafting-1.20.1-1.1.9.jar
IntegratedTerminals-1.20.1-1.6.3.jar
IntegratedDynamics-1.20.1-1.24.2.jar
IntegratedTunnels-1.20.1-1.8.32.jar

(IntegratedDynamics from 1.23.13 to 1.24.2 and IntegratedTerminals from 1.6.2 to 1.6.3)

and tested this with the current default value of 512 and my terminal worked. Before I confirmed it does not work with 512. So this indeed appears to be fixed in more recent versions. Sorry for the noise. (The only commit referencing this ticket was the config change, hence my impression that it was the only change with relation to this problem.)

commented

I'm getting this error on the newest versions of ID, with a simple setup with a single crafting terminal attached to a logic cable.

Image

Image

I don't get any errors in client.log or debug.log. Please let me know where I can find them

commented

@jackschedel Do any of the proposed solutions above solve your problem?

commented

I found that using a mod that increases the packet limit (2MB to 2GB) to help with this issue, I am currently using forge and the mod that helped was "XL Packets". This mod is also on Fabric but not the others from what I know. (not guaranteed fix)

commented

@rubensworks changing terminalStoragePacketMaxInstances to 128 (from default of 512) fixed it.
It's worth noting that this issue happened on the most simple setup imaginable - a single storage vault connected to a single terminal via an item interface:

And after this issue happened, the clientside crash could be recreated by right clicking a terminal connected to nothing! Like below:

commented

@jackschedel Did other (higher) values for terminalStoragePacketMaxInstances also work for you? E.g. 256?
Or was 128 the highest possible value already?

commented

@rubensworks didn't try, went straight to 128 from the default. Sorry I can't help troubleshoot, since that fixed it and I'm not sure how to replicate it. I get this happening with a large system, but it's crazy it happened with such a tiny one xD

commented

Tracking follow-up work in #169

commented

I've tried 128, 512, and 256. I've also tried the XL Packets mod. Changing it tends to fix it for a bit, and then it breaks eventually!