Henrich
27th May 2015, 12:15
Hi all,
When I want to add almost anything to .h file like "double", "int" declaration or basicly anything, Qt throws an error: exited with code -1073741819 in Release mode. When I compile the code in Debug mode it throws an error:
ASSERT failure in QVector<T>::operator[]: "index out of range", file c:\QtSDK\Desktop\Qt\4.8.1\mingw\include/QtCore/qvector.h, line 359
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
In stack, the debugger complains that it cannot access memory at adress...
11180
here is the code of my header file, if I comemnt out the "CFLWidget *cflwidget;" everything works fine, even I'm not using it anywhere else yet. The same happens when I just add any double for example. I don't understand what is going on in here...Can anyone help me somehow?
#ifndef RADARWINDOW_H
#define RADARWINDOW_H
#include <QMainWindow>
#include <QWidget>
#include <QObject>
#include <QtCore>
#include <QtGui>
#include <QTimer>
#include <QTime>
#include <QPen>
#include <QSound>
#include "mytextitem.h"
#include "cflwidget.h"
namespace Ui {
class RadarWindow;
}
class RadarWindow : public QMainWindow
{
Q_OBJECT
public:
explicit RadarWindow(QWidget *parent = 0);
~RadarWindow();
QVector<double> loadLatFromMap(const QString &filename);
QVector<double> loadLonFromMap(const QString &filename);
QStringList loadNavPoints(const QString &filename);
void drawMap(const QString &filename);
void drawMapSection(const QString &filename);
void drawNavPoints(const QStringList &navPointList, const double &scale);
void drawRWY(const QString &filename);
void drawCTR(const QString &filename);
void drawTMA(const QString &filename);
void drawAircraft(const QHash<QString, QStringList> &flightsimhash, const double &scale);
QVector<double> prediction_calculation(const double &init_LON, const double &init_LAT, const double &init_HDG, const double &seconds, const double &GS);
double BCOtoDEC(const double &code);
void drawCollisonPoint(const QString &aircraft_1, const QString &aircraft_2);
double calculateDistance(const double &LAT_1, const double &LON_1, const double &LAT_2, const double &LON_2);
void drawSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
bool determineSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
void testSTCA();
double getAlpha(const double &HDG);
double ROCD(const QHash<QString, QStringList> &flightsimhash, const QString CallSign);
QStringList readSTRIP(const QString &fileName, const QString &CallSign);
void overwriteSQUAWK(const QString &fileName, const QString &CallSign, const QString &squawk);
private slots:
void update_drawing();
void dataFromFlightSim(const QString &callSign, const QString &message);
void update_flightHistoryNum(const int &number);
void changeselection();
void aircraftClicked(const QString &text);
void deselectAircraft_slot(const QString &text);
void getSTRIPDataFrom(const QString &dataFrom);
void GSclicked_slot();
void CFLclicked_slot(const QString &callsign);
signals:
void changeEmergencyStatus(const bool &);
void closed_connection(const QString &callsign);
void CFLclicked(const QString &callsign);
private:
Ui::RadarWindow *ui;
QGraphicsScene *scene;
MyTextItem *mytextitem;
CFLWidget *cflwidget;
QGraphicsEllipseItem *ellipse;
QGraphicsRectItem *rectangle;
QPolygonF polygon;
QPolygonF poly;
QGraphicsLineItem *line;
QGraphicsPolygonItem *polygonItem;
QGraphicsTextItem *pointText;
QGraphicsTextItem *aircraftText;
QPainterPath *path;
QStringList CallSignList;
QStringList MessageList;
QStringList SelectedAircraftList;
QHash<QString, QStringList> FlightSimHash;
QStringList selectedCallSign;
QTimer *update_timer;
int FlightHistory_num;
int FROM;
int TO;
bool visibility;
bool HOMEpressed;
QStringList OnlineAircraftList;
QHash<QString, bool> STCAhash;
QString StripDataFrom;
protected:
//virtual void wheelEvent(QWheelEvent *event);
virtual void keyPressEvent(QKeyEvent *e);
virtual void keyReleaseEvent(QKeyEvent *e);
};
#endif // RADARWINDOW_H
When I want to add almost anything to .h file like "double", "int" declaration or basicly anything, Qt throws an error: exited with code -1073741819 in Release mode. When I compile the code in Debug mode it throws an error:
ASSERT failure in QVector<T>::operator[]: "index out of range", file c:\QtSDK\Desktop\Qt\4.8.1\mingw\include/QtCore/qvector.h, line 359
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
In stack, the debugger complains that it cannot access memory at adress...
11180
here is the code of my header file, if I comemnt out the "CFLWidget *cflwidget;" everything works fine, even I'm not using it anywhere else yet. The same happens when I just add any double for example. I don't understand what is going on in here...Can anyone help me somehow?
#ifndef RADARWINDOW_H
#define RADARWINDOW_H
#include <QMainWindow>
#include <QWidget>
#include <QObject>
#include <QtCore>
#include <QtGui>
#include <QTimer>
#include <QTime>
#include <QPen>
#include <QSound>
#include "mytextitem.h"
#include "cflwidget.h"
namespace Ui {
class RadarWindow;
}
class RadarWindow : public QMainWindow
{
Q_OBJECT
public:
explicit RadarWindow(QWidget *parent = 0);
~RadarWindow();
QVector<double> loadLatFromMap(const QString &filename);
QVector<double> loadLonFromMap(const QString &filename);
QStringList loadNavPoints(const QString &filename);
void drawMap(const QString &filename);
void drawMapSection(const QString &filename);
void drawNavPoints(const QStringList &navPointList, const double &scale);
void drawRWY(const QString &filename);
void drawCTR(const QString &filename);
void drawTMA(const QString &filename);
void drawAircraft(const QHash<QString, QStringList> &flightsimhash, const double &scale);
QVector<double> prediction_calculation(const double &init_LON, const double &init_LAT, const double &init_HDG, const double &seconds, const double &GS);
double BCOtoDEC(const double &code);
void drawCollisonPoint(const QString &aircraft_1, const QString &aircraft_2);
double calculateDistance(const double &LAT_1, const double &LON_1, const double &LAT_2, const double &LON_2);
void drawSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
bool determineSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
void testSTCA();
double getAlpha(const double &HDG);
double ROCD(const QHash<QString, QStringList> &flightsimhash, const QString CallSign);
QStringList readSTRIP(const QString &fileName, const QString &CallSign);
void overwriteSQUAWK(const QString &fileName, const QString &CallSign, const QString &squawk);
private slots:
void update_drawing();
void dataFromFlightSim(const QString &callSign, const QString &message);
void update_flightHistoryNum(const int &number);
void changeselection();
void aircraftClicked(const QString &text);
void deselectAircraft_slot(const QString &text);
void getSTRIPDataFrom(const QString &dataFrom);
void GSclicked_slot();
void CFLclicked_slot(const QString &callsign);
signals:
void changeEmergencyStatus(const bool &);
void closed_connection(const QString &callsign);
void CFLclicked(const QString &callsign);
private:
Ui::RadarWindow *ui;
QGraphicsScene *scene;
MyTextItem *mytextitem;
CFLWidget *cflwidget;
QGraphicsEllipseItem *ellipse;
QGraphicsRectItem *rectangle;
QPolygonF polygon;
QPolygonF poly;
QGraphicsLineItem *line;
QGraphicsPolygonItem *polygonItem;
QGraphicsTextItem *pointText;
QGraphicsTextItem *aircraftText;
QPainterPath *path;
QStringList CallSignList;
QStringList MessageList;
QStringList SelectedAircraftList;
QHash<QString, QStringList> FlightSimHash;
QStringList selectedCallSign;
QTimer *update_timer;
int FlightHistory_num;
int FROM;
int TO;
bool visibility;
bool HOMEpressed;
QStringList OnlineAircraftList;
QHash<QString, bool> STCAhash;
QString StripDataFrom;
protected:
//virtual void wheelEvent(QWheelEvent *event);
virtual void keyPressEvent(QKeyEvent *e);
virtual void keyReleaseEvent(QKeyEvent *e);
};
#endif // RADARWINDOW_H