Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MeetWq opened this issue Dec 2, 2024 · 3 comments

Comments

@MeetWq
Copy link
Contributor

MeetWq commented Dec 2, 2024

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.

@MeetWq
Copy link
Contributor Author

MeetWq commented Dec 2, 2024

I found that pip install msvc-runtime won't work in a virtual environment...

@HinTak HinTak changed the title Program terminated when using skia.textlayout on windows (MSVC runtime needed on windows): Program terminated when using skia.textlayout on windows Dec 2, 2024
@HinTak
Copy link
Collaborator

HinTak commented Dec 2, 2024

Same/similar as #176

@HinTak HinTak closed this as completed Dec 2, 2024
@HinTak
Copy link
Collaborator

HinTak commented Dec 2, 2024

The spurious message issue is https://issues.skia.org/issues/40042461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants