Re: QwtPlotMarker segfault
Quote:
Originally Posted by
viridis
To be noted that it crash only when I change the xBottomScale with setAxisScale and setAxisTitle.
What arguments do you pass to these methods?
Re: QwtPlotMarker segfault
setAxisScale(QwtPlot::xBottom, fromValue, toValue);
setAxisTitle(QwtPlot::xBottom, "my axis title");
fromValue and toValue represent the min and max of my xScale (in x values, not pixels).
Indeed, I manipulate the x and y scales myself to be able to draw multiple curves which have different scales. Next, I can change the axis scale (only the Y one as all my curve have the same time base) according to the selected curve.
Re: QwtPlotMarker segfault
After digging a little, it appears that in QwtPlotMarker constructor, the line "d_data = new PrivateData" allocates a private data object which is fine (allocation works as espected).
Then I add curves, I change my scales...
And then, when I do my "setValue" call on the marker, the "d_data" member points to a invalid location (0xfdfdfd) which was not the case before.
Re: QwtPlotMarker segfault
Ok, well, I found the bug which was, of course, in my code.
I thought QwtPlot::clear() will remove only curves, but markers are too...