Seite 1 von 1

Fehler bei Ausführung

Verfasst: 15. September 2008 17:03
von blm
Bei Building ist es kein Problem,
aber liest sich nicht ausführen, eine Fehler Message tritt auf wie folgt:

Microsoft Visual C++ Runtime Library(Überschrift)
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)

Was macht MC++ hier dazu? Verstehe ich gar nicht!!:shock:

Vielen Dank im Voraus!
Jin

Verfasst: 15. September 2008 17:07
von upsala
Hübsch. Dann schmeiss mal deinen Debugger an und liefere eine Aussagekräftigere Fehlermeldung.

Verfasst: 15. September 2008 17:12
von AuE
sieht nach verkehrten Einstellungen aus.... mit welchen Einstellungen hast es gebaut?

und passt es so auch zu deinen Qt libs/dlls?

Verfasst: 15. September 2008 18:03
von blm
vielleicht gebt`s irgendwo Fehler bei meinen 2. Tread Klass..
Könnten Sie meine Code mal schauen?

#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_*/

Verfasst: 15. September 2008 18:03
von blm
#include <QtGui>

#include "header/processthread.h"

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

ProcessThread::~ProcessThread()
{

}

void ProcessThread::DataRead()
{

}

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].toDouble();
data.append(QPointF(x - offsX,
factY * (y - offsY)));
newpoint = QPointF(x - offsX,
factY * (y - offsY));
//--------------Emit signals
if (data.size() >= 1000) {
emit newscreen(true);
emit newDataCome(newpoint);
}
else
{
emit newscreen(false);
emit newDataCome(newpoint);
}

// }
}
}
}

}

void ProcessThread::setFilePath(const QString& FilePath)
{
m_FilePath = FilePath;
}

Verfasst: 16. September 2008 07:03
von macman
blm hat geschrieben:Könnten Sie meine Code mal schauen?
Ohne Code-Tags wird sich das kaum einer antun. Und der Fehler sollte mit einem Debugger leicht zu finden sein.

Verfasst: 16. September 2008 11:09
von blm
macman hat geschrieben:
blm hat geschrieben:Könnten Sie meine Code mal schauen?
Ohne Code-Tags wird sich das kaum einer antun. Und der Fehler sollte mit einem Debugger leicht zu finden sein.
naja, habe Debug probiert,
aber verstehe ich diese Ergebnise gar nicht..

MinGW gdb Debugger(16.09.08 10:59)(Suspended)
  • 6 ntdll!LdrAccessRecource() 0x7c91eb94
  • 5 ntdll!ZwMapviewOfSection() 0x7c91dc61
  • 4 snwprintf() 0x7c92c3da
  • 3 ntdll!LdrRtlValidataUnicodeString() 0x7c926071
  • 2 ntdll!LdrShutdownProcess() 0x7c9262da
  • 1 <symbol is not available> 0x00000000
was bedeutet das??

Verfasst: 16. September 2008 11:22
von macman
blm hat geschrieben:
  • 1 <symbol is not available> 0x00000000
Ja, was mag das bedeuten. Ein Pointer ist gleich NULL. Und welcher? Dazu nutzt man einen Debugger

Verfasst: 16. September 2008 11:42
von blm
macman hat geschrieben:
blm hat geschrieben:
  • 1 <symbol is not available> 0x00000000
Ja, was mag das bedeuten. Ein Pointer ist gleich NULL. Und welcher? Dazu nutzt man einen Debugger
danke, Debugger funktioniert,

und endlich habe in Console zwei rote Zeile "warning" gefunden:

Stopped due to shared library event
[New thread 3740.0xf34]
[New thread 3740.0xf38]
[New thread 3740.0xf3c]
warning: Lowest section in C:\WINDOWS\system32\xpsp2res.dll is .rsrc at 20001000
Stopped due to shared library event
[New thread 3740.0xf40]
[New thread 3740.0xf44]
warning: ASSERT failure in QVector<T>::operator[]: "index out of range", file c:/Qt/4.4.0/include/QtCore/../../src/corelib/tools/qvector.h, line 331

diese zwei warning sind die Fehlers, oder?

Verfasst: 16. September 2008 12:16
von upsala
Dein Debugger hat garantiert eine Bedienungsanleitung...

Verfasst: 16. September 2008 12:20
von macman
Ich kenne weder MinGW noch den gdb, ein bisschen was musst Du also selbst machen :-) Setz einen Breakpoint in deine run-Methode und step da durch bis es knallt.