Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT Gui application segmentation fault on exit
QtWS25 Last Chance

QT Gui application segmentation fault on exit

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 885 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    evanol
    wrote on last edited by
    #1

    Hi,
    I have previously developed and successfully used a Qt application using Ti's Sitara SDK (ti-sdk-am335x-evm-07.00.00.00) which built applications based on Qt4.8.4
    On migrating to ti-processor-sdk-linux-am335x-evm-01.00.00.03, now using Qt5.4.1, the same application now has a segmentation fault on exit.
    To debug the issue i created the simple HelloWorld application below, where the same segFault occurs on exit

    #include <QApplication>
    #include <QLabel>
    #include <QTimer>
    #include <QDebug>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    qDebug() << "hello world!" << endl;

    QLabel label("this is a text label!");
    label.show();

    QTimer::singleShot( 2000, &app, SLOT( quit() ) );

    qDebug() << "app.exec() return code :" << app.exec();

    return 0;
    }

    If i remove the line 'label.show();' then the application runs successfully and no segmentation Fault occurs.
    The issue appears only to occur when a GUI is displayed for the application.
    I have tried to track down the issue using strace and running the application in debug mode but have been unable to narrow it down. The application crashes on the line 'return 0;'
    Any help on narrowing down the issue would be appreciated, thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should try to get a stack trace of your crash, that will help narrow down the problem.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved