mojira.dev
MC-5120

Fireworks pushed by water / fired horizontally out of loaded chunks cause client to hang

Fireworks which are pushed by water fly off into the distance at strange angles. If enough of these are launched (around 10 or so) the client will experience massive FPS loss and eventually become unresponsive. The client will not recover from this.

Set render distance to 4.
Reproduction steps:
1) Create a firework rocket with the following specification:
Flight Duration: 3
Large Ball

  • Magenta

  • Fade to Purple

  • Trail

  • Twinkle

2) Place some water so that it is flowing into an empty space

3) Launch 5 fireworks under the flowing water.
4) Watch as fireworks zoom off at a horizontal angle and explode in the distance (more than if they went vertical).
5) After 3-10 seconds the client will experience massive FPS loss.


From MC-82062:

Example command

/summon FireworksRocketEntity ~ ~1 ~ {LifeTime:99,Motion:[10.00,0.00,0.00],FireworksItem:{id:401,Count:1,tag:{Fireworks:{Explosions:[{Type:0,Flicker:0,Trail:0,Colors:[1234],FadeColors:[1234]}]}}}}

Code analysis by Marcono1234 can be found here.

Related issues

Attachments

Comments

migrated
[media][media][media]
Andy Fewtrell

Seems even if you only launch one firework at a time and wait for the boom, after 3 or so rockets the client will still hang.

Andy Fewtrell

Flowing lava does not have an effect on the fireworks.
While I have seen it happen a couple of times with steps and halfstep blocks, I cannot reliably reproduce it.

Ólafur Jón Björnsson

I seem to have run into this problem by using Craftbukkit server plugin.
If I create fireworks manually on a vanilla 1.4.6 client as rapidly as I can, it works.
But when I make the server create a few fireworks with little or no ticks between (0-5) they fire but the frame rate starts to drop when the particles increase. The client does not recover after the fireworks have stopped. (the sound stops but some of the trailing particles are still visibile, and change very slowly )
I know the server is not vanilla but the client is.

I ran a few test with Java Visual VM and in every one of them the thread "process reaper" stopped at the same time that the FPS drops, about 5 seconds after I start shooting fireworks.

Found the cause of the problem in my case. I made the fireworks too powerfull, somthing not possible without a server-mod or a water glitch maybe? ( threads running to long or somthing like that)

spencer williams

i dont think its water it the firework going out of the loaded chunks heres a vid where i use tnt and lunch the fireworks out of the loaded chunks skip to 1:50s http://www.youtube.com/watch?v=b4k6Kw0ouVM

Mike B

I can confirm this is still occurring on the latest snapshot (13w03a).

Java Version: Java 7u11 (most recent update)
Minecraft Version: 13w03a
Operating System: Windows 7

It does not matter too much what colors or explosive upgrades are on each firework, as I had different settings that in the step 1 of the description above. The long flight duration (flight duration: 3) is what allows it to leave the loaded chunks. So as Spencer has already stated above, I feel it is because it left the loaded chunks, and not because of its contact with the water.

Video Proof: http://youtu.be/t-A27ErKMjQ
As soon as I launch the fireworks, I try to keep moving my mouse around, but the fps was too bad, and the game goes unresponsive to the point I had to restart it.

Aikar

this issue is killing our server... Fireworks also seem to be able to "bundle up" in some cases as I loaded a chunk with 3000 fireworks that did not want to detonate either, killing the client in lag.

Aikar

and to make it clear-- water isnt required to reproduce this.

Having a firework dispenser launcher firing and moving away so the fireworks enter unloaded chunks does the same.

Something about the server stops sending updates about the firework to the client, and the client keeps the firework and it continues to propel farther than it was intended to.

Aikar

I have found a solution to part of this bug (server side)

in World.tickEntities:

if (entity instanceof EntityFireworks || !flag || this.d(i - b0, 0, j - b0, i + b0, 0, j + b0)) { // CraftBukkit - Fireworks can not be skipped or clients can lag out.

The fireworks are being skipped for ticks if they are less than 32 blocks from an unloaded chunk. The server then never detonates the firework, causing the client to shoot it into unrenderable areas.

The client should still be fixed to not lag out when a firework hits unrenderable areas.

Aikar
Tails

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

kumasasa

Seems to be no longer an issue.

Exxmorphing

As of 1.7.4, 1.7.5, and maybe 1.7.2, this is happening again.

EDIT: Could the resolved status be removed?

EDIT2: Any type of firework (Blank firework rocket is untested) can cause the bug as long as it leaves the loaded chunks.

kumasasa

Reopened.

James Chilingerian

Still in 14w21b

galaxy_2alex

Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Koala_eiO

Still a bug in 1.8.8 and 15w31c. Can someone update the title as well? It's fireworks pushed out of loaded chunks that cause the client to crash.

I added a screenshot of a small machine that can be used to reproduce the bug.

marcono1234

Confirmed for

  • 15w34d Please change the tiltle like @unknown suggested

Probably relates to MC-48375

Jeremy

This now appears to have been fixed as of 15w43c. Tested with both OP's original design and a rapid fire dispenser setup. Neither seemed to cause a crash. If someone else can confirm this can be marked as resolved.

marcono1234

Confirmed for

  • 1.10

Please include, that you have to set the view distance to about 4, it does not happen always. I am at the moment unsure what causes it to happen only sometimes.

FaRo1

Seems to be caused by the firework entites not being killed automatically and they then do... something. /kill @e[type=FireworksRocketEntity] fixes the lag (if you can type it before the client crashes).

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

It looks like the reason for this is that for the client the firework is not removed once it enters unloaded chunks. Because of this the method net.minecraft.entity.item.EntityFireworkRocket.onUpdate() keeps multiplying the x- and z-Motion with 1.15 reaching invalid values that are higher than 10.

FaRo1

Can someone provide a new command to reproduce, please? Even if I replace "FireworksRocketEntity" with "fireworks_rocket", it doesn't work in 16w33a.

[Mod] Neko

That would be MC-106099

FaRo1

Seems to be fixed in 16w35a.

[MOD] Greymagic27

This issue is present in 1.13.1

[MOD] Greymagic27

The policy has changed, Clones are allowed as this is marked as fixed

Andy Fewtrell

(Unassigned)

Confirmed

fireworks_rocket, hang

Minecraft 1.4.6, Snapshot 13w03a, Minecraft 1.7.5, Minecraft 14w21b, Minecraft 1.8, ..., Minecraft 1.8.8, Minecraft 15w31c, Minecraft 15w34d, Minecraft 1.10, Minecraft 1.10.2

Minecraft 15w43c, Minecraft 16w35a

Retrieved