Important: Please read the 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/
    (gdb) bt
    #0 0x00007ffff6b2789c in QApplication::topLevelWidgets() () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #1 0x00007ffff6b27b5d in ?? () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #2 0x00007ffff6b2af28 in QApplicationPrivate::notifyActiveWindowChange(QWindow*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #3 0x00007ffff5c1bbc5 in QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #4 0x00007ffff5c1be6d in QGuiApplicationPrivate::eprocessWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #5 0x00007ffff5bf7d7b in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #6 0x00007fffee7edfa0 in ?? () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #7 0x00007ffff184d197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/
    #8 0x00007ffff184d3f0 in ?? () from /lib/x86_64-linux-gnu/
    #9 0x00007ffff184d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/
    #10 0x00007ffff655d93f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #11 0x00007ffff650a5ea in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) ()
    from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #12 0x00007ffff6512a44 in QCoreApplication::exec() () from /home/user1/code/Qt5.9.0/5.9/gcc_64/lib/
    #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