ahmedsuffian / aionxemu

Automatically exported from code.google.com/p/aionxemu
0 stars 0 forks source link

Error handling client CM_EMOTION #257

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After i make last rev247
i recive this error msg.I did it seen before.
Core revision:Revision:r247

Bug description:This error i see when login player account in game.

What steps will reproduce the problem?:Just entry player/char in game.

What is the expected output?:Entry in game with char.

Please copy/paste errors below:
[ERROR 2011-04-07 14:35:46] gameserver.network.aion.AionClientPacket:71 - Error 
handling client (user-account) message :[C] 0x99 CM_EMOTION
java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    at java.util.AbstractList$Itr.next(AbstractList.java:343)
    at gameserver.controllers.ObserveController.notifyStateChangeObservers(ObserveController.java:156)
    at gameserver.model.gameobjects.Creature.unsetState(Creature.java:242)
    at gameserver.controllers.FlyController.endFly(FlyController.java:72)
    at gameserver.network.aion.clientpackets.CM_EMOTION.runImpl(CM_EMOTION.java:147)
    at gameserver.network.aion.AionClientPacket.run(AionClientPacket.java:64)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at gameserver.taskmanager.FIFORunnableQueue.removeAndExecuteFirst(FIFORunnableQueue.java:28)
    at gameserver.taskmanager.FIFOExecutableQueue.run(FIFOExecutableQueue.java:65)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.run(ExecuteWrapper.java:39)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by apsorder...@gmail.com on 7 Apr 2011 at 11:42

GoogleCodeExporter commented 9 years ago
I want to supplement that this error does not go to a new char.
I see only in old chars.Make new one & all fine.

Original comment by apsorder...@gmail.com on 7 Apr 2011 at 11:49

GoogleCodeExporter commented 9 years ago
Apply patch, test and report results:

Original comment by ZeroSign...@gmail.com on 7 Apr 2011 at 12:23

Attachments:

GoogleCodeExporter commented 9 years ago
i will later today.

Original comment by apsorder...@gmail.com on 7 Apr 2011 at 12:46

GoogleCodeExporter commented 9 years ago
it ok pls. commit

Original comment by wongtharavat on 8 Apr 2011 at 7:31

GoogleCodeExporter commented 9 years ago
I applay patch , & all work fine for this moment ( up to 2 hours).

Original comment by apsorder...@gmail.com on 8 Apr 2011 at 2:46

GoogleCodeExporter commented 9 years ago
Still have warnmsg,Aftter Apply patch.So strange, on same account first time 
login all fine, after that ... again.
see log.
[ERROR 2011-04-08 17:59:14] gameserver.network.aion.AionClientPacket:71 - Error 
handling client (user-account) message :[C] 0x99 CM_EMOTION
java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    at java.util.AbstractList$Itr.next(AbstractList.java:343)
    at gameserver.controllers.ObserveController.notifyStateChangeObservers(ObserveController.java:158)
    at gameserver.model.gameobjects.Creature.unsetState(Creature.java:242)
    at gameserver.controllers.FlyController.endFly(FlyController.java:72)
    at gameserver.network.aion.clientpackets.CM_EMOTION.runImpl(CM_EMOTION.java:147)
    at gameserver.network.aion.AionClientPacket.run(AionClientPacket.java:64)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at gameserver.taskmanager.FIFORunnableQueue.removeAndExecuteFirst(FIFORunnableQueue.java:28)
    at gameserver.taskmanager.FIFOExecutableQueue.run(FIFOExecutableQueue.java:65)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.run(ExecuteWrapper.java:39)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Original comment by apsorder...@gmail.com on 8 Apr 2011 at 3:15

GoogleCodeExporter commented 9 years ago
this error cause not able to flying in my env.

Original comment by pl6...@gmail.com on 9 Apr 2011 at 10:57

GoogleCodeExporter commented 9 years ago
my patch is TEMPORARY patch.
CopyOnWriteArrayList is very slow.

Original comment by pl6...@gmail.com on 9 Apr 2011 at 2:27

Attachments:

GoogleCodeExporter commented 9 years ago
and this exception occures at applyEffect() in BufEffect.java
> effect.getEffected().getObserveController().addObserver(observer);
maybe this code.

flying passive skills cause this exception.
if you delete these skills from DB, the exception will disappear.
http://aion.yg.com/skill/winged-magic-i?id=1541
http://aion.yg.com/skill/winged-sage-i?id=1548

this is single thread problem, not multi thread thing.
so synchronized block is not used.

A.split observers by ObserverType or such thing.
B.add observer to ObserveController by other thread(synchronized block used).

I suggest B plan.
I will write the code if there is no other plan.

Original comment by pl6...@gmail.com on 9 Apr 2011 at 3:00

GoogleCodeExporter commented 9 years ago
I reverted ObserveController.java at rev 244 and this problem is gone.

Original comment by gga...@gmail.com on 9 Apr 2011 at 6:20

GoogleCodeExporter commented 9 years ago
C.dont use iterator and foreach.

i fixed it in local.
please test this patch.

Original comment by pl6...@gmail.com on 9 Apr 2011 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
Another bug with this CM_EMOTION , when fly your speed increas , but when you 
stop fly , your running speed again increas for example ( when fly 11.5 , stop 
fly your speed again 11.5 without run scroll). i use Revision:r254

Original comment by apsorder...@gmail.com on 10 Apr 2011 at 10:19

GoogleCodeExporter commented 9 years ago
it worked without ConcurrentModificationException in my server while 1day after 
my patch.

Original comment by pl6...@gmail.com on 10 Apr 2011 at 11:22

GoogleCodeExporter commented 9 years ago
Committed Revision 259.

Original comment by ZeroSign...@gmail.com on 18 Apr 2011 at 3:12