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

Comments

Projects
None yet
2 participants
@sbordes
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 Sep 23, 2014

@sbordes sbordes changed the title from Race Condition On StackModel to ConcurrentModificationException On StackModel Sep 23, 2014

sbordes added a commit that referenced this issue Sep 26, 2014

Fix #136 remove element from list being parsed
Conflicts:
	org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/NotifierBase.java
@vsm778

This comment has been minimized.

Show comment
Hide comment
@vsm778

vsm778 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)

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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Oct 12, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@vsm778

vsm778 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

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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Oct 12, 2014

Member

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)

Member

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

This comment has been minimized.

Show comment
Hide comment
@vsm778

vsm778 Oct 12, 2014

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

vsm778 commented Oct 12, 2014

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

@sbordes

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Oct 12, 2014

Member

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 !

Member

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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Oct 13, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@vsm778

vsm778 Oct 13, 2014

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

vsm778 commented Oct 13, 2014

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

@vsm778

This comment has been minimized.

Show comment
Hide comment
@vsm778

vsm778 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

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

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes Oct 13, 2014

Member

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

Member

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 Oct 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment