Qt: Assertion Failure error given on a project which was working perfectly
-
I had my project running perfectly. Updated my project on "bitbucket":https://bitbucket.org/ and then added some comments. Ran my project again. And strangely, this error given.
@ASSERT failure in QVector<T>::operator[]: "index out of range", file ....\include/QtCore/../../src/corelib/tools/qvector.h, line 385@
I thought I may have messed something up during commenting, so immediately looked for error, found none. Okay, I may have missed something. So, logged in to bitbucket and downloaded the project. Deleted the old project and ran the new one. SAME PROBLEM WITH SAME ERROR. Whats the problem?Sample Demonstration:
@MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
//QHBoxLayout *layout=new QHBoxLayout;
WeekAndDailyView *view=new WeekAndDailyView(this);
//layout->addWidget(view);
qDebug()<<"Came here"<<endl;
setCentralWidget(view);
}@Output:
@
Came hereASSERT failure in QVector<T>::operator[]: "index out of range", file ....\include/QtCore/../../src/corelib/tools/qvector.h, line 385
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.@And little more strange, my main.cpp:
@#include "mainwindow.h"
#include <QApplication>
#include <QDebug>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;qDebug()<<"Came Here"<<endl; w.show(); qDebug()<<"Came Here"<<endl; return a.exec();
}@
Application output:
@
Came HereASSERT failure in QVector<T>::operator[]: "index out of range", file ....\include/QtCore/../../src/corelib/tools/qvector.h, line 385
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
G:\Programming\Projects\QT try\build-CasePage-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\CasePage.exe exited with code 3@Note: I am using Qt 3.1.1 absed on Qt 5.2.1(MSVC 2010, 32 bit) on Windows. I have only one MINGW installed. And I have already restarted the machine and re installed Qt.