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. Code running in 5.12, but not in 5.15 or higher
QtWS25 Last Chance

Code running in 5.12, but not in 5.15 or higher

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 346 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.
  • T Offline
    T Offline
    Thomas 63
    wrote on last edited by
    #1

    Hello

    I generate code in Qt Creator 4.14.2
    My code did run in all older Versions up to 5.12.4
    But when I use it in 5.15.2 or 6.0.1, it does compile but crashes with the following message:

    ---------------------------
    Signal erhalten
    ---------------------------
    <p>Der Prozess wurde wegen eines Signals vom Betriebssystem angehalten.<p><table><tr><td>Name des Signals : </td><td>SIGSEGV</td></tr><tr><td>Bedeutung : </td><td>Segmentation fault</td></tr></table>
    ---------------------------
    OK   
    ---------------------------
    

    It crashes in the line

    ui->setupUi(this);
    

    In mainwindow.cpp
    What can i do to avoid this?

    Thanks,

    Thomas

    jsulmJ 1 Reply Last reply
    0
    • T Thomas 63

      Hello

      I generate code in Qt Creator 4.14.2
      My code did run in all older Versions up to 5.12.4
      But when I use it in 5.15.2 or 6.0.1, it does compile but crashes with the following message:

      ---------------------------
      Signal erhalten
      ---------------------------
      <p>Der Prozess wurde wegen eines Signals vom Betriebssystem angehalten.<p><table><tr><td>Name des Signals : </td><td>SIGSEGV</td></tr><tr><td>Bedeutung : </td><td>Segmentation fault</td></tr></table>
      ---------------------------
      OK   
      ---------------------------
      

      It crashes in the line

      ui->setupUi(this);
      

      In mainwindow.cpp
      What can i do to avoid this?

      Thanks,

      Thomas

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

      @Thomas-63 said in Code running in 5.12, but not in 5.15 or higher:

      What can i do to avoid this?

      Please post the stack trace after crash.

      Also, did you completely rebuild your project after switching to other Qt version?

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

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Thomas 63
        wrote on last edited by
        #3

        Is this the stack trace?

        0x4014b0                  48 83 ec 28                    sub    $0x28,%rsp
        0x4014b4  <+    4>        48 8b 05 05 af 53 00           mov    0x53af05(%rip),%rax        # 0x93c3c0 <.refptr.mingw_app_type>
        0x4014bb  <+   11>        c7 00 01 00 00 00              movl   $0x1,(%rax)
        0x4014c1  <+   17>        e8 aa aa 25 00                 callq  0x65bf70 <__security_init_cookie>
        0x4014c6  <+   22>        e8 b5 fc ff ff                 callq  0x401180 <__tmainCRTStartup>
        0x4014cb  <+   27>        90                             nop
        0x4014cc  <+   28>        90                             nop
        0x4014cd  <+   29>        48 83 c4 28                    add    $0x28,%rsp
        0x4014d1  <+   33>        c3                             retq
        0x4014d2  <+   34>        0f 1f 40 00                    nopl   0x0(%rax)
        0x4014d6  <+   38>        66 2e 0f 1f 84 00 00 00 00 00  nopw   %cs:0x0(%rax,%rax,1)
        

        or this?

        1 QWidget::raise()                            0x3207c70 
        2 Ui_MainWindow::setupUi ui_mainwindow.h 2602 0x6e3664  
        3 MainWindow::MainWindow mainwindow.cpp  74   0x403f6f  
        4 qMain                  main.cpp        8    0x4015ac  
        5 WinMain                qtmain_win.cpp  97   0x65d41d  
        6 __tmainCRTStartup                           0x4013c7  
        7 WinMainCRTStartup                           0x4014cb  
        
        

        Yes. I made a rebuild of the project

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Simplify your code until it no longer crashes. Doesn't look to hard to track down the issues since it's directly in the ctor. I would guess 'ui' is not initialized but without code it's just a wild guess.

          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
          0
          • T Offline
            T Offline
            Thomas 63
            wrote on last edited by
            #5

            It is solved - I had to find some updates for external libraries and the problem was gone.

            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