[vtkusers] Strange crash creating a VTK object

Wagner Sales wsales at gmail.com
Mon Jun 9 10:43:36 EDT 2008


Hi Peter,

Yes, the crashes occurs in libc. But I use a very, very standard libc: GNU
libc6, standard package which comes with Ubuntu (no needs upgrade, I checked
this ). Then I think the problem occurs in libc but are cause for some VTK
misuse that's I'm doing, but I really have no idea about where are my
mistake.

Regards,

Wagner Sales

2008/6/8 Peter F Bradshaw <pfb at exadios.com>:

> Hi Wagner;
>
> I notice that the crash is occuring in libc. This raises the question of
> where did you get your VTK 5.2 from? Was it built against your
> particular implementation of libc?
>
> On Fri, 6 Jun 2008, Wagner Sales wrote:
>
> > 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
> >
>
> Cheers
>
> --
> Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
> Personal site: http://personal.exadios.com
> "I love truth, and the way the government still uses it occasionally to
>  keep us guessing." - Sam Kekovich.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080609/59c61a39/attachment.htm>


More information about the vtkusers mailing list