Fehler bei Ausführung
Fehler bei Ausführung
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
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
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_*/
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_*/
#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;
}
#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;
}
Ohne Code-Tags wird sich das kaum einer antun. Und der Fehler sollte mit einem Debugger leicht zu finden sein.blm hat geschrieben:Könnten Sie meine Code mal schauen?
Die deutsche Schriftsprache ist case-sensitive. Außerdem gibt es eine Interpunktionsnorm. Wenn manch einer seine Programme genauso schlampig schreibt, wie sein Posting hier, dann sollte er es lieber bleiben lassen.
naja, habe Debug probiert,macman hat geschrieben:Ohne Code-Tags wird sich das kaum einer antun. Und der Fehler sollte mit einem Debugger leicht zu finden sein.blm hat geschrieben:Könnten Sie meine Code mal schauen?
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
Ja, was mag das bedeuten. Ein Pointer ist gleich NULL. Und welcher? Dazu nutzt man einen Debuggerblm hat geschrieben:
- 1 <symbol is not available> 0x00000000
Die deutsche Schriftsprache ist case-sensitive. Außerdem gibt es eine Interpunktionsnorm. Wenn manch einer seine Programme genauso schlampig schreibt, wie sein Posting hier, dann sollte er es lieber bleiben lassen.
danke, Debugger funktioniert,macman hat geschrieben:Ja, was mag das bedeuten. Ein Pointer ist gleich NULL. Und welcher? Dazu nutzt man einen Debuggerblm hat geschrieben:
- 1 <symbol is not available> 0x00000000
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?
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.
Die deutsche Schriftsprache ist case-sensitive. Außerdem gibt es eine Interpunktionsnorm. Wenn manch einer seine Programme genauso schlampig schreibt, wie sein Posting hier, dann sollte er es lieber bleiben lassen.