Segmentation faults with show() in ipython

Hi All,
some time ago I lost the ability to plot anything from within ipython. For example ...

In [1]:from pylab import *

In [2]:plot(range(20),range(20))

···

---------------------------------------------------------------------------
exceptions.SystemError Traceback (most recent call last)

SystemError: Objects/moduleobject.c:48: bad argument to internal function
Segmentation fault

The above occurs both with "ipython -pylab" and also "ipython" with the ahow() command at the end. Thankfully everything works with the vanilla python interpreter.

Its possible that this became broken after changing my OS to Redhat EL4. Updating to the SVN version of ipython has not helped.
I have python 2.3.4, and matplotlib 0.83.2

Has anyone seen anything like this?
Any advice?

Cheers,
Cory.

--
---------------------------------------------------
Cory Davis
Institute for Atmospheric and Environmental Science
Room 307, Crew Building, Kings Buildings,
University of Edinburgh. Edinburgh EH9 3JN
phone: +44 131 6505092
www: http://www.geos.ed.ac.uk/contacts/homes/cdavis

Cory Davis wrote:

Hi All,
some time ago I lost the ability to plot anything from within ipython. For example ...

In [1]:from pylab import *

In [2]:plot(range(20),range(20))
---------------------------------------------------------------------------
exceptions.SystemError Traceback (most recent call last)

SystemError: Objects/moduleobject.c:48: bad argument to internal function
Segmentation fault

The above occurs both with "ipython -pylab" and also "ipython" with the ahow() command at the end. Thankfully everything works with the vanilla python interpreter.

Its possible that this became broken after changing my OS to Redhat EL4. Updating to the SVN version of ipython has not helped.
I have python 2.3.4, and matplotlib 0.83.2

Has anyone seen anything like this?

I have: it's a GTK-backend only bug, as far as I've seen. I normally don't use GTK, so it doesn't bother me too much. You can work around the problem by switching to any other backend (TkAgg, WXAgg, QtAgg will all do).

Any advice?

The problem is _extremely_ strange, and the nastiest part is that John hasn't been able to see it. I even gave him an account on one of my local system, and the bug doesn't appear for him when SSH'd into Colorado from Chicago (he can display plot windows over X11), though I do see it logged in as his user at the console.

This can't be explicitly an ipython bug, since ipython is pure python code (so it can't segfault by itself), but it's most likely a threading problem triggered by ipython. John and I are at a loss as to what can be going on here, and any ideas would be most welcome.

I may try to dig deeper into it, but since I don't know my way around the pygtk and maptlotlib gtk codes, I'm not terribly hopeful (and it won't be done until I clear the big backlog of ipython issues I have on my plage).

Sorry not to be able to offer a better answer right now...

Regards,

f

Thanks Fernando,
I was pleasantly surprised to find that TkAgg works on my RHEL4 system without me troubling our system administrators. If it helps, ipython, matplotlib and GTKAgg work fine on my Fedora Core 2 laptop.
Cheers,
Cory.

Fernando Perez wrote:

···

Cory Davis wrote:

Hi All,
some time ago I lost the ability to plot anything from within ipython. For example ...

In [1]:from pylab import *

In [2]:plot(range(20),range(20))
---------------------------------------------------------------------------

exceptions.SystemError Traceback (most recent call last)

SystemError: Objects/moduleobject.c:48: bad argument to internal function
Segmentation fault

The above occurs both with "ipython -pylab" and also "ipython" with the ahow() command at the end. Thankfully everything works with the vanilla python interpreter.

Its possible that this became broken after changing my OS to Redhat EL4. Updating to the SVN version of ipython has not helped.
I have python 2.3.4, and matplotlib 0.83.2

Has anyone seen anything like this?

I have: it's a GTK-backend only bug, as far as I've seen. I normally don't use GTK, so it doesn't bother me too much. You can work around the problem by switching to any other backend (TkAgg, WXAgg, QtAgg will all do).

Any advice?

The problem is _extremely_ strange, and the nastiest part is that John hasn't been able to see it. I even gave him an account on one of my local system, and the bug doesn't appear for him when SSH'd into Colorado from Chicago (he can display plot windows over X11), though I do see it logged in as his user at the console.

This can't be explicitly an ipython bug, since ipython is pure python code (so it can't segfault by itself), but it's most likely a threading problem triggered by ipython. John and I are at a loss as to what can be going on here, and any ideas would be most welcome.

I may try to dig deeper into it, but since I don't know my way around the pygtk and maptlotlib gtk codes, I'm not terribly hopeful (and it won't be done until I clear the big backlog of ipython issues I have on my plage).

Sorry not to be able to offer a better answer right now...

Regards,

f

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
---------------------------------------------------
Cory Davis
Institute for Atmospheric and Environmental Science
Room 307, Crew Building, Kings Buildings,
University of Edinburgh. Edinburgh EH9 3JN
phone: +44 131 6505092
www: http://www.geos.ed.ac.uk/contacts/homes/cdavis

Cory Davis wrote:

Thanks Fernando,
I was pleasantly surprised to find that TkAgg works on my RHEL4 system without me troubling our system administrators. If it helps, ipython, matplotlib and GTKAgg work fine on my Fedora Core 2 laptop.

Glad to know you have at least a workaround, though I'd still like to get this fixed. I'm sure there are people who _need_ gtk for other reasons, and thus can't switch backends. The fact that the bug only appears with specific combinations of matplotlib version, OS and connection type (as I said, an SSH login with tunneled X11 doesn't show it on a system which does show it at the console), makes this problem all the more frustrating.

Cheers,

f