[vtk-developers] CMake1.6beta1 Error.log - cmVTKWrapTcl2Command.c

Ken Martin ken.martin at kitware.com
Thu Jan 16 09:18:13 EST 2003


Hello John,

We do have one build that uses the cmVTKWrapTcl2Command and it was
crashing after you checked in your changes. Yesterday I think I fixed
the crash. The problem was you were using a variable before setting it.
Basically you had

void *foo;
CallFunc(foo)
foo = aValue;

so I fixed it. Please do not check in code you know crashes as we may
not have time to look at it immediately. We lost a dashboard for a week
before I had time to look at this and I still haven't looked to see if
the command works now after your change. I simply fixed the crash. As
far as hints on how to get it right, the basic approach I used to debug
this was the following:

1) see what line it crashed on (from the debugger) (using a debug build
with the same compiler for cmake and VTK.)
2) go up in scope until that variable is a local variable
3) see that a local variable was being accessed on that line
4) reverse search for that variable in emacs to find its declaration
5) forward search from the declaration to find its first use
6) if the first use was not an assignment then it could be uninitialized
7) continue searching to see if the variable is assigned later in the
file
8) if so, that is probably the problem, examine code for possible fixes.


> Please note that cmVTKWrapTcl2Command.c is broken and crashes when
> executed
> (on MS and Borland builds). The current vtk tree uses only
VTK_WRAP_TCL
> commands and not VTK_WRAP_TCL2 (ie no testing of this command is
done). I
> would again like to ask for a few hints on how to get it right if
anyone
> has
> a spare moment. (Also note that all the other custom wrapper commands
are
> likely to fail when given relative paths, though I've not tested them)

The VTK wrappers do not need relative paths for its build so the
commands do not support them. Certainly this is a nice addition and can
be added but it isn't at the top of the list right now.

Thanks
Ken






More information about the vtk-developers mailing list