TCP Server And Client Example model give ConcurrentModificationException #3334
Labels
About Models Library
This issue or request concerns the models shipped with GAMA
About Networking
Concerns the network plugin and all network-related activities in GAMA
👍 Fix to be tested
V. 1.8.2
Bug specific to 1.8.2
To Reproduce
Steps to reproduce the behavior:
2 occurrences in 2 agents at cycle 1: Java error: ConcurrentModificationException
in write (name + ' received : ') + mm.contents color: color ;
ConcurrentModificationException: null
java.base/java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1486)
java.base/java.util.TreeMap$KeyIterator.next(TreeMap.java:1540)
com.thoughtworks.xstream.core.util.PrioritizedList$PrioritizedItemIterator.next(PrioritizedList.java:91)
com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:73)
com.thoughtworks.xstream.XStream$1.lookupConverterForType(XStream.java:472)
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:56)
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
when applying the contents operator on ummisco.gama.network.common.CompositeGamaMessage@7b6c7db2
in write (name + ' received : ') + mm.contents color: color ;
in loop while: self.has_more_message() {
message mm <- self.fetch_message();
write (name + ' received : ') + mm.contents color: color ;
}
in reflex receive when: self.has_more_message() {
loop while: self.has_more_message() {
message mm <- self.fetch_message();
write (name + ' received : ') + mm.contents color: color ;
}
}
in agents Server0, Simulation 0
However the TCP Teleportation still works well.
Expected behavior
No error
gama git 1.8.2, win 11
The text was updated successfully, but these errors were encountered: