Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. App is crashing for unknown reasons...
Forum Updated to NodeBB v4.3 + New Features

App is crashing for unknown reasons...

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 298 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.
  • R Offline
    R Offline
    rockonrover
    wrote on last edited by
    #1

    Console shows this :
    09:24:17: Starting D:\build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug\debug\SegyViewer.exe ...
    QWidget: Must construct a QApplication before a QWidget
    09:24:26: The program has unexpectedly finished.
    09:24:26: The process was ended forcefully.
    09:24:26: D:/build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug/debug/SegyViewer.exe crashed.

    I got code from here:
    https://github.com/uqzzhao/SegyViewer.git

    Christian EhrlicherC 1 Reply Last reply
    0
    • R rockonrover

      Console shows this :
      09:24:17: Starting D:\build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug\debug\SegyViewer.exe ...
      QWidget: Must construct a QApplication before a QWidget
      09:24:26: The program has unexpectedly finished.
      09:24:26: The process was ended forcefully.
      09:24:26: D:/build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug/debug/SegyViewer.exe crashed.

      I got code from here:
      https://github.com/uqzzhao/SegyViewer.git

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      UIse a debugger, see where it crashes, fix it - the normal work for a developer...

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • R Offline
        R Offline
        rockonrover
        wrote on last edited by
        #3

        I used debugger, it has took me to line 626 of ui_mainwindow.h

        10:05:33: Starting D:\build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug\debug\SegyViewer.exe ...
        QWidget: Must construct a QApplication before a QWidget
        10:05:37: The program has unexpectedly finished.
        10:05:37: The process was ended forcefully.
        10:05:38: D:/build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug/debug/SegyViewer.exe crashed.

        jsulmJ C 2 Replies Last reply
        0
        • R rockonrover

          I used debugger, it has took me to line 626 of ui_mainwindow.h

          10:05:33: Starting D:\build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug\debug\SegyViewer.exe ...
          QWidget: Must construct a QApplication before a QWidget
          10:05:37: The program has unexpectedly finished.
          10:05:37: The process was ended forcefully.
          10:05:38: D:/build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug/debug/SegyViewer.exe crashed.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rockonrover said in App is crashing for unknown reasons...:

          it has took me to line 626 of ui_mainwindow.h

          We do not know what is in that line...
          Please post the stack trace after the crash.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R rockonrover

            I used debugger, it has took me to line 626 of ui_mainwindow.h

            10:05:33: Starting D:\build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug\debug\SegyViewer.exe ...
            QWidget: Must construct a QApplication before a QWidget
            10:05:37: The program has unexpectedly finished.
            10:05:37: The process was ended forcefully.
            10:05:38: D:/build-segyviewer-Desktop_Qt_5_12_5_MinGW_64_bit-Debug/debug/SegyViewer.exe crashed.

            C Offline
            C Offline
            ChrisW67
            wrote on last edited by
            #5

            @rockonrover Given the warning, "QWidget: Must construct a QApplication before a QWidget", ask yourself:

            • Does my main() construct a QApplication object at all?
            • Does my application create any QWidgets before it constructs the QApplication? They could be explicitly created in main() before QApplication, or because you have QWidget objects as statics, file or global variables.
            1 Reply Last reply
            4

            • Login

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