Problem of deployment
-
Hello,
I have a problem when I try to deploy my soft in Debug mode , I have this error :
ASSERT: "uint(i) < uint(size())" in file ........\include/QtCore/../../src/corelib/tools/qstring.h, line 755
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.This error occures even in a new project with only QMainWindow but no problem in release.
Do you know this problem ?
Thanx. -
Hi,
What is the code triggering the assert ?
ASSERT only works in debug mode, they do nothing in release.
-
My main :
@#include "mainwindow.h"
#include <QApplication>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();return a.exec();
}
@My mainWindow.h
@#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
namespace Ui {
class MainWindow;
}class MainWindow : public QMainWindow
{
Q_OBJECTpublic:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();private:
Ui::MainWindow *ui;
};#endif // MAINWINDOW_H
@My mainWindow.cpp
@#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}MainWindow::~MainWindow()
{
delete ui;
}
@I have only that and I have already the problem.
-
Just to be sure, are you talking about deploying (as in "install and run") or running the application in Qt Creator ?
-
What OS/ Qt version/compiler are you using ?
Also how did you install Qt ? -
Do you still have the old SDK installed ?
-
Sounds fishy… Are you having that with a new project not built with anything else than Qt 5.2 ?
-
Do you have several MinGW installed on your computer ?
-
Are you sure you have properly removed all other MinGW version from your system ?
-
What happens if you do this in Qt Creator?:
Build -> Clean All
Build -> Run qmake
Build -> Run
Also, have a look in your PATH. Is MinGW and/or Qt in there?
-
Sorry Ced70v, I didn't realize you replied.
Remove all traces of MinGW and Qt from your PATH. You don't need it in your PATH, and having it there has been known to cause issues.
After that, restart Qt Creator, clean your project, and build again.
Make sure you are using the copy of MinGW that came with your Qt installation (instead of downloading it somewhere else).
-
Thanks...but no changes.
I have cleaned the path.
Before QT i did not have MinGW on my PC.
QT package instaled id.Debugging starts
ASSERT: "uint(i) < uint(size())" in file ........\include/QtCore/../../src/corelib/tools/qstring.h, line 755
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
QMutex: destroying locked mutex
Debugging has finished