Ondrej Certik | 21 Jul 11:05

Re: show mesh in mayavi2, segfault

On Mon, Jul 21, 2008 at 2:26 AM, Gael Varoquaux
<gael.varoquaux@...> wrote:
> On Mon, Jul 21, 2008 at 02:15:37AM +0200, Ondrej Certik wrote:
>> > This should work:
>
>> > $ mayavi2 -d foo.vtk -m Outline -m IsoSurface
>
>> It says:
>
>> ERROR|2008-07-21 02:04:30,892|Cannot contour: No scalars in input data!
>
> Isn't the error message clear (:->), it is trying to contour the surface,
> but it cannot, because there are no scalars defined :). You can view your
> file using
>
> $ mayavi2 -d foo.vtk -m Outline -m Surface
>
> I just tried, and it works. But that doesn't solve your main problem,
> that is that what you tried first should work.

It only shows a white rectangle, for me. I would like to see the
actual mesh. If you do "paraview --data=mesh.vtk", click apply and
then set Display->Style->Representation->    Surface With Edges   (it
is a popup on the toolbar), it shows the mesh. 10x10 in this case.

I need it to debug my mesh generator, so I want to craft a little
python script that shows me the result immediately, without having to
point and click with a mouse. Also I want to customize the output for
my particular case (e.g. maybe put this option and code directly to
the mesh generator) and I think mayavi2 is perfectly suited for this.

>
>> $ mayavi2 -x show_grid.py
>> bug-buddy: symbol lookup error: /usr/lib/libxml2.so.2: undefined
>> symbol: gzopen64
>
>> The same as before:
>
>> $ python show_grid.py
>> bug-buddy: symbol lookup error: /usr/lib/libxml2.so.2: undefined
>> symbol: gzopen64
>
> Damn. This works on my box (ubuntu hardy) both with mayavi2 from branches

It works for me too, unless I import sfepy (but otherwise do nothing!)
in the script.

> and trunk. I suspect a distribution problem. This reference to an
> undefined symbol in libxml2 feels like there has been some API
> breakage/linking problem with libxml2.

I got the same error when I was exporting LD_LIBRARY_PATH to Sage, so
libxml2.so was using Sage's libz and that broke stuff. So I removed
that LD_LIBRARY_PATH and all is ok.

>
> I am not too sure that the problem is in the Mayavi2 or TVTK code base.

Do you (or anyone) have time to fix it? If so, I'll create you an
account on a box where it breaks, so that you can investigate.
I prepared everything, I can reproduce it even over "ssh -X", it seems
the bug is on any Debian sid, both i386 and amd64. Send me your public
ssh key offlist.

Ondrej

Gmane