stashymane / extra-sounds

Creative Commons Zero v1.0 Universal
40 stars 21 forks source link

Occasional ConcurrentModificationException client crash when moving items around in inventories #78

Open floral-qua-floral opened 2 years ago

floral-qua-floral commented 2 years ago

Minecraft: 1.19 Mod: 2.3.1

Details

Game occasionally crashes when moving an item around in an inventory. The item moved and inventory open do not appear to be relevant, as I've had the crash occur when moving diamonds, potions, and other items I can't remember at this time. The inventory that is open also doesn't seem relevant; I've had the crash while using the survival inventory, a double-chest, a brewing stand, and maybe some other inventories. I have not found any way to deliberately reproduce the crash, it seems to happen randomly.

I suspect this mod is involved, as the crash seems to be related to the sound system, and I have only ever seen it occur while I am moving items around in inventories. It might be related to another mod interacting with this one, but since I cannot reproduce the issue deliberately it is prohibitively difficult to test - usually there are hours of gameplay between crashes. It seems to be something related to a data structure ending up in an invalid state, from what I can tell. Perhaps the way ExtraSounds queues up the item-movement sound effects can encounter an error somehow?

The two mods that seem like they have the most potential to be relevant are Dynamic Sound Filters, since it affects how sounds are played(?), and Mouse Wheelie, since it adds new ways to move items around in containers. I make heavy use of Mouse Wheelie's item scrolling feature to move individual items from stacks between inventories, however I cannot remember whether or not the crash only occurs when I am using item scrolling; I have gotten this crash maybe 4-6 times in total, distributed over a period of a few weeks, so I can't remember every instance. It's possible that some of those crashes may have been when clicking items around manually, but it's also possible all of them occurred when scrolling items around. I'll update this report if I get the crash again from a non-scrolling interaction.

Crash report: https://mclo.gs/fn12LZJ Log file: https://mclo.gs/HHt56sy I'll enable the -Dextrasounds.debug=true Java flag for the time being, and if I encounter the crash again before the issue can be resolved then I'll add the resulting log to the report.

floral-qua-floral commented 2 years ago

Update: Just got it again. Oddly, this is the third time today. I can't think of anything I've changed lately that could reasonably be expected to affect this, so I can only assume it's a coincidence. Anyways, I had the debug logging flag set, so now I have the log for this. I was not doing a Mouse Wheelie interaction at the time. I had a stack of two buckets on the cursor, which I was placing into a filled double chest by clicking it onto a stack of two Adorn mugs, so as to replace the mugs in the chest.

Crash report: https://mclo.gs/zbzXzts Log file: https://mclo.gs/0d7F2dz

stashymane commented 2 years ago

Was (probably) resolved in this commit, however has not yet been pushed due to lack of free time - expect a small update soon :) Try running that one and tell me how it goes.

akemin-dayo commented 2 years ago

While I haven't been able to reproduce this issue on any version of ExtraSounds, I also just wanted to let you know that there is no binary release of cfff6c8459f42f3c59ba46b445189d40ae593dad for 1.19 (the commit immediately before my merged PR #74).

stashymane commented 2 years ago

Yes, I released the 1.19.2 version since it's been way too long already - working on some other fixes before I release backports :)