Peter Nordin
2014-04-23 13:47:10 UTC
Hi
I have run into a problem with qwt causing a crash when I "try to plot"
something with value inf.
Basically I get the following error: ASSERT failure in qAllocMore:
"Requested size is to large!" .....
I was able to track down the crash into:
QwtLinearScaleEngine::buildMinorTicks where a for loop never ends.
The reason for it never ending is that earlier in QwtPlot::updateAxes a
calculated "stepSize" turned out to be: -nan(0x8000000000000)
This is caused by my min and max values being [100 inf]
I think its the autoscale function that calculates the stepSize
I am not sure what should really happen when you try to plot something
that is inf, but it would be nice if the scale could handle it without
crashing somehow.
I have made an MinimumWorkingExample that you can find here:
https://www.dropbox.com/sh/v6uiw21pzpxxw9b/PZMTYd348r
It is a modification of the default sinusplot qwt example and it
increases a value until it reaches inf.
Just copy the two files into the sinusplot example directory and then
build and run the example to generate the crash.
Best regards
Peter Nordin
I have run into a problem with qwt causing a crash when I "try to plot"
something with value inf.
Basically I get the following error: ASSERT failure in qAllocMore:
"Requested size is to large!" .....
I was able to track down the crash into:
QwtLinearScaleEngine::buildMinorTicks where a for loop never ends.
The reason for it never ending is that earlier in QwtPlot::updateAxes a
calculated "stepSize" turned out to be: -nan(0x8000000000000)
This is caused by my min and max values being [100 inf]
I think its the autoscale function that calculates the stepSize
I am not sure what should really happen when you try to plot something
that is inf, but it would be nice if the scale could handle it without
crashing somehow.
I have made an MinimumWorkingExample that you can find here:
https://www.dropbox.com/sh/v6uiw21pzpxxw9b/PZMTYd348r
It is a modification of the default sinusplot qwt example and it
increases a value until it reaches inf.
Just copy the two files into the sinusplot example directory and then
build and run the example to generate the crash.
Best regards
Peter Nordin