[vtkusers] Strange crash creating a VTK object
Wagner Sales
wsales at gmail.com
Fri Jun 6 14:34:54 EDT 2008
Dear all,
I'm trying to create a vtkSphereSource in a method on my application thats
crashes some times ( not all try ).
vtkSphereSource *src = vtkSphereSource::New();
Thats are a simple line, that's are:
1 - inside a method of the class
2 - the class that's own the method aren't a vtkObject child, are a simple
class.
3 - the vtkSphereSource aren't deleted after created ( scope and smart
points will solve this, ok? )
4 - the created objects aren't registered ( by
vtkObject::Register(vtkObject*)) method
I think that's I'm using in some bad way the smart pointers feature or
another stupid mistake. But, this error aren't new to me, and my last solve
was very, very ugly.
I was searched for some explanation on Google and VTK books, but nothing
appears useful to me.
If someone can help, I'll must appreciate.
Regards,
Wagner Sales
BACKTRACE:
(gdb) bt
bt
#0 0xb31a5116 in ?? () from /lib/tls/i686/cmov/libc.so.6
#1 0xb56bfddd in std::vector<vtkGarbageCollectorImpl::EntryEdge,
std::allocator<vtkGarbageCollectorImpl::EntryEdge> >::push_back () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#2 0xb31a71bd in ?? () from /lib/tls/i686/cmov/libc.so.6
#3 0xb33706a7 in operator new () from /usr/lib/libstdc++.so.6
#4 0xb31a8fc0 in malloc () from /lib/tls/i686/cmov/libc.so.6
#5 0xb33706a7 in operator new () from /usr/lib/libstdc++.so.6
#6 0xb56bd5d2 in
__gnu_cxx::new_allocator<vtkGarbageCollectorImpl::ComponentType*>::allocate
() from /usr/lib/vtk-5.2/libvtkCommon.so.5.2
#7 0xb56bd60f in std::_Deque_base<vtkGarbageCollectorImpl::ComponentType*,
std::allocator<vtkGarbageCollectorImpl::ComponentType*> >::_M_allocate_node
() from /usr/lib/vtk-5.2/libvtkCommon.so.5.2
#8 0xb56bd63c in std::_Deque_base<vtkGarbageCollectorImpl::ComponentType*,
std::allocator<vtkGarbageCollectorImpl::ComponentType*> >::_M_create_nodes
() from /usr/lib/vtk-5.2/libvtkCommon.so.5.2
#9 0xb56bd755 in std::_Deque_base<vtkGarbageCollectorImpl::ComponentType*,
std::allocator<vtkGarbageCollectorImpl::ComponentType*> >::_M_initialize_map
() from /usr/lib/vtk-5.2/libvtkCommon.so.5.2
#10 0xb56bd859 in std::_Deque_base<vtkGarbageCollectorImpl::ComponentType*,
std::allocator<vtkGarbageCollectorImpl::ComponentType*> >::_Deque_base ()
from /usr/lib/vtk-5.2/libvtkCommon.so.5.2
#11 0xb56bd8ae in std::deque<vtkGarbageCollectorImpl::ComponentType*,
std::allocator<vtkGarbageCollectorImpl::ComponentType*> >::deque () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#12 0xb56b7b45 in vtkGarbageCollectorImpl::vtkGarbageCollectorImpl () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#13 0xb56b7d1c in vtkGarbageCollector::Collect () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#14 0xb5712c97 in vtkObjectBase::UnRegisterInternal () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#15 0xb5710adc in vtkObject::UnRegisterInternal () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#16 0xb56c7007 in vtkInformation::UnRegister () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#17 0xb5712a2c in vtkObjectBase::Delete () from
/usr/lib/vtk-5.2/libvtkCommon.so.5.2
#18 0xb5a5398e in vtkAlgorithm::vtkAlgorithm () from
/usr/lib/vtk-5.2/libvtkFiltering.so.5.2
#19 0xb5b82f96 in vtkPolyDataAlgorithm::vtkPolyDataAlgorithm () from
/usr/lib/vtk-5.2/libvtkFiltering.so.5.2
#20 0xb635a6d4 in vtkSphereSource::vtkSphereSource () from
/usr/lib/vtk-5.2/libvtkGraphics.so.5.2
#21 0xb635a8e2 in vtkSphereSource::New () from
/usr/lib/vtk-5.2/libvtkGraphics.so.5.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080606/6539916b/attachment.htm>
More information about the vtkusers
mailing list