Seg fault with 0.85cvs on ubuntu Breezy

I just downloaded the latest cvs snapshot and did a sudo python
setup.py install. This process finished cleanly, but if I use the
WXAgg backend, pylab.show() causes a seg fault. How do I get more
information to fix this problem? The TkAgg backend seems to work
fine. I am running ubuntu Breezy Linux.

Ryan

Ryan,

Could you please test and see if the segfaults continue to occur when the WxAgg accelerator has been disabled? Also, short script that reproduces this problem would be appreciated. Thanks.

Ken

Hey Ken,

Sorry to make more work for you. Yes, turning off the accelerator
gets rid of the seg fault:
In [7]: %hist
1: import matplotlib.backends.backend_wxagg
2: import matplotlib.backends.backend_wxagg
3: matplotlib.backends.backend_wxagg._use_accelerator(False)
4: matplotlib.__version__
5: figure(1)
6: show()

after this show command an empty plot pops up with problem. Then

reactivating the accelerator leads to the seg fault:

In [8]: matplotlib.backends.backend_wxagg._use_accelerator(True)

In [9]: pylab.close('all')

In [10]: figure(1)
Segmentation fault

Let me know what to try next. Another strace?

Ryan

···

On 10/26/05, Ken McIvor <mcivor@...612...> wrote:

Ryan,

Could you please test and see if the segfaults continue to occur when the
WxAgg accelerator has been disabled? Also, short script that reproduces this
problem would be appreciated. Thanks.

Ken

Ryan Krauss wrote:

Sorry to make more work for you. Yes, turning off the accelerator
gets rid of the seg fault:

That's what I was afraid of hearing. I haven't been able to reproduce this under Debian Sarge or Sid.

Let me know what to try next. Another strace?

I'm not sure that an strace will help too much. I probably need the segfault stacktrace, which you can get by attaching GDB to the Python process. Please let me know if I shoudl send you instructions.

Also, please check that your system configuration is comparable to my Sid environment, which is:

  Python: 2.3.5
  IPython: 0.6.15
  wxPython: 2.6.1.2pre
  matplotlib: 0.85cvs

Finally, please double-triple-extra check that your wxPython header files correspond exactly to the version of wxPython you are using. If they don't, then all bets are off.

Ken

Ryan,

I'm afraid there isn't a Debian package for Python2.4+wxPython2.6, so I can't test that combination. Our best bet is to go for the GDB stack trace, like so:

  1. Write an iPython script that reproduces the segfault:
    $ ipython <test-script>
    <snip>
    Segmentation fault
  2. Find out where Python lives:
    $ which python
    /usr/bin/python
  2. Find out where iPython lives:
    $ which ipython
    /usr/bin/ipython
  3. Launch gdb:
    $ gdb <path-to-python>
    <snip>
    (gdb) run <path-to-ipython> <test-script>
  4. Get the backtrack:
    Program received signal SIGSEGV, Segmentation fault.
    <snip>
    (gdb) bt
    #0 ...
    #1 ...
    <snip>
    #N ...

Please email me everything that is printed by the "bt" command. You'll probably have to copy and paste several screens of backtrace. Thanks!

Ken

Thanks Ken. I will try this tomorrow after I make sure I have the
right wxPython.h.

Ryan

···

On 10/28/05, Ken McIvor <mcivor@...612...> wrote:

Ryan,

I'm afraid there isn't a Debian package for Python2.4+wxPython2.6, so I can't
test that combination. Our best bet is to go for the GDB stack trace, like so:

        1. Write an iPython script that reproduces the segfault:
                 ipython &lt;test\-script&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;snip&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Segmentation fault &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2\. Find out where Python lives: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; which python
                /usr/bin/python
        2. Find out where iPython lives:
                 which ipython &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/bin/ipython &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3\. Launch gdb: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gdb <path-to-python>
                <snip>
                (gdb) run <path-to-ipython> <test-script>
        4. Get the backtrack:
                Program received signal SIGSEGV, Segmentation fault.
                <snip>
                (gdb) bt
                #0 ...
                #1 ...
                <snip>
                #N ...

Please email me everything that is printed by the "bt" command. You'll
probably have to copy and paste several screens of backtrace. Thanks!

Ken