Questions tagged [concurrentmodificationexception]
29 questions
2
votes
0 answers
Trying to create real time GraphView Line and getting java.util.ConcurrentModificationException
I'm trying to make a graph in real time, but I get a java.util.ConcurrentModificationException error.
If you set a high delay thread.sleep(500), then the chart will fill correctly, but if you set thread.sleep(100) or less, you always get an error…

Nikola Vlashich
- 21
- 2
1
vote
0 answers
How do I retry an aws neptune gremlin ConcurrentModificationException error without having to rebuild the query?
I build up a batch query in variable "gBatchWrite". I try to keep it around 200 operation per Amazon suggestions. Any retries after a "ConcurrentModificationException" fail. It seems that I would have to rebuild the gBatchWrite variable from scratch…

Louis Rebolloso
- 15
- 5
1
vote
0 answers
ConcurrentModificationException in WildFly 26.0.1 and Java 17
We are in the process of upgrade of our platform to Wildfly 26.0.1 and Java 17. During recent load test we noticed that about 0.1% of calls failed due to exception thrown from elytron (see below). This same instance of WF26 worked fine with Java 8…

Mike Degteariov
- 69
- 6
1
vote
2 answers
Java Synchronized Collections - what is the value?
The following code triggers a ConcurrentModificationException very, very quickly:
import java.util.*;
public class SynchFail {
static List LIST = new ArrayList();
public static void main(String[] args) {
new…

Dave Carpeneto
- 1,042
- 2
- 12
- 23
1
vote
3 answers
Kotlin list.map() how to avoid ConcurrentModificationException
I have problem with ConcurrentModificationException. Here's my part of the code :
var deltaSum = 0
arrDeltaBrainWaves.map {
value -> deltaSum += value
}
To be clear - I know why this error appears :) The problem is - I have no…

Bartos
- 1,007
- 3
- 15
- 38
0
votes
2 answers
ConcurrentModificationException error when removing item from ArrayList?
I am a beginner at Java and game programming. I am working on a Java 2D game and adding an inventory and looting system. Basically, when my player picks up an item, I want to remove the physical object from the world. However, I am getting a…

yiwuen
- 11
- 2
0
votes
0 answers
List allocation trigger ConcurrentModificationException in Kotlin
I have a function that takes a List as a parameter and the aim is to merge this list with another list contained in an object.
private fun joinListToUpdatedList(listToJoin: List?){
val folderUpdatedListValue :…

Quentin
- 486
- 4
- 20
0
votes
0 answers
kotlin ConcurrentModificationException at an attribute that is not modified
I have the folowing problem:
I have two mutableLists ( offerDisplay and drawStack), both lists contains the same type of objects.
First there is no exception when i want the size of drawstack, then i remove a a object out of offerDisplay. After…

Joker26_37
- 1
- 2
0
votes
0 answers
Android 13 High rate java.util.ConcurrentModificationException in background
Exception java.util.ConcurrentModificationException:
at java.util.WeakHashMap$HashIterator.nextEntry (WeakHashMap.java:807)
at java.util.WeakHashMap$KeyIterator.next (WeakHashMap.java:840)
at java.util.AbstractCollection.toArray…

谢鹦鹉
- 1
0
votes
0 answers
CME Thrown for new ArrayList Initialization
I am encountering a ConcurrentModificationException for the following:
@MainThread
private void notifyAdditionalItemsLoaded(
final @Nullable List newAdditionalItems) {
if (newAdditionalItems != null) {
…

Dash
- 306
- 1
- 3
- 16
0
votes
2 answers
nested streams getting - ConcurrentModificationException
So I am trying to do this problem solving interview question where im givin an array of 6,4,7,9,3,12
and trying to return the three values that would add up to the value 13. The catch is that im only using streams to do this problem. No basic. I…

David Westenberger
- 13
- 4
0
votes
2 answers
I have productListArray and I would like to add product into it but each product has unique ID and unique name and I am getting some errors
before I added the product to the non-empty list, I tried to validate if the product id and name of the product already existed in the list by going through the list and if there is no such id and name in the list then added the product to the…

Abshir M
- 41
- 7
0
votes
3 answers
ConcurrentModificationException during putting new element into HashMap
I have some code:
Map letters = new HashMap();
letters.put(String.valueOf(input.charAt(0)),
numberOfLettersInWord(input,input.charAt(0)));
for (int i = 0; i < input.length(); i++) {
for (String key :…

Ra'Uko Lord
- 13
- 5
0
votes
1 answer
Failed for SynchronizedCollection while serializing an array list
Here is the error stack,
java.util.ConcurrentModificationException
at java.util.ArrayList.writeObject(ArrayList.java:766)
at java.lang.reflect.Method.invoke(Native Method)
at…

Shawn Wong
- 554
- 6
- 15
0
votes
0 answers
Runtime ConcurrentModificationException in java
private static void deleteContact() {
System.out.println("Please enter the name:");
String name = scanner.next();
if (name.equals("")) {
System.out.println("!Please enter the name");
deleteContact();
} else {
…

Mr. Zahangir Alam
- 9
- 1
- 2