Matthias Pospiech | 28 Apr 21:22
Picon
Picon

qwtPlot crashes if data of spectromplot is constant

If I apply absolut constant data to the RasterData of a spectrogramplot 
the application crashes if I try to view the plot.
All my code is passed, but only if I bring the plot to the foreground 
the application crashes.
I cannot debugthe problem, since the whole code used at that point is 
within the qwt dll.

The error is:
ASSERT failure in QVector<T>::operator[]:"index out of range", file 
c:\.../qvector.h, line 320

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Rainer Thaden | 29 Apr 00:48
Picon

Re: qwtPlot crashes if data of spectromplot is constant

Matthias,

> I cannot debugthe problem, since the whole code used at that point is 
> within the qwt dll.

Open a qwt source file and set a breakpoint. If you're in debug mode, 
debugging the DLL works fine.

Regards,

Rainer

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Matthias Pospiech | 29 Apr 08:27
Picon
Picon

Re: qwtPlot crashes if data of spectromplot is constant

Rainer Thaden schrieb:
> Matthias,
>
>   
>> I cannot debugthe problem, since the whole code used at that point is 
>> within the qwt dll.
>>     
>
> Open a qwt source file and set a breakpoint. If you're in debug mode, 
> debugging the DLL works fine.
>   
Ok, did not know this.
But which part of the code is executed if the plot is put to foreground?

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Rainer Thaden | 29 Apr 11:55
Picon

Re: qwtPlot crashes if data of spectromplot is constant

>>> I cannot debugthe problem, since the whole code used at that point is 
>>> within the qwt dll.
>>>     
>> Open a qwt source file and set a breakpoint. If you're in debug mode, 
>> debugging the DLL works fine.
>>   
> Ok, did not know this.
> But which part of the code is executed if the plot is put to foreground?
> 

When the program crashes and you ran it in debug mode, you can look at 
the call-stack (Aufrufliste) afterwards and walk back through the 
function calls and very likely see the source of trouble. Tell VC, you 
want to debug after the crash.

Regards,

Rainer

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Matthias Pospiech | 29 Apr 13:20
Picon
Picon

Re: qwtPlot crashes if data of spectromplot is constant

Rainer Thaden schrieb:
>>>> I cannot debugthe problem, since the whole code used at that point is 
>>>> within the qwt dll.
>>>>     
>>>>         
>>> Open a qwt source file and set a breakpoint. If you're in debug mode, 
>>> debugging the DLL works fine.
>>>   
>>>       
>> Ok, did not know this.
>> But which part of the code is executed if the plot is put to foreground?
>>
>>     
>
> When the program crashes and you ran it in debug mode, you can look at 
> the call-stack (Aufrufliste) afterwards and walk back through the 
> function calls and very likely see the source of trouble. Tell VC, you 
> want to debug after the crash.
>   
That list only prints out QtCored4.dll, which does not help.

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Rainer Thaden | 29 Apr 14:41
Picon

Re: qwtPlot crashes if data of spectromplot is constant

Matthias Pospiech wrote:

>> When the program crashes and you ran it in debug mode, you can look at 
>> the call-stack (Aufrufliste) afterwards and walk back through the 
>> function calls and very likely see the source of trouble. Tell VC, you 
>> want to debug after the crash.
>>   
> That list only prints out QtCored4.dll, which does not help.

Is there only one entry in the list? I can not believe that.

Are you familiar with debugging and the call-stack?
If not, google for vc 2005 aufrufliste
You'll find an msdn page with instructions.

In debug mode, you get a long list of function calls like this:

QtCored4.dll!QListData::detach2()  Zeile 75 + 0x1f Bytes	C++
HD2Control.exe!QList<double>::detach_helper()  Zeile 498 + 0x9 Bytes	C++
HD2Control.exe!QList<double>::detach()  Zeile 97 + 0x22 Bytes	C++
HD2Control.exe!QList<double>::operator[](int i=0x00000064)  Zeile 378 
+ 0x8 Bytes	C++
HD2Control.exe!PlotWidget::PlotWidget(QWidget * parent=0x00000000) 
Zeile 85 + 0xa Bytes	C++
  	
...

Rainer

-------------------------------------------------------------------------
(Continue reading)


Gmane