OreCruncher / BetterRain

Based on the BetterRain mod from Wirsbo
20 stars 12 forks source link

Possible Crash, unsure of how/what is causing it [Bug/Error/Crash] #73

Closed Drakoflame closed 8 years ago

Drakoflame commented 8 years ago

Currently I am playing on a whitelisted Multiplayer vanilla server, there arn't many plugins, and for the most part its all vanilla. Me and a friend have an animal farm between my and his house, and we've been working on quarrying out a large section of stone, currently we have one chunk mined and its down to about y50 or so, maybe a bit lower. Anyway, sometimes, (and this has happened twice to me and apparently a few times to him, but not near the farm sometimes) we get this crash http://pastebin.com/w0E78Qpb or something along those lines whenever we are moving near the farm. This crash I was sprinting over and opened a chest while still partly in motion with something in my hand, and it crashed. I'm not sure if its the chest opening, the mobs moving, or me moving, or a combination, something along the lines of the game being overloaded by the amount of sounds (there's a lot of animals there too...). I love Presence Foot Steps to much to downgrade, so at this point I'm saying "I'll deal with it..." but I don't know if I can if it means I crash sometimes when near the farm. But oh well. I thought I'd bring it up to your attention Cruncher.

If it does help, he and I pretty much have the exact same mods. Optifine HD_U_H2, Better Foliage 2.0.3, Dynamic Surroundings 2.0.4.6BETA, SoundFilters 0.8, DynamicLights. This is all on 1.8.9 as well. I have not tested to see if I can re-create this on 1.7.10, as I haven't played it in a little bit, I'm a bit occupied building and having fun on the 1.8.9 version

P.S. while writing this my friend found the full log (I think) of his latest crash http://pastebin.com/0XBpTZcZ So if you could give them a look over and try to help :3 Thanks Cruncher!!

OreCruncher commented 8 years ago

Lot's of sounds playing. It's not clear to me what is causing this. One thing you can try is increase the number of normal sound channels that are configured in the sound engine. Default is 28; try increasing it to something like 36.

Drakoflame commented 8 years ago

Alright, where do I do that? Also, I was sprint running past and I got a crash as well XD

OreCruncher commented 8 years ago

The setting is in the dsurround.cfg file. BTW, you like all those animal sounds playing or do you wish they were reduced in quantity? :)

Drakoflame commented 8 years ago

Eh... I could do without them realy... I guess I could try turning peaceful animal sounds down to see if that helps before increasing the amount of channels there are

OreCruncher commented 8 years ago

Yep. The other reason I asked is because I am putting in some logic to eliminate some of the liquid sounds (water/lava) in order to reduce the workload on the sound engine. They way it works is that there will be a minimum interval between sound plays and any sounds that violate that interval will be cancelled. It would be easy for me to add sounds to the list of sounds I give this treatment to.

O13SC3N3 commented 8 years ago

Same issue I had I increased my channels and streams and fixed it personally foryself. No promises if its a guarentee tho. Maybe related to other post about losing sound on pausing the game?

Drakoflame commented 8 years ago

now that you sait O13, I lost sound as well... I noticed that blocks weren't making sound when I started punching them, and block sounds were up... maybe there should be more sound channels by default... or, like you said earlier Cruncher, make a time delay between when sounds CAN play, especially if their not directly linked to player/animal

Drakoflame commented 8 years ago

woops, didn't mean to close

OreCruncher commented 8 years ago

I would increase the number of channels by default, but it comes down to how many channels/voices the computer system can handle. I do not have enough information to comfortably increase it as a default in Dynamic Surroundings. I am still looking for ways to detect a proper number using the OpenAL API but have not found anything as of yet.

The angle I am currently taking is to cull unnecessary sounds. For example, there are a crap ton of water/lava sounds in areas like the bottom of chasms that have lava with water flowing on top. Each of those water/lava blocks has the potential of generating a sound, and as a result it consumes the majority of channels causing sound to cut out and the like. By culling I eliminate the majority of those sound events, most of which the player will not notice as missing.

(I am adding the mob "say" sounds to the cull list, too. That way a player can have a bunch of farm animals, but minimal noise as a side effect.)

OreCruncher commented 8 years ago

Woo hoo! Found an API I can use to figure out how many channels are in the system. Next BETA will do some auto config by default to bump up based on what the system says.

(My system has 255 channels/voices. Minecraft uses a total of 32 by default.)

O13SC3N3 commented 8 years ago

So default in beta5 was reducing Minecraft sound capabilities?

OreCruncher commented 8 years ago

No - by default the sound library that Minecraft uses limits it to 32 channels with is in line with the JavaSound specification. Minecraft does not alter these defaults. The main issue with Dynamic Sounds, and the Footsteps, is that it produces a lot more sounds than before. This quickly pushes the engine to the max of 32 simultaneous sounds. I am not sure that Minecraft/sound system is stable when pushed this far.

I added those configuration settings in the file so that a player could adjust upwards if they had a capable system. At that time I didn't know of an API to try and auto configure the settings. Like you have experienced, adjusting the channel counts higher improved your game stability.

For BETA7 I plan to auto-configure by default. It will only use a max of 128 channels, and portion them between normal and streaming. To put this in context I made a layout of 21 beehives next to each other in a 3x7 square, and stood in the middle of them. The number of concurrent sounds peaked at about 72 which is well within 128. If for some reason it needs to be higher than 128 auto config can be turned off, and then the manual settings used.

Note that the number of channels available by the system is the total available for all running software on the computer. Things like teamspeak, Windows dings and bling, etc. all come from that pool. I just don't want to grab everything. :)

OreCruncher commented 8 years ago

Posted BETA with the sound channel auto configure. Let me know how it goes: http://minecraft.curseforge.com/projects/dynamic-surroundings/files