mayavi on MacOS X 10.7.4::: X Error of failed request: BadWindow

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mayavi on MacOS X 10.7.4::: X Error of failed request: BadWindow

Felipe Tagle
Hello,
I've been unable to get the macports py27-mayavi installation to work.
In trying out the example in the scipy lecture notes:

import numpy as np
x, y = np.mgrid[-10:10:100j, -10:10:100j]
r = np.sqrt(x**2 + y**2)
z = np.sin(r)/r

from mayavi import mlab
mlab.surf(z, warp_scale='auto')

....this last command results in the error:
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Resource id in failed request:  0xb587ece0
  Serial number of failed request:  7
  Current serial number in output stream:  9

after which python crashes. I've tried installing vtk5 with different
arguments but can't get passed this error. Below is a selection of the
ports that I have installed which may hint at the root of the problem.
Thanks in advance for any help!

best,
Felipe

  py27-matplotlib @1.1.0_3+tkinter
  py27-matplotlib @1.1.1_0+tkinter (active)
  py27-mayavi @4.1.0_0 (active)
  py27-modulegraph @0.9.1_0 (active)
  py27-numpy @1.6.2_0 (active)
  py27-pyface @4.1.0_0+pyqt4 (active)
  py27-pyqt4 @4.9.1_0
  py27-pyqt4 @4.9.1_1 (active)
  py27-scipy @0.10.1_2+gcc45 (active)
  py27-tkinter @2.7.3_0 (active)
  py27-traits @4.1.0_0 (active)
  py27-traitsui @4.1.0_0 (active)
  py27-wxpython @2.8.12.1_1 (active)
  python27 @2.7.3_0
  python27 @2.7.3_0+universal (active)
  qt4-mac @4.8.2_0+quartz
  qt4-mac @4.8.2_2+quartz (active)
  tcl @8.5.11_0
  tcl @8.5.12_1 (active)
  tk @8.5.11_0
  tk @8.5.12_0 (active)
  vtk5 @5.10.0_0+python27+tcltk+x11 (active)
  wxWidgets @2.8.12_0 (active)
  xrender @0.9.7_0
  xrender @0.9.7_0+universal (active)
  xz @5.0.4_0+universal (active)
  zlib @1.2.7_0
  zlib @1.2.7_0+universal (active)
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: mayavi on MacOS X 10.7.4::: X Error of failed request: BadWindow

Gael Varoquaux
On Thu, Aug 30, 2012 at 06:19:57PM -0400, Felipe Tagle wrote:
> import numpy as np
> x, y = np.mgrid[-10:10:100j, -10:10:100j]
> r = np.sqrt(x**2 + y**2)
> z = np.sin(r)/r

> from mayavi import mlab
> mlab.surf(z, warp_scale='auto')

> ....this last command results in the error:
> X Error of failed request:  BadWindow (invalid Window parameter)
>   Major opcode of failed request:  2 (X_ChangeWindowAttributes)
>   Resource id in failed request:  0xb587ece0
>   Serial number of failed request:  7
>   Current serial number in output stream:  9

Hum. Not nice. This is probably a C-level crash. Ideally, it would help
if you could run this in a C-level debugger, to show us where the crash
happens:
http://scipy-lectures.github.com/advanced/debugging/index.html#debugging-segmentation-faults-using-gdb

Also, can you tell us the exact step to reproduce, i.e how you are
running this code (in IPython or another environment, and if so with what
option you started the environment).

Cheers,

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: mayavi on MacOS X 10.7.4::: X Error of failed request: BadWindow

Felipe Tagle
Hi Gael,
Thanks for your response. I'm running it on terminal, calling python
(2.7.3) with no arguments. I tried following your instructions but
have run into some problems: using the Xcode gdb (/usr/bin/gdb) and
running "gdb python" results in a series of warnings of the type:

warning: Could not find object file
"/Volumes/work/macports/var/macports/build/_Volumes_work_mports_dports_lang_python27/python27/work/Python-2.7.3/libpython2.7.a(acceler.o)"
- no debug information available for "acceler.c".

...and then executing "(gdb) run mayavitest.py" (where mayavitest.py
is just wrapper for the example I used before) spits out again another
series of warnings

warning: Could not find object file
"/Volumes/work/macports/var/macports/build/_Volumes_work_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6/decompress.o"
- no debug information available for "decompress.c".

...terminating with

Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Resource id in failed request:  0x16971950
  Serial number of failed request:  7
  Current serial number in output stream:  9

Since it seemed that macports was the issue, I installed the macports
version of gdb (gdb @7.3_1 (active)), but calling "ggdb python" or
"ggdb /usr/bin/python" results in

"/opt/local/bin/python": not in executable format: File format not recognized

any ideas how to get around this??

thanks!
Felipe

On Fri, Aug 31, 2012 at 7:49 AM, Gael Varoquaux
<[hidden email]> wrote:

> On Thu, Aug 30, 2012 at 06:19:57PM -0400, Felipe Tagle wrote:
>> import numpy as np
>> x, y = np.mgrid[-10:10:100j, -10:10:100j]
>> r = np.sqrt(x**2 + y**2)
>> z = np.sin(r)/r
>
>> from mayavi import mlab
>> mlab.surf(z, warp_scale='auto')
>
>> ....this last command results in the error:
>> X Error of failed request:  BadWindow (invalid Window parameter)
>>   Major opcode of failed request:  2 (X_ChangeWindowAttributes)
>>   Resource id in failed request:  0xb587ece0
>>   Serial number of failed request:  7
>>   Current serial number in output stream:  9
>
> Hum. Not nice. This is probably a C-level crash. Ideally, it would help
> if you could run this in a C-level debugger, to show us where the crash
> happens:
> http://scipy-lectures.github.com/advanced/debugging/index.html#debugging-segmentation-faults-using-gdb
>
> Also, can you tell us the exact step to reproduce, i.e how you are
> running this code (in IPython or another environment, and if so with what
> option you started the environment).
>
> Cheers,
>
> Gaël
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev