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

QApplication does not work with Qt5.11.1 build on RPi



  • Hello,

    I want to build the Modbus application using the QT platform on my Rpi .

    I have following environment and setting are there for QtCreator and Qt.

    QtCreator 4.2.0

    Qtkits setting :

    Qtversion : 5.11.1

    when i run the below code :

    int main(int argc, char argv[])
    {
    // TODO uncomment this line before release
    // right now we always need it
    QLoggingCategory::setFilterRules(QStringLiteral("qt.modbus
    = true"));
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
    

    }

    it get stuck and exit the code at "QApplication a(argc, argv);" line ...

    what I got at output windows is :

    =library-loaded,id="/opt/Qt5.11/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so",target-name="/opt/Qt5.11/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so",host-name="/opt/Qt5.11/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so",symbols-loaded="0",thread-group="i1"
    sLibrary /opt/Qt5.11/plugins/egldeviceintegrations/libqeglfs-brcm-integration.so loaded

    =thread-created,id="2",group-id="i1"
    sThread 2 created
    ~"[New Thread 0x7311b440 (LWP 4869)]\n"
    s[New Thread 0x7311b440 (LWP 4869)]
    *running,thread-id="2"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
    =thread-created,id="3",group-id="i1"
    sThread 3 created
    ~"[New Thread 0x727ff440 (LWP 4870)]\n"
    s[New Thread 0x727ff440 (LWP 4870)]
    *running,thread-id="3"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
    =thread-created,id="4",group-id="i1"
    sThread 4 created
    ~"[New Thread 0x71fff440 (LWP 4871)]\n"
    s[New Thread 0x71fff440 (LWP 4871)]
    *running,thread-id="4"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
    =thread-created,id="5",group-id="i1"
    sThread 5 created
    ~"[New Thread 0x717ff440 (LWP 4872)]\n"
    s[New Thread 0x717ff440 (LWP 4872)]
    *running,thread-id="5"
    dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.

    • failed to add service - already in use?

    ~"[Thread 0x71fff440 (LWP 4871) exited]\n"
    s[Thread 0x71fff440 (LWP 4871) exited]
    =thread-exited,id="4",group-id="i1"
    sThread 4 in group i1 exited
    ~"[Thread 0x7311b440 (LWP 4869) exited]\n"
    s[Thread 0x7311b440 (LWP 4869) exited]
    =thread-exited,id="2",group-id="i1"
    sThread 2 in group i1 exited
    ~"[Thread 0x727ff440 (LWP 4870) exited]\n"
    s[Thread 0x727ff440 (LWP 4870) exited]
    =thread-exited,id="3",group-id="i1"
    sThread 3 in group i1 exited
    ~"[Thread 0x76ff0220 (LWP 4809) exited]\n"
    s[Thread 0x76ff0220 (LWP 4809) exited]
    =thread-exited,id="1",group-id="i1"
    sThread 1 in group i1 exited
    ~"warning: Error removing breakpoint 0\n"
    ~"warning: Error removing breakpoint 0\n"
    ~"warning: Error removing breakpoint 0\n"
    ~"warning: Error removing breakpoint 0\n"
    ~"warning: Error removing breakpoint 0\n"
    ~"warning: Error removing breakpoint 0\n"
    ~"[Inferior 1 (process 4809) exited with code 01]\n"
    =thread-exited,id="5",group-id="i1"
    sThread 5 in group i1 exited
    =thread-group-exited,id="i1",exit-code="01"
    sThread group i1 exited
    dNOTE: INFERIOR EXITED
    dState changed from InferiorRunOk(11) to InferiorShutdownOk(18) [master]
    dState changed from InferiorShutdownOk(18) to EngineShutdownRequested(19) [master]
    dQUEUE: SHUTDOWN ENGINE
    *stopped,reason="exited",exit-code="01"
    sApplication exited with exit code exit-code="01"

    dCALL: SHUTDOWN ENGINE
    dPLAIN ADAPTER SHUTDOWN 19
    dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
    <940python theDumper.exitGdb({"token":940})

    &"python theDumper.exitGdb({"token":940})\n"

    dGDB PROCESS FINISHED, status 0, exit code 0
    dNOTE: ENGINE SHUTDOWN OK
    dState changed from EngineShutdownRequested(19) to EngineShutdownOk(21) [master]
    dState changed from EngineShutdownOk(21) to DebuggerFinished(22) [master]
    dQUEUE: FINISH DEBUGGER
    dNOTE: FINISH DEBUGGER
    dHANDLE RUNCONTROL FINISHED
    sDebugger finished.

    Appreciate if any help on this.

    Thanks,
    Rakesh Patel


Log in to reply