Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QStyleFactory.create SIGSEGV on MacOS
Qt 6.11 is out! See what's new in the release blog

QStyleFactory.create SIGSEGV on MacOS

Scheduled Pinned Locked Moved Solved Qt for Python
9 Posts 2 Posters 1.9k Views 2 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.
  • Q Offline
    Q Offline
    Qoissi
    wrote on last edited by
    #1

    Hello,

    This simple script is generating a SIGSEGV fault on my configuration:

    from PyQt6 import QtWidgets
    s = QtWidgets.QStyleFactory.create('macOS')
    

    My configuration:

    • MacOS Monterey 12.6
    • Python 3.10.8
    • PyQt6

    Note that if other styles like 'Fusion' or 'Windows' are used this doesn't fail.
    You might argue that creating a 'macOS' style on Macintosh is useless as this is anyway the default style, but that's not my point...

    Any idea on how to fix that?

    Many thanks.

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

      Hi,

      M1 or Intel ?

      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
      • Q Offline
        Q Offline
        Qoissi
        wrote on last edited by
        #3

        My Mac is an Intel one but I could check on another Mac with M1 and same result.
        Also checked with Python 3.9.x -> same.
        Issue looks highly reproduceable...

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

          How did you install these ? Brew ? Pip ? Conda ? A mix of them ?

          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
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            I can confirm the crash, unless you create a QApplication object before calling create.

            You should check with the Riverbank Computing folks about that matter.

            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
            1
            • Q Offline
              Q Offline
              Qoissi
              wrote on last edited by
              #6

              Ok thanks, what's the best way to reach them about issues like that?
              Do you recommend using the dedicated mailing list?
              https://www.riverbankcomputing.com/mailman/listinfo/pyqt

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                Qoissi
                wrote on last edited by
                #7

                In between thanks for your workaround, I thought QApplication.setStyle() needed to be called before creating QApplication object but actually it works also perfectly just after and this prevents to have this SIGSEGV core... I believe we can consider this issue as solved. Thanks again.

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

                  I tested with PySide6 and Qt 6.4.0 and the same crashes happens so PyQt is innocent in that matter.

                  I'll open a bug report later.

                  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
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Reported as QTBUG-108047

                    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