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 while iterating over indexPerClassWithSubTypes #786

hlg opened this Issue Jul 25, 2018 · 2 comments


None yet
2 participants
Copy link

hlg commented Jul 25, 2018

This is not actually an issue, but a question:

I am using the Java client to access BIMserver iterate over the List retrieved via ClientModel.getAllWithSubTypes. During this iteration, I get a ConcurrentModificationException.

I could narrow down one case to having IdEObject with state TO_BE_LOADED in the model retrieved in lazy loading mode (deep=false). Once I hit one of those objects during the iteration, they are loaded and added to the list. When I use deep loading, this exception does not appear. But another case keeps failing with deep loading. I am trying to isolate this case and post a small example.

Can I assume that the index of the initial list is stable and newly loaded entities are added to the end only? That is can I use the index to iterate over the original part of the list or do I have to copy the list before iteration?


This comment has been minimized.

Copy link
Member Author

hlg commented Jul 26, 2018

I gave up to investigate the deep loading case for now, because the model is too large. I am using lazy loading, but do not really understand why and where the indexPerClassWithSubTypes list is modified. My gut feeling is that it should not change just because the state of one of its members changes.


This comment has been minimized.

Copy link

rubendel commented Aug 10, 2018

Sorry for the late reply. Yes I think you are right, to be honest this code needs to be refactored. I would like to get rid of the EMF model on the server and only use it on the client (and then the server can use the client), so we can simplify things. Unfortunately there are so many other projects going on at the moment that I don't have time to to work on this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.