Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2485

Calling QLocale::bcp47Name crashes on macOS

    XMLWordPrintable

Details

    • macOS
    • a00508037 (dev), 51b710e61 (6.6), bf37f4051 (6.5), 9e8321e7f (dev), aea26650b (6.6)

    Description

      from PySide6.QtWidgets import QApplication
      from PySide6.QtCore import QLocale
      app = QApplication([])
      print(QLocale.system().bcp47Name())
      

      This results in a crash in PySide::pyStringToQString().

      Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      0   libpyside6.abi3.6.5.dylib     	       0x101247546 PySide::pyStringToQString(_object*) + 22
      1   QtCore.abi3.so                	       0x107a11094 Sbk_QLocaleFunc_system(_object*) + 180
      2   Python                        	       0x10177311a cfunction_vectorcall_NOARGS + 90
      3   Python                        	       0x10183f35f _PyEval_EvalFrameDefault + 60303
      4   Python                        	       0x10182f48a PyEval_EvalCode + 282
      5   Python                        	       0x1018b60b7 PyRun_InteractiveOneObjectEx + 839
      6   Python                        	       0x1018b4f46 _PyRun_InteractiveLoopObject + 118
      7   Python                        	       0x1018b47ef _PyRun_AnyFileObject + 63
      8   Python                        	       0x1018b926d PyRun_AnyFileExFlags + 125
      9   Python                        	       0x1018dd1ce pymain_run_stdin + 142
      10  Python                        	       0x1018dc76d Py_RunMain + 1645
      11  Python                        	       0x1018dd96b pymain_main + 43
      12  Python                        	       0x1018de48a Py_BytesMain + 42
      13  dyld                          	    0x7ff80d8d141f start + 1903
      

      Attachments

        Issue Links

          For Gerrit Dashboard: PYSIDE-2485
          # Subject Branch Project Status CR V

          Activity

            People

              shpremna Shyamnath Premnadh
              poikelin Joni Poikelin
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes