PDA

View Full Version : Invalid _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) while deleting plot curve



mqt
22nd May 2015, 14:08
I am using
Qt 5.3.2
qwt 6.1.2
Visual Studio 2012
Windows 7, x64

The following code gives invalid _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) while deleting the plot curve. Any idea?


QApplication *app=new QApplication(argc,argv);
QwtPlot *window = new QwtPlot();
QwtPlotCurve *d_curve1 = new QwtPlotCurve( "Amplitude" );
d_curve1->setRenderHint( QwtPlotItem::RenderAntialiased );
d_curve1->setPen( Qt::yellow );
d_curve1->setLegendAttribute( QwtPlotCurve::LegendShowLine );
d_curve1->setYAxis( QwtPlot::yLeft );
d_curve1->setXAxis( QwtPlot::xBottom );
d_curve1->attach( window );
window->show();
app->exec();
delete window; // Assertion fails here
window = NULL;
delete app;
app=NULL;

mqt
26th May 2015, 13:44
Any suggestions?