Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Qt6 application Crash on startup on Linux
Qt 6.11 is out! See what's new in the release blog

Qt6 application Crash on startup on Linux

Scheduled Pinned Locked Moved Solved Qt 6
16 Posts 5 Posters 4.7k Views 3 Watching
  • 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.
  • SGaistS SGaist

    Hi,

    The two steps port is not a bad idea. Follow the porting guide from Qt 4 to Qt 5 and then do the small adjustments for Qt 6.

    Depending on what you are using you should wait for 6.2 so it's still a good idea to go through 5.15

    N Offline
    N Offline
    nitingera
    wrote on last edited by
    #7

    @SGaist agreed... but not much time... The application is successfully ported on Windows and MAC but only giving issues in Linux. Crashing in stylesheet functions

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

      Which version of Qt are you using on Linux ?

      Did you try to start from an empty stylesheet and add back elements until it crashes ?

      Which version of Linux are you using ?

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

      N 1 Reply Last reply
      0
      • N Offline
        N Offline
        nitingera
        wrote on last edited by
        #9

        Built the Qt6.2 branch on CentOS 7.6

        The debug output gives this call stack

        1 QMetaType::canConvert qmetatype.cpp 2415 0x7fffee147754
        2 QVariant::canConvert qvariant.h 252 0x7fffee1ae916
        3 QVariant::convert qvariant.cpp 2054 0x7fffee1ad48c
        4 parseColorValue qcssparser.cpp 714 0x7fffefc4c58a
        5 parseBrushValue qcssparser.cpp 814 0x7fffefc4d0aa
        6 QCss::ValueExtractor::borderValue qcssparser.cpp 1009 0x7fffefc4e808
        7 QCss::ValueExtractor::extractBorder qcssparser.cpp 631 0x7fffefc4bebc
        8 QRenderRule::QRenderRule qstylesheetstyle.cpp 968 0x7ffff06b7469
        9 QStyleSheetStyle::renderRule qstylesheetstyle.cpp 1854 0x7ffff06bc65c
        10 QStyleSheetStyle::setGeometry qstylesheetstyle.cpp 2571 0x7ffff06be69f
        11 QStyleSheetStyle::polish qstylesheetstyle.cpp 2884 0x7ffff06c08db
        12 QWidget::event qwidget.cpp 8759 0x7ffff062d538
        13 QApplicationPrivate::notify_helper qapplication.cpp 3396 0x7ffff05af110
        14 QApplication::notify qapplication.cpp 3346 0x7ffff05aef18
        15 My_Application::notify My_Application.cpp 490 0x7ffff7e46343
        16 My_Application::notify My_Application.cpp 64 0x7ffff1bc190e
        17 MyApplicationWithExceptionHandling::notify MyApplicationWithExceptionHandling.cpp 66 0x113d179
        18 MyApplication::notify My_Application.cpp 301 0x96112a
        19 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1061 0x7fffee104944
        20 QCoreApplication::sendEvent qcoreapplication.cpp 1469 0x7fffee1052f0
        21 QWidget::ensurePolished qwidget.cpp 9907 0x7ffff062f152
        22 QWidget::ensurePolished qwidget.cpp 9916 0x7ffff062f1de
        23 QWidget::ensurePolished qwidget.cpp 9916 0x7ffff062f1de
        24 QWidgetPrivate::setVisible qwidget.cpp 8078 0x7ffff062b91b
        25 QWidget::setVisible qwidget.cpp 8052 0x7ffff062b7b2
        26 QWidget::show qwidget.cpp 7678 0x7ffff062a5c7
        27 QStackedLayout::setCurrentIndex qstackedlayout.cpp 323 0x7ffff060cffa
        28 QStackedLayout::insertWidget qstackedlayout.cpp 233 0x7ffff060cc0e
        29 QStackedWidget::insertWidget qstackedwidget.cpp 181 0x7ffff089e88d
        30 My_LayoutFrame::addTab myulayoutframe.cpp 459 0x7ffff4af0427
        31 My_LayoutArea::add mylayoutarea.cpp 94 0x7ffff4ae8a25

        1 Reply Last reply
        0
        • SGaistS SGaist

          Which version of Qt are you using on Linux ?

          Did you try to start from an empty stylesheet and add back elements until it crashes ?

          Which version of Linux are you using ?

          N Offline
          N Offline
          nitingera
          wrote on last edited by nitingera
          #10

          @SGaist Can it be due to missing style plugin on Linux?
          As there are style plugins for Mac and Windows (qwindowsvistastyle.dll) in plugin/styles but nothing for Linux.
          Maybe any missing dependency while building?

          The Config summary states the following

          Qt Widgets:
          GTK+ ................................... yes
          Styles ................................. Fusion Windows

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

            Sorry, I lost track of this thread.

            No as in the case of style sheets there's a dedicated QStyle subclass for it.

            Can you reproduce that with a minimal compilable example ?

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

            N 1 Reply Last reply
            0
            • A.A.SEZENA Offline
              A.A.SEZENA Offline
              A.A.SEZEN
              wrote on last edited by
              #12

              Although I think that you have cleaned the build directory of your project, I still wanted to go over the topic.

              N 1 Reply Last reply
              0
              • SGaistS SGaist

                Sorry, I lost track of this thread.

                No as in the case of style sheets there's a dedicated QStyle subclass for it.

                Can you reproduce that with a minimal compilable example ?

                N Offline
                N Offline
                nitingera
                wrote on last edited by
                #13

                @SGaist
                Although I can't produce a minimal compilable example as of now but I could find atleast one instance where it is crashing
                This line crashes
                framePoint->setStyleSheet(QString("border: 1px solid lightGray; background-color: rgb(%1, %2, %3 );")).arg(backgroundCol.red()).arg(backgroundCol.green()).arg(backgroundCol.blue());

                But this one works fine
                framePoint->setStyleSheet(QString("border: 1px; border-color: rgb(211, 211, 211); background-color: rgb(%1, %2, %3 );")).arg(backgroundCol.red()).arg(backgroundCol.green()).arg(backgroundCol.blue());

                Maybe some issue with parsing in stylesheet

                1 Reply Last reply
                0
                • A.A.SEZENA A.A.SEZEN

                  Although I think that you have cleaned the build directory of your project, I still wanted to go over the topic.

                  N Offline
                  N Offline
                  nitingera
                  wrote on last edited by
                  #14

                  @A-A-SEZEN Commenting some specific stylesheet statements works. Rebuilding the project doesn't solve my issue. Is there anything specific that I need to cleanup?

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

                    You may have found a bug.

                    Can you reproduce that on a dummy widget ?

                    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
                    • N Offline
                      N Offline
                      nitingera
                      wrote on last edited by
                      #16

                      Apologies for false alarm....
                      It was crashing trying to set style sheet to a non existent plugin...
                      Issue resolved..
                      Thanks for the help :)

                      1 Reply Last reply
                      2

                      • Login

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