[vtkusers] Old Linux:vtkRenderWidgetConeExample() SIGSEGV
Donna Hanlon
donna at v1.wustl.edu
Mon Nov 25 16:48:24 EST 2002
Mystery solved -- Prabhu was right: When building
vtkTkRenderWidgetPython.cxx, the wrong tk.h was being found. The path
for the correct tk.h was among the include paths, but it appeared after
the include path specified by CMakeCache.txt for OPENGL_INCLUDE_PATH:
../CMakeCache.txt:OPENGL_INCLUDE_PATH:PATH=/usr/local/include
This directory happened to have a tk.h from an older version of tcl/tk.
After removing the older tk.h, vtkRenderWidgetConeExample() gives me a
beautiful cone.
Donna Hanlon wrote:
>
> Prabhu Ramachandran wrote:
> > Not sure if this will help but make sure that the version of Tcl/Tk
> > that Python's _tkinter.so links to is exactly the same as the one used
> > to compile VTK with. If there is a mismatch in these one can run into
> > segfaults etc.
>
> They are the same version.
>
> > Besides, I'm sure upgrading from 6.1 to 7.x is a good idea anyway. :)
>
> The only reason we haven't upgraded this host is so we can build on it
> and have our applications run on older platforms. When we build on our
> Red Hat 7.1 host, many of our users have runtime problems (e.g., they
> don't have required GLIBC version). What we build on our older Linux
> host seems to give users fewer runtime problems. Perhaps there is an
> easier way around that problem.
>
> To correct something I said earlier: The well-behaved platforms *are*
> invoking Tk_ConfigureWidget from tkOldConfig.c. The problem seems to be
> that on my old Linux box, Tk_ConfigureWidget doesn't recognize the
> TK_CONFIG_END provided by vtkTkRenderWidget.cxx:
>
> static Tk_ConfigSpec vtkTkRenderWidgetConfigSpecs[] = {
> {TK_CONFIG_PIXELS, (char *) "-height", (char *) "height", (char *)
> "Height",
> (char *) "400", Tk_Offset(struct vtkTkRenderWidget, Height), 0,
> NULL},
>
> {TK_CONFIG_PIXELS, (char *) "-width", (char *) "width", (char *)
> "Width",
> (char *) "400", Tk_Offset(struct vtkTkRenderWidget, Width), 0,
> NULL},
>
> {TK_CONFIG_STRING, (char *) "-rw", (char *) "rw", (char *) "RW",
> (char *) "", Tk_Offset(struct vtkTkRenderWidget, RW), 0, NULL},
>
> {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
> (char *) NULL, 0, 0, NULL}
> };
>
> For whatever reason, this loop gets to an iteration 14 before crashing:
>
> for (specPtr = specs; specPtr->type != TK_CONFIG_END; specPtr++) {
>
> The well-behaved ones exit after iteration 3, because then specPtr->type
> == TK_CONFIG_END. On the old Linux box, this if fails to evaluate as
> true for the fourth Tk_ConfigSpec:
>
> if (specPtr->type == TK_CONFIG_END) printf("TK_CONFIG_END\n");
>
> Odd.
More information about the vtkusers
mailing list