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

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Thu Jan 16 15:47:27 EST 2003


Thanks for the feedback, I didn't actually realise it was my code that was
causing the trouble when I committed it, I thought there were problems with
the LoadCommand command.

The trouble I'm having (apart from a lack of time to look at it properly) is
that when I try to fetch the cmSourcefile object for a wrapped tcl file, it
is NULL. When I ask for it to be created, it isn't behaving correctly and I
can't get the path out. I get dodgy access violations and because the
existing code seems to not mind there being a NULL object I'm puzzled about
what's going on. 'll have another look at it after I click send and if I
can't sort it out this evening, I'll back out my changes and simply submit a
bug report to the list :)


JB

----- Original Message -----
From: "Ken Martin" <ken.martin at kitware.com>
To: "'John Biddiscombe'" <jbiddiscombe at skippingmouse.co.uk>;
<vtk-developers at public.kitware.com>; "'Bill Hoffman'"
<bill.hoffman at kitware.com>
Sent: Thursday, January 16, 2003 2:18 PM
Subject: RE: [vtk-developers] CMake1.6beta1 Error.log -
cmVTKWrapTcl2Command.c


> 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