Skip to content
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

Assertion failed: ! scaled_font->cache_frozen, file cairo-scaled-font.c, line 1166 #469

Closed
bellini666 opened this issue May 19, 2017 · 2 comments

Comments

@bellini666
Copy link

I'm having a problem on Windows since I migrated my application from gtk2 (pygtk) to gtk3 (pygi). Let me explain the story:

Before the migration, I used the pygtk-aio installer (http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi) to get its runtime and retrieve the libcairo-2.dll from it that cairocffi needs on Windows. It used to work nicely!

After I migrated my application to pygi, it is still working nice on Linux. I can generate pdfs and print without any problems. But then I went to test it on Windows and got this error. Since the pygi-aio installer doesn't have that dll (it appears that cairo is compiled statically there), I retrieved it from other sources. One from this bundle and another one from the cairocffi build in this page. Both of those dlls seems to be fine. I can even use them to draw some things in my application using caircffi directly.

Now comes the problem. When I call Document.write_pdf it get this assertion error and my application crashes:

Assertion failed: ! scaled_font->cache_frozen, file cairo-scaled-font.c, line 1166

I tried searching for the error and didn't find anything that would provide me a workaround or something like that, I only know that it is somewhat related to fonts... Am I missing something here?

@liZe
Copy link
Member

liZe commented Jun 15, 2017

It looks like a bug in Cairo, reported here and here for example.

You probably hit this bug because the Cairo version has been updated between the two bundles. There's unfortunately nothing we can do here. My only patch for Cairo has been waiting for 3 years before being accepted (see #278), I won't contribute to Cairo anymore.

As this bug is related to fonts, you can try to change the fonts used in your documents and cross your fingers 🤞.

@liZe liZe closed this as completed Jun 15, 2017
@bellini666
Copy link
Author

CC @romaia

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