Results 1 to 3 of 3

Thread: what`s means this Error Message?

  1. #1
    Join Date
    Sep 2008
    Posts
    38
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Question what`s means this Error Message?

    building is no problem,
    but can`t run it:

    Microsoft Visual C++ Runtime Library(title)
    Runtime Error
    ...
    This application has requested the Runtime to terminate it in an unsusal way.
    Please contact the application`s support team for more information.

    my develop environment is Eclipse+ MinGW+QT4.4.0(open edition)

    what`s wrong??

    thanks for your Help!!
    Jin

  2. #2
    Join Date
    Sep 2008
    Posts
    38
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: what`s means this Error Message?

    i think there are some problem by my thread class:

    #include <QtGui>

    #include "header/processthread.h"

    ProcessThread::ProcessThread()
    {
    m_FilePath = ":/in1.txt";
    start();
    }

    ProcessThread::~ProcessThread()
    {

    }

    void ProcessThread:ataRead()
    {

    }

    void ProcessThread::run()
    {
    QVector<QPointF> data[6];
    //double factX = 0.013;//factX = 0.0013;
    double factY[6] = { 0.0008, 0.1, 0.2, 0.2, 0.1, 0.8 };
    double offsY[6] = { +500, -55, +309, +308, 0, 0 };
    int pos[6] = { 3, 6, 7, 8, 9, 10 };
    QFile file(m_FilePath);
    double offsX = 0.0;
    QPointF newpoint;

    if (file.open(QIODevice::ReadOnly)) {
    QTextStream in(&file);
    while (!in.atEnd()) {
    QString line = in.readLine();
    QStringList coords = line.split(' ',
    QString::SkipEmptyParts);
    if (coords.count() >= 6) {
    //double x = factX * coords[0].toDouble();
    double x = coords[0].toDouble();
    if (data[0].isEmpty())
    offsX = x;
    // for (int i = 0; i < 6; ++i) {
    int i = 4;
    double y = coords[pos[i]].toDouble();
    data[i].append(QPointF(x - offsX,
    factY[i] * (y - offsY[i])));
    newpoint = QPointF(x - offsX,
    factY[i] * (y - offsY[i]));
    //--------------Emit signals
    if (data[i].size() >= 1000) {
    emit newscreen(true);
    emit newDataCome(newpoint);
    }
    else
    {
    emit newscreen(false);
    emit newDataCome(newpoint);
    }

    // }
    }
    }
    }

    }

    void ProcessThread::setFilePath(const QString& FilePath)
    {
    m_FilePath = FilePath;
    }
    Last edited by blm; 15th September 2008 at 17:04.

  3. #3
    Join Date
    Sep 2008
    Posts
    38
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: what`s means this Error Message?

    than is the implement

    #ifndef PROCESSTHREAD_H_
    #define PROCESSTHREAD_H_

    #include <QImage>
    #include <QMutex>
    #include <QVector>
    #include <QQueue>
    #include <QThread>
    #include <QWaitCondition>

    class ProcessThread : public QThread
    {
    Q_OBJECT

    public:
    ProcessThread();
    ~ProcessThread();
    void DataRead();
    void setFilePath(const QString& FilePath);

    signals:
    void newscreen(bool ns);
    //bool newscreen();
    void newDataCome(QPointF newPoint);
    //void newCommandCome();



    protected:
    void run();

    private:
    QString m_FilePath;
    //QVector<QPointF> data;
    //QWaitCondition newDataReady;
    //QMutex mutex;


    };

    //extern ProcessThread processthread;
    #endif /*PROCESSTHREAD_H_*/

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.