Page MenuHomePhabricator

Crash when open new segmentation dialog
Closed, ResolvedPublic

Description

When use open one 3D image, and open "interactive segmentation plugin", choose the image, click on "Thresholding" button, it will let user move the threshold slider, when user choose one threshold value and then click "OK" button, the crash occurs due to running in

void QmitkBinaryThresholdToolGUI::OnAcceptThresholdPreview()
{

if (m_BinaryThresholdTool.IsNotNull())
{
  QmitkNewSegmentationDialog* dialog = new QmitkNewSegmentationDialog( this ); // needs a QWidget as parent, "this" is not QWidget
  dialog->setPrompt("What did you just segment?");  //<-- this line 
  ...
}

}

then it call

void QmitkNewSegmentationDialog::setPrompt( const QString& prompt )
{

lblPrompt->setText( prompt );

}

where lblPrompt is not initialized, according to the new definitons, the line can be commented out.

Event Timeline

Sorry, I mean

dialog->setPrompt("What did you just segment?");

can be commented out,

not

lblPrompt->setText( prompt );

Daniel, can you look into this?

[SVN revision 19838]
FIX (#2815): use member QLabel* for prompt, preventing crashes during setPrompt()

Yes, I wanted to commit this since Friday but couldn't yet. Reason for this crash were changes for the upcoming 3M release. The described behavior is fixed in revision 19838.

Merging "applicazion modules" component with "ExtApp plugins"