Having to "print" before method invocation?

  • Thread starter Jeremy L. Moles
  • Start date
J

Jeremy L. Moles

I have an object (written as part C extension, part pure Python) called
foo that I've been using without much fuss for a few months now.
However, in my latest project (a rather large one involving
multi-threading, pygtk, etc.), I'm seeing some really strange behavior
with a particular instance of my foo object.

About midway through my program, any attempt to use the instance fails;
however, if I add print statements before trying to invoke methods on
it, the foo object instance works fine.

I thought it might have something to do w/ reference counting, but
calling sys.getrefcount() shows sane values both before and after the
method call.

I know it's almost pointless to ask this question w/out showing any
code, but does anyone have any general ideas about what might make
something "invalid" unless you print it to stdout before using it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top