Discussion:
[cairo] Assertion failed (Windows 10 x64)
Martin Koppehel
2018-05-28 17:42:51 UTC
Permalink
Hi all,

I'm experiencing some weird behavior with cairo 1.15.2 when running on
Windows 10 x64.
I have some code which renders paths using HarfBuzz and FreeType and
occasionally, my program just crashes.

In order to debug this, I redirected stderr to a file and got the
following output:

Assertion failed!

Program: test.exe
File: cairo-pattern.c, Line 1064

Expression: CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)
Assertion failed!

Any idea how I can fix this?
I'm happy to provide source code, even though I can't share it publicly.

Best regards,
Martin
Uli Schlachter
2018-05-30 05:25:20 UTC
Permalink
Hi,
Post by Martin Koppehel
Expression: CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)
Assertion failed!
All I can tell you from this message is that some pattern was destroyed too often. For example, the following code would cause this message:

cairo_pattern_t *p = cairo_pattern_create_rgb(0, 0, 0);
cairo_pattern_destroy(p);
cairo_pattern_destroy(p);
Post by Martin Koppehel
Any idea how I can fix this?
Well, do not free a pattern twice. ;-)

I guess that somehow getting a backtrace would me imensely useful for debugging this.

Good luck,
Uli
--
“Some people are worth melting for.” - Olaf
--
cairo mailing list
***@cairographics.org
https://lists.cair
Continue reading on narkive:
Loading...