CC: Tweaked

CC: Tweaked

59M Downloads

```IllegalStateException``` while running cloudcatcher and TLCO

powerboat9 opened this issue ยท 3 comments

commented

Minecraft Version

1.20.x

Version

1.110.1

Details

2024-04-23_18 48 20

This happened while I was AFK on switchcraft. The following files may be relevant:

cloud.lua
startup.lua
prep.lua
lib/homura.lua
lib/hub.lua

commented

I suspect this is just an internal netty error, but we should do a better job of what error we expose to the user.

commented

Internal netty error?

commented

Ahh, managed to get the logs. No, this is a thread-safety issue with multiple classes using the CharsetDecoder. Hadn't properly registered that these are not thread-safe. This should be easy to fix!

java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED
        at java.nio.charset.CharsetDecoder.throwIllegalStateException(Unknown Source) ~[?:?]
        at java.nio.charset.CharsetDecoder.flush(Unknown Source) ~[?:?]
        at java.nio.charset.CharsetDecoder.decode(Unknown Source) ~[?:?]
        at dan200.computercraft.core.apis.http.websocket.WebsocketHandle.send(WebsocketHandle.java:90) ~[cc-tweaked-1.20.1-fabric-1.109.2.jar:?]
        at dan200.computercraft.core.asm.LuaMethodSupplier.lambda$static$0(LuaMethodSupplier.java:27) ~[cc-tweaked-1.20.1-fabric-1.109.2.jar:?]
        at dan200.computercraft.core.lua.BasicFunction.invoke(BasicFunction.java:45) ~[cc-tweaked-1.20.1-fabric-1.109.2.jar:?]
        at org.squiddev.cobalt.function.VarArgFunction.call(VarArgFunction.java:60) ~[cc_tweaked_cobalt-0.8.1-5f38dd5922b07ad.jar:?]