Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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.


  • Lifetime Qt Champion

    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&#40;&#41;;
    

    }
    @

    My mainWindow.h

    @#ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <QMainWindow>

    namespace Ui {
    class MainWindow;
    }

    class MainWindow : public QMainWindow
    {
    Q_OBJECT

    public:
    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.


  • Lifetime Qt Champion

    Just to be sure, are you talking about deploying (as in "install and run") or running the application in Qt Creator ?



  • Good question !
    I am talking about running in Qt Creator.
    Sorry for this error...


  • Lifetime Qt Champion

    What OS/ Qt version/compiler are you using ?
    Also how did you install Qt ?



  • My OS : Windows 7 64 bits
    My Qt version : Last 5.2.0
    Compiler : Mingw 4.8 32 bits
    I Install Qt with the installer Online .
    I tried with installer Offline : same problems.
    For information, i had Qtsdk 4.8 before.


  • Lifetime Qt Champion

    Do you still have the old SDK installed ?



  • No, I removed the old installation and cleaned all the registry (I think).


  • Lifetime Qt Champion

    Sounds fishy… Are you having that with a new project not built with anything else than Qt 5.2 ?



  • Yes I have the problem with all project :
    New project never built and project already built in QtSDK 4.8.


  • Lifetime Qt Champion

    Do you have several MinGW installed on your computer ?



  • I installed MinGW before Qt because I thought there wasn't in the setup but now I haven't several MinGW.


  • Lifetime Qt Champion

    Are you sure you have properly removed all other MinGW version from your system ?



  • I verified and there aren't other MingGW on my system, either in the registry.


  • Moderators

    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?



  • When I do this, I have the same problem.
    I my PATH, I have C:\Qt\Qt5.2.0\5.2.0\mingw48_32\bin.



  • Hi
    I have the same problem with the serialport terminal demo program.
    This rise the same assert, but only in debug mode. In the relase it is runining.
    This is the new installation of qt 5.2.


  • Moderators

    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


Log in to reply