Xojo.Core.Timer.CancelCall Error

Hey gang,

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…

What release of Xojo are you using? This bug was fixed a release or two ago.

2015r2.2

So I guess it’s not fixed.

So is this still a bug. Do I need to file a report?

Hi Joe - is this a bug? Do I need to file a report?

I’m seeing this happen regularly now.

It’s definitely a bug. Could you try the 2015r3 alphas before filing a bug report? I swear this was fixed at some point, so perhaps it was for r3.

I’m not an alpha user

Okay, I looked it up and I was thinking of case 38611, which was fixed for 2015r1. If you’re still seeing this, please file a bug report.

Well, yes I am seeing it. I’ll file a report sometime in the next couple of days. I’m traveling right now.