java.util.ConcurrentModificationException - application scope

Description

    public void function reset() {         loop struct=application index="local.k" item="local.v" {             if(findNoCase(variables.cacheAppendix,k))                 structDelete(application,k,false);         }         readExtensions(flush=true);     }

this was randomly throwing an error on the loop on line 2 (now i can’t reproduce)

"java.util.ConcurrentModificationException;lucee.runtime.exp.NativeException: java.util.ConcurrentModificationException /index.cfm:6 at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719) at java.base/java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:751) at java.base/java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:749) at s3ext_cfc$cf$2b.udfCall1(/S3Ext.cfc:16) at s3ext_cfc$cf$2b.udfCall(/S3Ext.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:696)

Environment

None

Activity

Show:

Pothys - MitrahSoft 13 January 2023 at 06:24

I added a testcase to this ticket

Pull Request: https://github.com/lucee/Lucee/pull/1930

Pothys - MitrahSoft 12 January 2023 at 15:17

I've checked this ticket and confirmed the issue happened on the lucee latest version 5.4.0.30-SNAPSHOT too. Looping the struct and trying to delete the key from the same struct throws an error like java.util.ConcurrentModificationException. Also, this error happens with ordinary structs too.

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 27 December 2022 at 14:37
Updated 5 July 2023 at 10:57

Flag notifications