Mojira Archive
MC-58759

generic.followRange attribute causes java.lang.RuntimeException/java.util.concurrent.ExecutionException

The bug

This bug occurs when the attribute generic.followRange is set higher than a specific threshold. I already got this bug to work with 2048, 1000, 500 and 250 – it may be possible to reproduce it with lower/higher values too, though.

Basically, as soon as an entity with a "broken follow range" is spawned and finds an entity within that follow range (even if that entity is the player itself), the game will freeze, internally. This means that I can actually move and destroy/place blocks but cannot interact with entities or tile entities. Also, I cannot use items or commands and experience huge lag spikes.

As soon as I try to exit the world (any method seems to trigger this, even if I try to cause a debug crash by pressing F3 + C for 10 seconds) the game freezes completely. After the game window finally closes down, the launcher just shows me a message which tells me that the game has crashed, but no crash report is generated, unfortunately.

How to reproduce

It seems like this can be reproduced with every mob which targets a specific entity or block in a specific occasion. This therefore also happens when punching passive mobs with the Panic AI enabled as this will cause the mob to target a random block within its follow range. However, the easiest way to reproduce this is to spawn a zombie with a villager next to it since this will definitely trigger the bug.

/summon zombie ~ ~2 ~ {Attributes:[{Name:generic.followRange,Base:2048}]}

I used 2048 as the follow range because it is the max value which can be used according to the wiki, even though I've been able to spawn mobs with higher values, too. (These also triggered the bug)

What's really interesting about this is that I've never been able to render my test world corrupted when I reproduced this bug. When I re-join the test world after the crash, the spawned entity is gone and it's just like nothing ever happened. That's actually contrary to what the previous reporter said. They stated that the mob remained in their world and they couldn't re-join the world because it instantly crashed their client.

The attached crash reports were posted by the previous reporter. I can't get the game to crash like this anymore for some reason. I also can't get the game to output a crash report in earlier versions (such as 1.7.9).