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

QML C++ crash when dialog window is getting opened on pressing button in QT Application.



  • Below is the stack trace

    This is not reproducible on every click on button

    This stack trace do not include call from my code. So, i am not sure about how to proceed this.

    I am using version Qt5.9.0. and gcc 5.4.0-6

    Thread 1 "testGui" received signal SIGSEGV, Segmentation fault.
    0x00007ffff6b2789c in QApplication::topLevelWidgets() () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5
    (gdb) bt
    #0 0x00007ffff6b2789c in QApplication::topLevelWidgets() () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5
    #1 0x00007ffff6b27b5d in ?? () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5
    #2 0x00007ffff6b2af28 in QApplicationPrivate::notifyActiveWindowChange(QWindow*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Widgets.so.5
    #3 0x00007ffff5c1bbc5 in QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5
    #4 0x00007ffff5c1be6d in QGuiApplicationPrivate::eprocessWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5
    #5 0x00007ffff5bf7d7b in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Gui.so.5
    #6 0x00007fffee7edfa0 in ?? () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5XcbQpa.so.5
    #7 0x00007ffff184d197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #8 0x00007ffff184d3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #9 0x00007ffff184d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #10 0x00007ffff655d93f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5
    #11 0x00007ffff650a5ea in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5
    #12 0x00007ffff6512a44 in QCoreApplication::exec() () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5
    #13 0x0000000000445db7 in main (argc=5, argv=0x7fffffffe578) at /home/user9/code/test/main.cpp:1154



  • please look into this.


  • Lifetime Qt Champion

    @rahul233343 Did you try with a more recent Qt version to see whether it also crashes?



  • @jsulm no, i haven't try the new version.
    I am not getting where i put logs in my code.


  • Lifetime Qt Champion

    @rahul233343 Can you show the code where you open that dialog?



  • @jsulm no i can't.
    But i can give the procedure when it happens.
    1 Suppose you are running two instance of same binary. And when you shift from one binary to another. the first one crash with above stack trace.

    2 When you click on the spinbox widget to edit the value, then also it crash.


  • Lifetime Qt Champion

    @rahul233343 Sorry, without code and knowing what these binaries doI can't tell you why it crashes (and it is unlikely that anybody else can).



  • @jsulm

    1. Can you elaborate top level widget seq fault. what it seems to be from the stack trace so that i dig up that area.
    2. Do you think it is an memory issue?

Log in to reply