Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2914

macOS: Crash when opening options with Spanish UI

      As reported in https://community.metabrainz.org/t/picard-crashes-when-open-preferences/564794/ Picard on macOS can crash when opening the options dialog while Spanish is selected as the UI language.

       

       

          [PICARD-2914] macOS: Crash when opening options with Spanish UI

          Fix will be in the 2.12.1 release.

          All changes have also been merged into the master branch for Picard 3.

          Philipp Wolfer added a comment - Fix will be in the 2.12.1 release. All changes have also been merged into the master branch for Picard 3.

          GitHub Bot added a comment -

          See code changes in pull request #2524 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2524 submitted by phw .

          The crash happens in the locale aware sorting of release formats in Options > Metadata > Releases

          https://github.com/metabrainz/picard/blob/master/picard/ui/options/releases.py#L286-L288

          So this is something Python / locale specific. strxfrm seems to return some values the sort functions has problems with.

          I could reproduce this with Python 3.11.7. Using Python 3.12.1 fixed the issue for me. The release version is currently build with 3.11.5.

          I'll try to upgrade the Python version for the CI builds and test again.

           

          Philipp Wolfer added a comment - The crash happens in the locale aware sorting of release formats in Options > Metadata > Releases https://github.com/metabrainz/picard/blob/master/picard/ui/options/releases.py#L286-L288 So this is something Python / locale specific. strxfrm seems to return some values the sort functions has problems with. I could reproduce this with Python 3.11.7. Using Python 3.12.1 fixed the issue for me. The release version is currently build with 3.11.5. I'll try to upgrade the Python version for the CI builds and test again.  

          I tried to narrow down the issue and removed Picard's translation files completely. Unfortunately the crash still happens. So it is not related to some problem with the Picard translations but something more general, likely related to the Qt.

          Philipp Wolfer added a comment - I tried to narrow down the issue and removed Picard's translation files completely. Unfortunately the crash still happens. So it is not related to some problem with the Picard translations but something more general, likely related to the Qt.

          Philipp Wolfer added a comment - - edited

          Some updates, because this is still happening with the 2.12 release. I tested the release builds on various macOS versions.

          • The crash does not happen on macOS 10.12, 10.15 and .
          • It happens on 12.7 with Intel CPU
          • It happens on 13.6 with ARM CPU. I could not test this macOS version on an Intel CPU.
          • The crash is consistent in the builds for macOS 10.12+ and 10.14+
          • The crash is not reproducible on different OS (Windows, Linux)

          So it seems the crash is specific to newer macOS versions, at least 12.7 or later. It does seem to be independent of processor architecture. It is very specific to the Spanish locale.

          Unfortunately I'm not much closer to an actual fix. The behavior when starting from source is still the same and I don't always have the crash happening, which makes narrowing it down more difficult. I'll try to run with less options pages, maybe we can at least narrow it down to specific strings.

          Philipp Wolfer added a comment - - edited Some updates, because this is still happening with the 2.12 release. I tested the release builds on various macOS versions. The crash does not happen on macOS 10.12, 10.15 and . It happens on 12.7 with Intel CPU It happens on 13.6 with ARM CPU. I could not test this macOS version on an Intel CPU. The crash is consistent in the builds for macOS 10.12+ and 10.14+ The crash is not reproducible on different OS (Windows, Linux) So it seems the crash is specific to newer macOS versions, at least 12.7 or later. It does seem to be independent of processor architecture. It is very specific to the Spanish locale. Unfortunately I'm not much closer to an actual fix. The behavior when starting from source is still the same and I don't always have the crash happening, which makes narrowing it down more difficult. I'll try to run with less options pages, maybe we can at least narrow it down to specific strings.

          Philipp Wolfer added a comment - - edited

          While testing I could reproduce this. The application can segfault. But there are some interesting details:

          1. I could only reproduce this with Spanish, not English or German
          2. Using the packages version of Picard 2.11 crashes quite consistently
          3. Running from source the crash does not always happen
          4. Nott reproducible on Windows or Linux

          Philipp Wolfer added a comment - - edited While testing I could reproduce this. The application can segfault. But there are some interesting details: I could only reproduce this with Spanish, not English or German Using the packages version of Picard 2.11 crashes quite consistently Running from source the crash does not always happen Nott reproducible on Windows or Linux

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package
                2.12.1