Draconic Evolution

Draconic Evolution

77M Downloads

[1.10.2] [Bug] Client crashes on joining servre

Dijkstra1-zz opened this issue ยท 3 comments

commented

The client crashed when i try join the server. Any way this casued by an java.util.ConcurrentModificationException, ans the funny thing is that just before this I was getting this exception in a Java of project of my own so I am guessing in your ClientEventHandler you have an ArrayList<> and you are doing something like this:

for(Item item: items){
    item.doStuff();
}

and somewhere in doStuff method it removes the item from the list and that is what causing the problem, for my project the only way found to overcome this is to do this:

for(int i = 0; i <items.size(); i++){
    items.get(i).doStuff();
}

This might work:

for (Enumeration<Item> e = Collections.enumeration(items); e.hasMoreElements(); ) {
    e.nextElement().doStuff();
}

Even though we both know this bug is purely down java you may have Minecraft/Forge version:

  • Minecraft version: 1.10.2
  • Minecraft Forge version: 1.10.2-forge1.10.2-12.18.1.2076
  • Draconic Evolution version: Draconic-Evolution-1.10.2-2.0.0.92-universal
  • Crash Report: crash-2016-09-10_02.39.00-client.txt
commented

This crash is related to thread a thread syncing issue i have been having for a while now. It should finally be fixed in the next build.

commented

I got so feed up with I made a Pull Request, but if you have fixed it then you may disregard it.

commented

Yea i (hopefully) fixed that a while ago. Just hadent had a chance to push the changes. By the way you pushed to the wrong branch (master is 1.7.10)... And the loop you modified (unless there is another crash i dont know about) is not the one that had issues.