Skip to content

(MSVC runtime needed on windows): Program terminated when using skia.textlayout on windows #289

@MeetWq

Description

@MeetWq

Describe the bug
When I running the skparagraph-example.py script on windows, the program terminated without any output.

To Reproduce
Steps to reproduce the behavior:

  • A clean Windows 10 installation
  • Install Python 3.12.7 and skia-python 132.0b11
  • Download and run skparagraph-example.py

There will be a DLL load failed while importing skia, related to #176
Snipaste_2024-12-02_14-53-05

After installing "Microsoft Visual C++ 2015 Redistributable", there will be no error when running the script, except for a warning SkIcuLoader: datafile missing. This warning is not a concern, as there is already a icudtl.dat in the Lib\site-packages path.
Snipaste_2024-12-02_15-00-46

The problem is that the script exits without doing anything or reporting any other errors.

After I installed the latest Microsoft Visual C++ Redistributable, the script worked just fine.

Expected behavior
skia.textlayout works fine with the default installation

Desktop (please complete the following information):

  • OS: Windows 10
  • Python: 3.12.7
  • skia-python version: 132.0b11

Additional context
I tried installing different versions of Microsoft Visual C++ Redistributable, it shows that it only works if Microsoft Visual C++ Redistributable 2022 (14.38.33135 and newer) is installed.

And there is a msvc-runtime package, maybe it's a good idea to make it a dependency of the windows version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions