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>:perator[]: "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...
debugg.png

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?

Qt Code:
  1. #ifndef RADARWINDOW_H
  2. #define RADARWINDOW_H
  3.  
  4. #include <QMainWindow>
  5. #include <QWidget>
  6. #include <QObject>
  7. #include <QtCore>
  8. #include <QtGui>
  9. #include <QTimer>
  10. #include <QTime>
  11. #include <QPen>
  12. #include <QSound>
  13.  
  14. #include "mytextitem.h"
  15. #include "cflwidget.h"
  16.  
  17. namespace Ui {
  18. class RadarWindow;
  19. }
  20.  
  21. class RadarWindow : public QMainWindow
  22. {
  23. Q_OBJECT
  24.  
  25. public:
  26. explicit RadarWindow(QWidget *parent = 0);
  27. ~RadarWindow();
  28.  
  29. QVector<double> loadLatFromMap(const QString &filename);
  30. QVector<double> loadLonFromMap(const QString &filename);
  31. QStringList loadNavPoints(const QString &filename);
  32. void drawMap(const QString &filename);
  33. void drawMapSection(const QString &filename);
  34. void drawNavPoints(const QStringList &navPointList, const double &scale);
  35. void drawRWY(const QString &filename);
  36. void drawCTR(const QString &filename);
  37. void drawTMA(const QString &filename);
  38. void drawAircraft(const QHash<QString, QStringList> &flightsimhash, const double &scale);
  39. QVector<double> prediction_calculation(const double &init_LON, const double &init_LAT, const double &init_HDG, const double &seconds, const double &GS);
  40. double BCOtoDEC(const double &code);
  41. void drawCollisonPoint(const QString &aircraft_1, const QString &aircraft_2);
  42. double calculateDistance(const double &LAT_1, const double &LON_1, const double &LAT_2, const double &LON_2);
  43. void drawSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
  44. bool determineSTCAPoint(const QString &aircraft_1, const QString &aircraft_2);
  45. void testSTCA();
  46. double getAlpha(const double &HDG);
  47. double ROCD(const QHash<QString, QStringList> &flightsimhash, const QString CallSign);
  48. QStringList readSTRIP(const QString &fileName, const QString &CallSign);
  49. void overwriteSQUAWK(const QString &fileName, const QString &CallSign, const QString &squawk);
  50.  
  51. private slots:
  52. void update_drawing();
  53. void dataFromFlightSim(const QString &callSign, const QString &message);
  54. void update_flightHistoryNum(const int &number);
  55. void changeselection();
  56. void aircraftClicked(const QString &text);
  57. void deselectAircraft_slot(const QString &text);
  58. void getSTRIPDataFrom(const QString &dataFrom);
  59. void GSclicked_slot();
  60. void CFLclicked_slot(const QString &callsign);
  61.  
  62. signals:
  63. void changeEmergencyStatus(const bool &);
  64. void closed_connection(const QString &callsign);
  65. void CFLclicked(const QString &callsign);
  66.  
  67. private:
  68. Ui::RadarWindow *ui;
  69.  
  70. MyTextItem *mytextitem;
  71. CFLWidget *cflwidget;
  72.  
  73. QGraphicsRectItem *rectangle;
  74. QPolygonF polygon;
  75. QPolygonF poly;
  76. QGraphicsPolygonItem *polygonItem;
  77. QGraphicsTextItem *pointText;
  78. QGraphicsTextItem *aircraftText;
  79.  
  80. QPainterPath *path;
  81.  
  82. QStringList CallSignList;
  83. QStringList MessageList;
  84. QStringList SelectedAircraftList;
  85.  
  86. QHash<QString, QStringList> FlightSimHash;
  87.  
  88. QStringList selectedCallSign;
  89.  
  90. QTimer *update_timer;
  91. int FlightHistory_num;
  92.  
  93. int FROM;
  94. int TO;
  95.  
  96. bool visibility;
  97. bool HOMEpressed;
  98.  
  99. QStringList OnlineAircraftList;
  100. QHash<QString, bool> STCAhash;
  101. QString StripDataFrom;
  102.  
  103. protected:
  104. //virtual void wheelEvent(QWheelEvent *event);
  105. virtual void keyPressEvent(QKeyEvent *e);
  106. virtual void keyReleaseEvent(QKeyEvent *e);
  107. };
  108.  
  109. #endif // RADARWINDOW_H
To copy to clipboard, switch view to plain text mode