[vtkusers] vtkPropPicker can't be used in vtkAssembly, need help!
derong
denis_hudr at sina.com
Sun Aug 17 21:52:18 EDT 2003
Hi, All
Did anyone face the trouble to add pick function in vtkAssembly?
I try to build an application to build some assembly objects, and when I use mouse to pick one object
inside the assembly , the box of this object will be displayed.
I choose vtkPropPicker as my picker in my application because it is fast.
But when i try it with MFC programming, it turns out crash unpredictable.
The error message is like this: Invalid Address specified to RtlValidateHeap( 01A60000, 032E5FF0 )
I tried to track this bug in my programs, I found one break point at:
cullPicker->Delete(); (in vtkRenderer.cxx)
one break point follows this is at:
this->Actors->Delete(); (in vtkPicker.cxx).
The final break point is at vtkCollection method DeleteElement(vtkCollectionElement *e):
delete e;
because e's address is 0x032e6010, it beyonds ( 01A60000, 032E5FF0 ).
I also found some suspicous codes in vtkPicker.cxx
In the method: int vtkPicker::Pick(float selectionX, float selectionY, float selectionZ, vtkRenderer *renderer)
There is a statement: this->Prop3Ds->AddItem((vtkProp3D *)prop);
If prop is an assembly, one same assembly can be added several times after I picked something in assembly.
Is that reasonable?
By the way, I have tested my application without any assembly. It works fine.
I feel frustrating with this bug in my application. Any hint will be helpful.
Regards.
Derong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030817/773709f8/attachment-0006.htm>
More information about the vtkusers
mailing list