[vtkusers] vtkImageExportToArray + VTK4

Mathieu Malaterre mmalat at irus.rri.ca
Fri Apr 26 14:47:30 EDT 2002


Hi everybody,
    Does anyone of you try vtkImageExportToArray with VTK4 (in fact cvs from today). Because I
get a core dump with only:


from vtkpython import *
from vtkImageExportToArray import *

edgemap = vtkPNMReader()
edgemap.SetFileName("images/earth_edge.ppm")

a = vtkImageExportToArray()
a.SetInput(edgemap.GetOutput())
a.GetArray()


and here is the output of gdb:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 31917)]
PyType_IsSubtype (a=0xffffffff, b=0x80e1ea0) at Objects/typeobject.c:392
392     Objects/typeobject.c: No such file or directory.
        in Objects/typeobject.c
(gdb) bt
#0  PyType_IsSubtype (a=0xffffffff, b=0x80e1ea0) at Objects/typeobject.c:392
#1  0x080894f1 in convertsimple (arg=0x8111460, p_format=0xbfffec0c, p_va=0xbfffef18,
msgbuf=0xbfffecd0 "Xíÿ¿\001",
    bufsize=512) at Python/getargs.c:600
#2  0x0808a431 in vgetargskeywords (args=0x81702c4, keywords=0x0, format=0x419a6474 "si",
kwlist=0x419a7b2c,
    p_va=0xbfffef18) at Python/getargs.c:357
#3  0x0808a108 in PyArg_ParseTupleAndKeywords (args=0x81702c4, keywords=0x0, format=0x419a6471
"s#|si", kwlist=0x419a7b2c)
    at Python/getargs.c:1026
#4  0x419a4d0b in array_fromString (ignored=0x0, args=0x81702c4, keywds=0x0) at
Src/multiarraymodule.c:1158
#5  0x080c6550 in PyCFunction_Call (func=0x8214330, arg=0x81702c4, kw=0x0) at
Objects/methodobject.c:101
#6  0x080a7808 in PyObject_Call (func=0x8214330, arg=0x81702c4, kw=0x0) at
Objects/abstract.c:1665
#7  0x0807a31c in do_call (func=0x8214330, pp_stack=0xbffff084, na=2, nk=0) at
Python/ceval.c:3251
#8  0x08077087 in eval_frame (f=0x821be54) at Python/ceval.c:1988
#9  0x0807816b in PyEval_EvalCodeEx (co=0x821b608, globals=0x82150dc, locals=0x0,
args=0x81153a8, argcount=1,
    kws=0x81153ac, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2574
#10 0x0807a293 in fast_function (func=0x827a7e4, pp_stack=0xbffff1e4, n=1, na=1, nk=0) at
Python/ceval.c:3153
#11 0x0807714d in eval_frame (f=0x811525c) at Python/ceval.c:2013
#12 0x0807816b in PyEval_EvalCodeEx (co=0x8148140, globals=0x810e2d4, locals=0x810e2d4,
args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2574
#13 0x0807a232 in PyEval_EvalCode (co=0x8148140, globals=0x810e2d4, locals=0x810e2d4) at
Python/ceval.c:488
#14 0x08093f69 in run_node (n=0x8104cb8, filename=0xbffff5a3 "temp.py", globals=0x810e2d4,
locals=0x810e2d4,
    flags=0xbffff35c) at Python/pythonrun.c:1083
#15 0x080928dd in PyRun_SimpleFileExFlags (fp=0x80feb48, filename=0xbffff5a3 "temp.py",
closeit=1, flags=0xbffff35c)
    at Python/pythonrun.c:689
#16 0x0805349e in Py_Main (argc=2, argv=0xbffff414) at Modules/main.c:369
#17 0x40085177 in __libc_start_main (main=0x8052db0 <main>, argc=2, ubp_av=0xbffff414,
init=0x80521b8 <_init>,
    fini=0x80cb020 <_fini>, rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffff40c) at
../sysdeps/generic/libc-start.c:129
(gdb)


Any help welcome.
mathieu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mmalat.vcf
Type: text/x-vcard
Size: 392 bytes
Desc: Card for Mathieu Malaterre
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020426/472f1dac/attachment.vcf>


More information about the vtkusers mailing list