[IPython-user] Ipython-matplotlib thread issue
Thu Jul 17 03:15:08 CDT 2008
On Thu, Jul 17, 2008 at 9:41 AM, Fernando Perez <email@example.com>
> On Thu, Jul 17, 2008 at 12:13 AM, Arnar Flatberg
> <firstname.lastname@example.org> wrote:
> > On Thu, Jul 17, 2008 at 2:12 AM, Fernando Perez <email@example.com>
> > wrote:
> >> On Wed, Jul 16, 2008 at 1:11 AM, Arnar Flatberg
> >> <firstname.lastname@example.org> wrote:
> >> > Hi,
> >> >
> >> > Interactive matplotlib shuts down on me.
> >> >
> >> > I'm sorry, I do not have an example to reproduce the error. I don't
> >> > have a feeling when it happens. However, better to get it reported
> >> > be
> >> > quiet,right?
> >> >
> >> > I am using ipython from trunk (0.9.0.bzr.r1016 on python2.5, ubuntu
> >> > x86) and when working interactive with matplotlib (-pylab) I have
> >> > a
> >> > couple of times) recieved the warning:
> >> >
> >> > Warning: Timeout for mainloop thread exceeded
> >> > switching to nonthreaded mode (until mainloop wakes up again)
> >> >
> >> > After this warning, the matplotlib figures will no longer show or an
> >> > empty
> >> > figure pops up. Well, I am guessing my pylab thread got killed, right?
> >> Mmh, I haven't seen that. That warning comes from a refactoring
> >> that Ville did a few months back to make the threaded code supposedly
> >> more robust. I'm sure he'll be able to provide some further info. He
> >> might be able to suggest how to trigger a failure, case in which we
> >> could try to fix it further.
> >> We'll see where this goes after feedback from Ville (or anyone else
> >> who's knowledgeable on the matter).
> >> Regards,
> >> f
> > Thanks for the response Fernando. I still cant give a reproducible
> > of failure. But the same thing happened to me yesterday, and at least I
> > paying more attention this time. I do not know if it helps but this is my
> > typical scenario of mentioned problem:
> > 1.) I have worked in the ipython shell for quite some time (4-5 hours)
> > 2.) I work with fairly large datasets (500 MB - 1.5 GB), and quite a few
> > them
> > 3.) I have a cocurrent R-session through rpy
> > Now, the above mentioned warning happened after I was looking up a
> > signature (of a local python package) with `?`. There was a period of
> > 5 seconds of wait (processing, nothing happens) before the warning pops
> > Also, ipython freezed when quiting (q), I had to kill the session myself.
> Here's a suggestion:
> around line 430 in IPython/Shell.py, change the '5' in:
> # first make sure the message was received, with timeout
> to 10 or so. This makes ipython wait a bit longer for the gui thread
> before declaring it dead. It's possible that with such large
> datasets, certain operations are taking a bit long, or that you're
> going into swap. This might help... But I'm shooting a bit in the
> dark here, so let us know how it goes.
I've changed the timeout to 10 s, I'll let you know if it plays out well.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user