MantisBT - VTK
View Issue Details
0006609VTK(No Category)public2008-03-14 15:282013-04-05 20:17
Goodwin Lawlor 
David Cole 
normalminoralways
closedfixed 
 
 
0006609: VTK Tcl wrappers repeat error message
With 2008 CVS versions, the tcl wrappers accend the class hierarchy looking for a method invoked but accumulate the "could not find requested method" message for each class. There is some code to prevent this (strstr...) but it doesn't seem to work anymore - dont know if a bug was introduced (can't see a culprit) or moving to tcl8.5 causes the problem.

You can reproduce the bug simply with:
VTK CVS, Tcl/Tk8.5.x, MS VC+9, WinXP-SP2

package require vtk

vtkCone c
  c MethodNotHere

Attached is a patch that fixes the problem by only including the error handler at the top of the source tree - vtkObjectBase
No tags attached.
patch vtkWrapTcl.c.patch (1,353) 2008-03-14 15:28
https://www.vtk.org/Bug/file/6355/vtkWrapTcl.c.patch
Issue History
2008-03-14 15:28Goodwin LawlorNew Issue
2008-03-14 15:28Goodwin LawlorFile Added: vtkWrapTcl.c.patch
2008-03-14 16:21Goodwin LawlorNote Added: 0010812
2008-08-11 17:12David ColeStatusbacklog => tabled
2008-08-11 17:12David ColeAssigned To => David Cole
2008-08-11 17:13David ColeNote Added: 0012985
2008-08-12 14:32David ColeStatustabled => @80@
2008-08-12 14:32David ColeResolutionopen => fixed
2008-08-12 14:32David ColeNote Added: 0012991
2011-01-13 17:00Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-04-05 20:17Berk GeveciStatuscustomer review => closed

Notes
(0010812)
Goodwin Lawlor   
2008-03-14 16:21   
This problem is caused by interp->result being deprecated in Tcl8.5. Tcl_GetStringResult(interp) is supposed to be used instead.

I think the patch might be a better solution anyway since the condition only has to be tested once, rather than for each superclass.
(0012985)
David Cole   
2008-08-11 17:13   
Fixed in CVS HEAD:
/cvsroot/VTK/VTK/Wrapping/vtkWrapTcl.c,v <-- Wrapping/vtkWrapTcl.c
new revision: 1.64; previous revision: 1.63

Will merge to the VTK-5-2 branch after a night on the dashboards.
(0012991)
David Cole   
2008-08-12 14:32   
This was merged to the VTK-5-2 branch along with some other changes to the Tcl wrapping code:

    /cvsroot/VTK/VTK/Common/Testing/Tcl/TestSetGet.tcl,v <-- Common/Testing/Tcl/TestSetGet.tcl
    new revision: 1.16.2.1; previous revision: 1.16
    /cvsroot/VTK/VTK/Wrapping/vtkWrapTcl.c,v <-- Wrapping/vtkWrapTcl.c
    new revision: 1.59.2.1; previous revision: 1.59
    /cvsroot/VTK/VTK/Wrapping/vtkWrapTclInit.c,v <-- Wrapping/vtkWrapTclInit.c
    new revision: 1.20.2.1; previous revision: 1.20