Funky Locomotion

Funky Locomotion

17M Downloads

StackOverflowError (client disconnect) when moving frames

chris54721 opened this issue ยท 23 comments

commented

Mod version: 0.0.3 (MC 1.10.2)
Forge version: 12.18.2.2125
Modpack: All the Mods 1.45

Description
When moving a frame in any way, nearby clients are kicked from the server.
Clients which don't have the frames in range do not experience this.
Note that the frames actually get moved on the server.

Steps to reproduce
Try moving frames, even with no connections to other blocks, using a Pusher, Slider, etc. in any direction.

Relevant server log:

[22:52:29] [Netty Epoll Server IO #2/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #0/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #2/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #0/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #2/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #2/ERROR] [FML]: NetworkDispatcher exception
java.io.IOException: Error while write(...): Broken pipe
        at io.netty.channel.epoll.Native.writeAddress(Native Method) ~[Native.class:?]
        at io.netty.channel.epoll.EpollSocketChannel.writeBytes(EpollSocketChannel.java:125) ~[EpollSocketChannel.class:?]
        at io.netty.channel.epoll.EpollSocketChannel.doWriteSingle(EpollSocketChannel.java:337) ~[EpollSocketChannel.class:?]
        at io.netty.channel.epoll.EpollSocketChannel.doWrite(EpollSocketChannel.java:325) ~[EpollSocketChannel.class:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:707) ~[AbstractChannel$AbstractUnsafe.class:?]
        at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:240) ~[AbstractEpollChannel$AbstractEpollUnsafe.class:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:676) ~[AbstractChannel$AbstractUnsafe.class:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1059) ~[DefaultChannelPipeline$HeadContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:669) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:669) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:669) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:669) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:669) ~[AbstractChannelHandlerContext.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.flush(NetworkDispatcher.java:547) ~[NetworkDispatcher.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:688) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:718) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:?]
        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:?]
        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:?]
        at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:247) [eo$4.class:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [SingleThreadEventExecutor.class:?]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [EpollEventLoop.class:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [SingleThreadEventExecutor$2.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92-internal]
[22:52:29] [Netty Epoll Server IO #0/ERROR]: java.lang.StackOverflowError
[22:52:29] [Netty Epoll Server IO #2/ERROR]: java.lang.StackOverflowError
[22:52:29] [Server thread/INFO]: Chris54721 lost connection: TranslatableComponent{key='disconnect.genericReason', args=[Internal Exception: java.io.IOException: Error while write(...): Broken pipe], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
[22:52:29] [Server thread/INFO]: Chris54721 left the game

Relevant client log:
Nearby clients get kicked from the server with the following message:

java.lang.RuntimeException: Tried to read NBT tag with too high complexity, depth > 512
commented

Same here, me, my brother and my mates all were sat around me on my server watching me finish my door design and I pushed the test button, the frame moved and everyone was kicked with that same client log message. depth >512

commented

me too my modpack use this version mod test to client no problem but on the server problem is so big@@

commented

This happened to me too, running forge 12.18.3.2185 (for 1.10.2).
Same exact crash behavior and logs.
It happens on dedicated server, in single player everything seems to work fine for the local client, BUT when you open to LAN, and have another client connected, the "LAN" client will crash with the same symptoms as if it was a dedicated server. The local client (the host that opened it's game to LAN) will not crash.
I can provide more infos if needed ;)

commented

Me also!
Forge 12.18.3.2185 on 1.10.2 .
Blocks move but clients are booted with:

017-02-05 16:50:38 +1100 [Netty Epoll Client IO #5/ERROR] [FML]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.lang.RuntimeException: Tried to read NBT tag with too high complexity, depth > 512

Please fix. Minecraft is better with moving blocks!

commented

Hello !

I play with Minecraft 1.10.2 and Funky Locomotion 0.3
I have the same issue and you have this in your screen when your are kicked ^^'
Thanks in advance !

commented

Any progress on this? I'm experiencing the same issue on AllTheMods v2.1/MC 1.10.2/FunkyLocomotion v0.0.3.

commented

you're playing on server ? Because I haven't this issue in a singleplayer world but on my multiplayer world Funky Locomotion is useless =/

commented

I have submitted a PR to fix this issue, and I'm using a custom build on my server with that fix (and some other smaller fixes). So for personal/private use you could clone my fork and build it yourself.

All you should really need to do is run ./gradlew build in a command prompt inside the directory, and you will get the jar inside the build/libs/ directory. You will also need to have a JDK (Java Development Kit) installed (as opposed to just the JRE that players/non-developers normally have).

commented

so wait, has anyone figured this out yet?

@maruohon i saw what you had posted but im no coder, are you saying you have a fix for this on 1.10.2?

commented

@boredinmemind Yes. If you look at my Pull Request #104. So for personal use (ie. where you don't have to distribute the custom version) you could build the mod from source, using for example the branch that my PR is made from (nbt-fix). Although if you are going to build it yourself, I'd then rather recommend using my main branch for 1.10.2 (which I have for now just called masa), which has other fixes as well.

To do that, you would go to my fork of the repo, select the masa branch from the dropdown, and then download the repo as a zip, or you could just clone the repo and switch to the masa branch if you know how to use git and have it installed. Then get a JDK and run the build command as mentioned in my previous comment.

commented

@maruohon
so yeah im no coder, but im savy-ish so i tried.
i got gradle installed, and when i go to build the repo it says failed as it was version 2.0 and it needs 2.3? no idea on that, i dont suppose you would be able to build the jar and email it to me? ive litterally spent the last 3 days trying to get some kinda server working with all the mods i want and this is the last piece of the puzzle.

p.s. it is for private use, for my own local mc server i run for me and my neighbor btw.

commented

You don't actually have to install gradle yourself. Run the command using the gradle wrapper that is in the repo, ie. ./gradlew build or gradlew.bat build, that should take care of all the dependencies and versions. If that doesn't work, then I can link you my build... are there PMs or something on github? Or are you maybe on reddit or some of the Minecraft Discord servers, I don't want to post the build link publicly here.

commented

@maruohon
name is as appears on here for discord, and reddit. ill try to build again, but i doubt ill have luck, technology hates me, lol
bored#8841
boredinmemind

update: tried building from the other repo, (the correct one you said this time) and its asking me to repoint it's path (as it seems it's trying to use reg java and wants me to redirect to JDK folder instead?

commented

@rwtema I'm confirming this bug again for 1.10.2 in FTB Beyond modpack, on a server. Pushing any block (dirt, for example) with a Pusher (and presumably all other motors) causes either the NBT error or a "badly compressed packet".

commented

I think it'd be pretty great if they did do that though. Some of us still play on 1.10.

commented

@maruohon :
The jarfile I got from doing build kept giving me this error when running Minecraft:
"net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Funky Locomotion (funkylocomotion)
Caused by: java.lang.NoSuchMethodError: net.minecraft.util.EnumFacing.getName()Ljava/lang/String;"

Doing the reobf task after doing the build task gave me a jarfile that actually works.

Also, I got the same error about needing gradle 2.3+. The gradle in the repo (located at "Funky Locomotion/gradle/wrapper") needs to be updated. Once I overwrote that with a newer version I didn't get that error message anymore.

commented

@Aionys Yeah, there is lots of outdated stuff in this official branch. If manually building a fixed version for 1.10.2, I'd recommend using my (a bit stupidly named) masa branch instead, as it has several updates and other smaller fixes. It's the version I was using on my testing server while it was at MC 1.10.2, and it should also build cleanly by just doing ./gradlew build.

commented

@maruohon I was referring specifically to your masa branch. That's why I @'d YOU.

masa needs this commit:
thiakil@c896962

Don't know how to fix the reobf weirdness, I don't know jack about gradle.

commented

@Aionys Are you sure you built it from the correct branch? Because I do have Gradle 2.14.1 in the wrapper properties: https://github.com/maruohon/FunkyLocomotion/blob/masa/gradle/wrapper/gradle-wrapper.properties

And as to the reobf stuff... How did you build it? ./gradlew build should be all you need to run, assuming nothing is broken in the build process. That is the command everyone (or at least most people... or at least me...) normally uses to build their mod for release. I don't exactly remember whether or not you need to run a setup task before it though... as I've obviously already done that to have a development environment. So you may need to run ./gradlew setupDevEnvironment before (or setupDecompEnvironment for the "full" modding environment), or I think there was also a lighter task, I think maybe setupCIEnvironment or something, I can't remember from the top of my head.

If you want to talk about this more, maybe hop on to Discord so that we don't keep e-mail spamming other people in this issue :P For example on my server here: https://discord.gg/2FgywHj or I'm also on the MMD and FTB and DW20 servers among others.

commented

Yes, I'm sure. The jarfile produced is named "funky-locomotion-1.10.2-alpha-0.0.3-masafixes.6.jar".

And the actual gradle.wrapper binary needs to be updated, not just the number in the properties file.

I built it with "gradlew build". It produced an not reobfuscated jarfile. I went back in and ran "gradlew reonf". It built a reobfuscated jarfile that worked. This leads me to believe that gradle is configured correctly, although it could have been user error on my part. Regardless, I got it working and now have a usable jarfile that is currently running in my Minecraft.

I've fixed the problem on my end, I was just letting you know why it isn't working based on my experience with what I had to do to fix it. I don't see any need for further discussion.

commented

This is still a thing in the newest 1.10 Version on Forge (0.0.3) which is included in the FTB-Beyond Pack whrere its happening to me.

commented

LukaPix this was fixed in 1.11 on. I don't retema will be backporting the fix to 1.10

commented

Hm okay but why does the FTB Team include it in a 1.10 Pack if i doesnt work at all ?