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

Outdated Visual Studio Redistributables in Shiboken6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4: Low P4: Low
    • 6.10.0, 6.9.2
    • 6.8.0
    • Build System
    • None
    • Windows
    • d16a35c79 (dev), 040e19b8d (dev), 51758ef0f (dev), 15e1909c8 (6.9), 8953dc2a3 (6.9), 2315d98d0 (6.9)

      The msvcp140.dll (and maybe other DLLs) vendored with Shiboken6 is not compatible with binary Python extensions that use DLL dependencies compiled with Visual Studio 2022 and the v143 toolset. In our case, the dependency requires at least version 14.40 of msvcp140.dll, while Shiboken includes version 14.39. The current version is 14.42.

      In this configuration, importing PyQt6 first causes the outdated msvcp140.dll to load. A subsequent import of the binary extension fails because the already loaded DLL is incompatible.

      A workaround exists by first importing the binary extension, causing the msvcp140.dll to be loaded from the system directory (which is usually the correct version provided by the VC Redistributables Installer).

      A mid-term solution would be to update the redistributable files included with Shiboken6.

      A more long-term solution would be to check in Shiboken6's {}init{}.py whether a newer version of the VC Redistributables is installed in the system and explicitly load those instead of the included DLLs.

      References

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            bkloster Benjamin Kloster
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: