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

Entangled chest / tank crash #152

Open
aria1th opened this issue May 3, 2022 · 1 comment
Open

Entangled chest / tank crash #152

aria1th opened this issue May 3, 2022 · 1 comment

Comments

@aria1th
Copy link

aria1th commented May 3, 2022

crash-2022-05-03_15.13.36-server.txt

shortly
java.lang.ClassCastException: class io.github.lucaargolo.kibe.blocks.entangledchest.EntangledChestState cannot be cast to class io.github.lucaargolo.kibe.blocks.entangledtank.EntangledTankState (io.github.lucaargolo.kibe.blocks.entangledchest.EntangledChestState and io.github.lucaargolo.kibe.blocks.entangledtank.EntangledTankState are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @68837a77) at io.github.lucaargolo.kibe.KibeModKt.initExtras$lambda-20(KibeMod.kt:186) ~[kibe-1.9.6-BETA+1.18.jar:?]

It happens when player opens inventory which contains entangled tank & chest binded to player somehow.

@aria1th
Copy link
Author

aria1th commented May 3, 2022

Additional Context : I added try catch phrase and searched what is causing it .

so entangledchest is trying to be casted to entangled tank.

[15:39:17] [Server thread/INFO]: [STDOUT]: entangledchest-35f9507c-d203-48bc-8d8c-bdcd65d6b05b [15:39:17] [Server thread/INFO]: [STDOUT]: 06000000 [15:39:17] [Server thread/INFO]: [STDOUT]: class_3222['AngelBottomless'/458, l='ServerLevel[world]', x=164.46, y=120.38, z=599.98] [15:39:17] [Server thread/INFO]: [STDOUT]: [(entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00000060), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 09000000), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00400000), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00000020), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00b0000f), (entangledtank-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 00a0000f), (entangledchest-35f9507c-d203-48bc-8d8c-bdcd65d6b05b, 06000000), (entangledtank-global, 00000000)]

which came from EntangledTankState.SERVER_PLAYER_REQUESTS, somehow chest is registered to tank state requests, by

       ` EntangledTankState.SERVER_PLAYER_REQUESTS[player] = set`

in fun initPackets()

so it should check if packet really contains valid informations about tanks.
if (!first.contains("chest")){ set.add(Pair(first, second)) }

In conclusion, client is sending packet about 'chest' in tank somehow, then server crashes.

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

No branches or pull requests

1 participant