View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010464VTK(No Category)public2010-03-26 08:422016-08-12 09:55
ReporterGianluca 
Assigned ToKitware Robot 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0010464: vtkSeedWidget CRASH!!!
DescriptionThe method DeleteSeed of the class vtkSeedWidget crash:

void vtkSeedWidget::DeleteSeed(int i)
{
  if( this->Seeds->size() <= static_cast< size_t >(i) )
    {
    return;
    }

  vtkSeedRepresentation *rep =
      static_cast<vtkSeedRepresentation*>(this->WidgetRep);
  if (rep)
    {
    rep->RemoveHandle( i );
    }

  vtkSeedListIterator iter = this->Seeds->begin();
  vtkstd::advance(iter,i);
  (*iter)->SetEnabled(0);
  (*iter)->RemoveObservers(vtkCommand::StartInteractionEvent);
  (*iter)->RemoveObservers(vtkCommand::InteractionEvent);
  (*iter)->RemoveObservers(vtkCommand::EndInteractionEvent);
  vtkHandleWidget * w = (*iter);
  this->Seeds->erase( iter );
  w->Delete();
}

The problem is in the last two lines. You have to FIRST delete the object, then erase the relative iterator. That is you have to swap the last two lines:

  w->Delete();
  this->Seeds->erase( iter );

Please fix it! Thanks.

- AGPX
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0020017)
Gianluca (reporter)
2010-03-26 10:12

I cannot reproduce the problem. Probably isn't a bug. I'm sorry.
(0020305)
David Doria (reporter)
2010-04-20 17:22

I also can't reproduce this. Fedora 12, g++ (GCC) 4.4.1.
(0037156)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-03-26 08:42 Gianluca New Issue
2010-03-26 10:12 Gianluca Note Added: 0020017
2010-04-20 17:22 David Doria Note Added: 0020305
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037156
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team