Sound made by mobs in water causes massive FPS drop
Summary:
When two or more animals collide (or are touching) in water, and the player moves more than 16 blocks away from them, there is a massive FPS drop. However, when the sound is off this issue does not occur.
How to Reproduce:
Make sure sound is set above 0%! Dig a 1x1 hole 2 deep. Place water in the bottom. Spawn two or more chickens (more will make it worse) in the hole. Walk 16-18 blocks away, while observing FPS and sound CPU usage on the debug chart.
Attached is a video of reproducing the bug.
Environment
Windows 7 64-bit
64-bit Java 7 Update 3
Vanilla
Linked Issues
Created Issue:
Sound made by animals in water causes massive FPS drop
Summary:
When two or more animals collide (or are touching) in water, and the player moves more than 16 blocks away from them, there is a massive FPS drop. However, when the sound is off this issue does not occur.How to Reproduce:
Make sure sound is set above 0%! Dig a 1x1 hole 2 deep. Place water in the bottom. Spawn two or more chickens (more will make it worse) in the hole. Walk 16-18 blocks away, while observing FPS and sound CPU usage on the debug chart.Environment
Windows 7 64-bit
64-bit Java 7 Update 3
No Mods
- Unresolved
- Open
- Public
- Unconfirmed
- FPS animals sound water
- 1.4.2
Sound made byanimals in water causes massive FPS dropSound made by mobs in water causes massive FPS drop
Summary:
When two or more animals collide (or are touching) in water, and the player moves more than 16 blocks away from them, there is a massive FPS drop. However, when the sound is off this issue does not occur.How to Reproduce:
Make sure sound is set above 0%! Dig a 1x1 hole 2 deep. Place water in the bottom. Spawn two or more chickens (more will make it worse) in the hole. Walk 16-18 blocks away, while observing FPS and sound CPU usage on the debug chart.Attached is a video of reproducing the bug.
Windows 7 64-bit
64-bit Java 7 Update 3
No ModsWindows 7 64-bit
64-bit Java 7 Update 3
Vanilla
relates to
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
From the looks of it this is the same problem as MC-560. I've posted a fix in the forms of a mod in that bug report, as well as a description for Mojang about how to fix it. Maybe someone can verify that it's caused by the same bug by installing it?
Possible duplicate of MC-560, marking as related at least for now as a possible extra use-case for testing
Confirmed for 1.4.7 AND that the fixes suggested in the comments in MC-560 solve the problem.
Lag/stutter is more noticeable on weaker systems.
Mojang please review this as a priority as it hinders game-play significantly on some systems.
confirmed, dropped about 15-30 fps
Confirmed, having the same issue. impossible to stay near automated chicken farms....
I've updated the title, as the problem is caused by all mobs, not just animals.
After lots of messing around with this bug in MCP I eventually fixed it somewhat, although it is more than a workaround than a fix. I've attached the class files for 1.4.2 for those who are just as annoyed about this bug as I am. Install just like any mod: put .class files in minecraft.jar using 7zip or similar and remove the META-INF folder.
For Mojang:
The lag is caused by sndSystem.setListenerPosition in SoundManager.setListener when a lot of sounds go out of range at the same time; it is in fact not limited to the splashing sound, that one just gets played obscenely often in farms so it is most noticible with that sound. I couldn't check beyond SoundManager.setListener because MCP does not decompile paulscode (the actual sound system), but I assume it has something to do with sounds running at zero or negative volume or it trying to flush the buffer for a sound while trying to stop it or something.
The fix/workaround in the associated class files is as follows:
P.S. I have never used this bug reporting system before, if I'm doing something wrong or am not supposed to upload the fix like this I do sincerely apologize.
I managed to inject the fix into the actual sound system now, it should now work for pretty much any minecraft release because the soundsystem code is not obfuscated and doesn't change every release. I tested it for 1.4.2 and 1.4.3pre at least. As usual, copy the contents into minecraft.jar and remove META-INF.
gj Jeroen! Let's hope a Dev sees your fix!
I'm sure this is also the cause of
MC-46. The workaround I provided there also fixes this.This sounds exactly like my issue. In my case it's a chicken coop where the chickens are in water that forces them into a hole where eggs are dropped. Any time I walk away from the coop I get a massive slowdown. I'll try the OpenAL files but ultimately I think a code change is what is needed. Jeroen, I appreciate your work and I hope it is used by the devs. Seems it would be a quick fix if they simply adopt your code.
EDIT
OpenAL did the trick - I have a blissfully, consistent framerate. That said, I would rather have a fix that allows the use of the 64-bit OpenAL drivers (and one that addresses the core issue).
Confirmed for 1.4.7 AND that the fixes suggested in the comments solve the problem.
Lag/stutter is more noticeable on weaker systems.
Mojang please review this as a priority as it hinders game-play significantly on some systems.
Still exists in 13w03a.
Glad I'm not the only person that's noticed this problem, it was an issue with chicken farms on an SMP server I ran a while back too.
Still exists in 13w04a.
Still exists in 13w06a.
Still exists in 13w07a.
Still exists in 13w09b.
EDIT: I meant b.
Still happens in 13w10a.
Is this still a concern in the current Minecraft version 1.6.2 / Launcher version 1.1.2 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
I can't seem to replicate this anymore... Tried chickens in a water pit, flying above rain, and a couple other things which induced the problem previously. Seems like this is fixed! I'm surprised, though... I still get some random fps drops in the nether...
Ok, thanks.
Josiah: Nether-lag is usually because of either the many lava and/or sound.
Believe it or not, but depending on how good your soundcard is, MC sound can lag you badly, mostly mobs.
On my old desktop computer the Ghasts (their yelling and the crashes of their fireballs) crashed my sound several times, and I also lagged because of it.
Kind regards,
Meri
[PS: @Kumasasa - reminds me: I still have to update my own Issue, sorry, forgot it due to real life stuff >.<]