Opened 15 years ago

Last modified 13 years ago

#147 new defect

NoneType is not callable error in RemoteReferenceTracker — at Initial Version

Reported by: bgranger Owned by:
Priority: major Milestone: eventually
Component: unknown Version: 0.4.1
Keywords: Cc:

Description

Brian,

A few months ago, I emailed you about this. I said I would file a ticket, but lost track of it. Here is the report.

I hope things are going well. I am seeing a very odd error in foolscap occasionally. Here is what I see:

Exception exceptions.TypeError?: "'NoneType?' object is not callable" in <bound method RemoteReferenceTracker?._refLost of <RemoteReferenceTracker?(clid=1,url=pb://ahrpv6rtya6exuk75h2quxaubdkdubst@10.0.1.163:55071,127.0.0.1:55071/quegnf6enammggq33rgwiq3sgdt4dhh5)>> ignored

This happens sometimes when my foolscap using process *ends*. I looked at RemoteRemoteReferenceTracker?:

def _refLost(self, wref):

# don't do anything right now, we could be in the middle of all sorts # of weird code. both del and weakref callbacks can fire at any # time. Almost as bad as threads..

# instead, do stuff later. eventually(self._handleRefLost)

def _handleRefLost(self):

if self.ref() is None:

count, self.received_count = self.received_count, 0 if count == 0:

return

self.broker.freeYourReference(self, count)

# otherwise our RemoteReference? is actually still alive, resurrected # between the call to _refLost and the eventual call to # _handleRefLost. In this case, don't decref anything.

I suspect the problem is in _handleRefLost, when it does if self.ref() is None. For some reason self.ref is None so calling it gives the TypeError?. Should this be protected by a "if self.ref is None"?

Your response:

Yeah, please file a bug on that one. Your analysis sounds correct, but I'd need to walk through the code to find where .ref is being manipulated, and a bug will help me not forget about it. (it'll be mid-week before I get a chance to look at it).

Thanks,

Brian Granger

Change History (0)

Note: See TracTickets for help on using tickets.