I’m occasionally getting the following partial error stack occurring with some customer installations:
IteratorException Dictationary was mutated while iterating over it xojo.Core._DictionaryIterator.MoveNext%b%o<xojo.Core._DictionaryIterator> xojo.Core.Timer.!CancelCall%%o<xojo.Core.Timer.CallNoParams> TCPSocketPlus.Event_DataAvailable%%o<TCPSocketPlus> SocketCore.Connect%%o<SocketCore>
TCPSocketPlus is a subclass of TCPSocket. In the DataAvailable event of the socket, I have the following code:
Sub DataAvailable() If me.Lookahead.Len > 0 Then Xojo.Core.Timer.CancelCall(AddressOf ResetConnection) RaiseEvent DataAvailable End If Exception err as NilObjectException Return End Sub
Now the method ResetConnection has is:
Sub ResetConnection() mSockConnected = False me.close ErrorMethod End Sub
mSockConnected is a private boolean property of the socket. Error method basically raises the error event for the socket.
No where do I see anything in my code about a dictionary. So I am wondering if this is in the framework somewhere??
I don’t think it’s anything else in the code or anything in the raised error event as the stack would show that. The stack shows the error happening in the DataAvailable event. But I have showed you what’s there.
So I’m confused…