Results 1 to 2 of 2

Thread: Qwt liveplot crash

  1. #1
    Join Date
    Jun 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qwt liveplot crash

    Hi all,
    I'm trying to use Qwt to plot accelerometer data @800Hz.
    The application work, but it randomly crashes with error `double free or corruption (out)` while allocating data.

    I use this code to update the plot:
    Qt Code:
    1. void DataPlot::updateData( DataType type, QVector<double> ts, QVector<double> data, bool replot)
    2. {
    3. mData[type].mCurve->setSamples( ts, data );
    4.  
    5. if(replot)
    6. this->replot();
    7. }
    To copy to clipboard, switch view to plain text mode 

    Where `ts` is the X axis, `data` is the Y axis and `mCurve` is a `QwtPlotCurve` curve.

    Any idea or suggestion?

    Thank you
    Walter

  2. #2
    Join Date
    Jun 2019
    Location
    France, Pau
    Posts
    41
    Thanks
    25
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Qwt liveplot crash

    Can you provide the full call stack of the moment of the crash ?

    I think you have memory bugs in your program and they are not related to Qwt. Be careful when sharing memory (QVectors ?) between threads. A QVector object can be sent from one thread to another via signals but it isn't thread safe if you use the same instance of it between threads.

Similar Threads

  1. Replies: 0
    Last Post: 3rd November 2015, 18:58
  2. qml crash
    By waiter in forum Qt Quick
    Replies: 0
    Last Post: 11th July 2013, 03:43
  3. Phonon Causes app to crash
    By georgeky in forum Newbie
    Replies: 0
    Last Post: 2nd December 2010, 01:35
  4. Crash gracefully? No crash!
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 7th July 2010, 04:59
  5. QComboBox crash
    By sfilez in forum Newbie
    Replies: 4
    Last Post: 8th July 2009, 00:31

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.