[vtkusers] Unhandled exception at the time of Unregistering vtkSmartPointer

cel02000 cel02000 at yahoo.com
Sat Jun 9 18:31:19 EDT 2012


David,

Thanks for your help. It solved the problem with that function. However, I
still have a lot of problems in other functions after changing their
argument from vtkSmartPointer to pointers. I get unhandled exceptions as
well as the following errors. 

*(1)*
/Windows has triggered a breakpoint in mycode.exe.
This may be due to a corruption of the heap, which indicates a bug in
mycode.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while mycode.exe has focus.
The output window may have more diagnostic information.
/

*(2)*
I also get the following strange output when I print one of my
vtkDoubleArray in one of my functions. 
/vtkDoubleArray (0000000006871CE0)
  Debug: Off
  Modified Time: 1855
  Reference Count: 1
  Registered Events: (none)
  Name: ?-y'-H-++M+µK[++?-y'-H-+v/¦f+n¦+?ù¦µ+˜¦+9j^?
ù¼+;SvvHBñ+?[«è?áá+v¿+(¦-¿+s+L[AK¦+â=[N+ª++KQ>B¦@++£í_¢+7¦+KQ>B¦@++ï=[N+ª++abÅewD¦+z¿+(¦-¿+?[«è?áá+=+?¦.-ç+Fk+u«nô+B?úcO+Ñ+vGó?
R++ß?=uj:¦+¢)-7ó-++¦-ê?d¦+¦Gó?
R++F?úcO+Ñ+ek+u«nô+=+?¦.-ç+ at +?¦.-ç?¦k+u«nô?C-g--+Ñ?8Gó?
R+?-?=uj:¦?ë)-7ó-?+?=uj:¦?(Gó?
R+?8?úcO+Ñ?Gk+u«nô?@+?¦.-ç?¶[«è?áá?v¿+(¦-¿?µ+L[AK¦?â=[N+ª+?KQ>B¦@+?£í_¢+7¦?KQ>B¦@+?ï=[N+ª+?abÅewD¦?z¿+(¦-¿?¶[«è?áá?:SvvHBñ?5j^?
ù¼??ù¦µ+˜¦?·/¦f+n¦?B-y'-H-?-M+µK[+?C-y'-H-?¦/¦f+n¦?¶ù¦µ+˜¦?8j^?
ù¼?:SvvHBñ??»@-GTú?
¥ï-X+¬??»@-GTú?·n+æDxá?+5¦e?Oñ?\n=S-?-?pö¤d¦U¦?7êF+~n+?Å,9í¬ú¦?
  Data type: double
  Size: 1331
  MaxId: 1330
  NumberOfComponents: 1
  Information: 0000000000000000
  Name: ?-y'-H-++M+µK[++?-y'-H-+v/¦f+n¦+?ù¦µ+˜¦+9j^?
ù¼+;SvvHBñ+?[«è?áá+v¿+(¦-¿+s+L[AK¦+â=[N+ª++KQ>B¦@++£í_¢+7¦+KQ>B¦@++ï=[N+ª++abÅewD¦+z¿+(¦-¿+?[«è?áá+=+?¦.-ç+Fk+u«nô+B?úcO+Ñ+vGó?
R++ß?=uj:¦+¢)-7ó-++¦-ê?d¦+¦Gó?
R++F?úcO+Ñ+ek+u«nô+=+?¦.-ç+ at +?¦.-ç?¦k+u«nô?C-g--+Ñ?8Gó?
R+?-?=uj:¦?ë)-7ó-?+?=uj:¦?(Gó?
R+?8?úcO+Ñ?Gk+u«nô?@+?¦.-ç?¶[«è?áá?v¿+(¦-¿?µ+L[AK¦?â=[N+ª+?KQ>B¦@+?£í_¢+7¦?KQ>B¦@+?ï=[N+ª+?abÅewD¦?z¿+(¦-¿?¶[«è?áá?:SvvHBñ?5j^?
ù¼??ù¦µ+˜¦?·/¦f+n¦?B-y'-H-?-M+µK[+?C-y'-H-?¦/¦f+n¦?¶ù¦µ+˜¦?8j^?
ù¼?:SvvHBñ??»@-GTú?
¥ï-X+¬??»@-GTú?·n+æDxá?+5¦e?Oñ?\n=S-?-?pö¤d¦U¦?7êF+~n+?Å,9í¬ú¦?
  Number Of Components: 1
  Number Of Tuples: 1331
  Size: 1331
  MaxId: 1330
  LookupTable: (none)
  Array: 0000000004B95BE0/

*(3)*
Another problem is that when I want to access the components name of a
vtkStructuredGrid in another function by:
/sgrid->GetPointData()->GetArray( i )->GetComponentName( j )/
I get unhandled exception error. The strange thing for me is that this error
happens even when I set:
/sgrid->GetPointData()->GetArray( i )->SetComponentName( j, "test_component"
);/
in the line just before getting the component name.


Overally, the code runs very unstable. I am sure I am missing something in
using "pointers to VTK classes" in function arguments. I would be very
grateful if you could help me.

Thanks,
Ahmad

--
View this message in context: http://vtk.1045678.n5.nabble.com/Unhandled-exception-at-the-time-of-Unregistering-vtkSmartPointer-tp5713691p5713706.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list