iChun / iChunUtil

iChunUtil as required by several of my mods.
GNU Lesser General Public License v3.0
40 stars 53 forks source link

iChunUtil edits recipes in a non-main thread, causing IC2 to have a ConcurrentModificationException #136

Closed Gaelan closed 7 years ago

Gaelan commented 7 years ago

This line is called by PacketSession, which does not run on the main thread.

Crash Report with IC2's CME Crash Report with Aroma1997's mod for debugging this issue, showing that iChunUtil is responsible

Gaelan commented 7 years ago

Side note: it's a bit weird that iChunUtil needs to be on the client and server, even if the only iC mod in the pack is GooglyEyes, because iCUtil itself adds the compacted porkchop.

Aroma1997 commented 7 years ago

This can be solved by using Minecraft.getMinecraft().addScheduledTask(Callable<V>), where the Callable is an Object (or a Lambda Expression) of what you want to do. (i. e. The registration of your Recipe)

iChun commented 7 years ago

Yeah I will fix when I can. I've recently been brought aware of a couple of issues caused by the separate threads between client and network that I neglected to take into consideration. Currently out of the country though so it'll be in January that I'll be able to fix this.

On 29 Dec 2016 9:43 a.m., "Aroma1997" notifications@github.com wrote:

This can be solved by using Minecraft.getMinecraft().addScheduledTask(Callable) where the Callable is an Object (or a Lambda Expression) of what you want to do.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iChun/iChunUtil/issues/136#issuecomment-269605351, or mute the thread https://github.com/notifications/unsubscribe-auth/ACMSTAbH-sV32tddme6Za0LPXyqFmjFVks5rM4C1gaJpZM4LXRhS .

iChun commented 7 years ago

Fixed. Will be out in 6.2.1 - https://github.com/iChun/iChunUtil/commit/70b50514b8ae44f0a9b6a941b007f0fe2fb4c074