Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException On StackModel #136

Closed
sbordes opened this issue Sep 23, 2014 · 10 comments
Closed

ConcurrentModificationException On StackModel #136

sbordes opened this issue Sep 23, 2014 · 10 comments
Assignees
Labels
Milestone

Comments

@sbordes
Copy link
Member

sbordes commented Sep 23, 2014

Noob error of the year, even guru can be tired :(

JREvent>>143|CREATE_COMMAND|org.jrebirth.af.core.facade.CommandFacade|org.jrebirth.af.core.command.basic.showmodel.DetachModelCommand|null|
20:54:56.792 [JIT] ERROR o.j.a.c.e.h.AbstractJrbUncaughtExceptionHandler - Uncaught Exception: null
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[na:1.8.0_20]
at java.util.ArrayList$Itr.next(Unknown Source) ~[na:1.8.0_20]
at org.jrebirth.af.core.link.NotifierBase.unlistenAll(NotifierBase.java:356) ~[org.jrebirth.af-core-7.7.3.jar:na]
at org.jrebirth.af.core.link.AbstractWaveReady$4.runInto(AbstractWaveReady.java:498) ~[org.jrebirth.af-core-7.7.3.jar:na]
at org.jrebirth.af.core.concurrent.AbstractJrbRunnable.run(AbstractJrbRunnable.java:78) ~[org.jrebirth.af-core-7.7.3.jar:na]
at org.jrebirth.af.core.concurrent.JRebirthThread.run(JRebirthThread.java:172) ~[org.jrebirth.af-core-7.7.3.jar:na]

@sbordes sbordes self-assigned this Sep 23, 2014
@sbordes sbordes added this to the 7.7.4 milestone Sep 23, 2014
@sbordes sbordes added the bug label Sep 23, 2014
@sbordes sbordes closed this as completed Sep 23, 2014
@sbordes sbordes changed the title Race Condition On StackModel ConcurrentModificationException On StackModel Sep 23, 2014
sbordes added a commit that referenced this issue Sep 26, 2014
Conflicts:
	org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/NotifierBase.java
@vsm778
Copy link

vsm778 commented Oct 12, 2014

hi. i have the same error.

maybe it's possible change HashMap to ConcurentHashMap ?
private final Map<WaveType, WaveSubscription> notifierMap = new HashMap<>();

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
at java.util.HashMap$ValueIterator.next(HashMap.java:1458)
at org.jrebirth.af.core.link.NotifierBase.unlistenAll(NotifierBase.java:357)
at org.jrebirth.af.core.link.AbstractWaveReady$4.runInto(AbstractWaveReady.java:498)
at org.jrebirth.af.core.concurrent.AbstractJrbRunnable.run(AbstractJrbRunnable.java:78)
at org.jrebirth.af.core.concurrent.JRebirthThread.run(JRebirthThread.java:172)

@sbordes sbordes reopened this Oct 12, 2014
@sbordes
Copy link
Member Author

sbordes commented Oct 12, 2014

Which version are you using ? I think that the fix I made for 7.7.4 is not enough.
I have pushed a lot of changes for 8.0.0 and I have to backport some of them to create another rebound (7.7.5).

Changing the map type is not really a good thing because all calls of unlistenAll are done into the same thread (JRebirth Internal Thred : JIT => serialization).

But it implies to be able to avoid to release some WaveType notified to keep some the feature alive.
So I have added a new annotation @Releasable to let the component listening the WaveType even it was removed from its parent.

@vsm778
Copy link

vsm778 commented Oct 12, 2014

the version is 7.7.4

may be ThreadLocal will be good?

for me previous version 7.7.2 was fine, but i found that you released new version and tried to use it

@sbordes
Copy link
Member Author

sbordes commented Oct 12, 2014

Let's go to publish the 7.7.5 !

It's already fixed into 8.0.0-SNAPSHOT, I will perform the backport and the release today

A sample has been pushed on latest MasteringTables development branch (GameMenuModel will not be released when it is removed from its parent to keep its feature alive)

@vsm778
Copy link

vsm778 commented Oct 12, 2014

Thank You!
I really like you JRebirth!
And when will be possible to use 8 version (from maven)?

@sbordes
Copy link
Member Author

sbordes commented Oct 12, 2014

Thanks, there is still 2 small features to be done, and I will publish the first 8.0.0 stable version with a lot of new features and unfortunately some API change...

But you can grab the snapshot version here :http://oss.jfrog.org/simple/oss-snapshot-local/org/jrebirth/af/core/8.0.0-SNAPSHOT/ (not yet build, I will powered on our ci server to perform some build)

You will be informed when all release will be available, stay tuned !

@sbordes sbordes modified the milestones: 7.7.4, 7.7.5 Oct 13, 2014
@sbordes
Copy link
Member Author

sbordes commented Oct 13, 2014

7.7.5-SNAPSHOT is ready to be tested (available on OJO) let me know if it works for your application.

https://oss.jfrog.org/repo/org/jrebirth/af/core/7.7.5-SNAPSHOT/

The mastering table demo was fixed by this version and upgraded to 1.5.0, runnable here : http://sites.jrebirth.org/org.jrebirth-7.7.5-SNAPSHOT/apps/MasteringTables.html

@vsm778
Copy link

vsm778 commented Oct 13, 2014

Thanks, today i will test it, and write here =)

@vsm778
Copy link

vsm778 commented Oct 13, 2014

I have attached this library ( core-7.7.5-20141012.205140-5.jar ) to my project instead of 7.7.2
at the first look works well, as 7.7.2
thank You again =)
waiting for 8 version

@sbordes
Copy link
Member Author

sbordes commented Oct 13, 2014

All builds are running I will publish 7.7.5 on maven central tomorrow, thanks for your help (feedback, test and patience)

@sbordes sbordes closed this as completed Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants