Bug 89161 - Error returns from Cairo library are not correctly signalled in python3-cairo
Summary: Error returns from Cairo library are not correctly signalled in python3-cairo
Status: RESOLVED FIXED
Alias: None
Product: pycairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Steve Chaplin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 03:12 UTC by Lawrence D'Oliveiro
Modified: 2017-07-05 15:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
set CairoError to an exception that can be raised (350 bytes, text/plain)
2015-02-16 03:12 UTC, Lawrence D'Oliveiro
Details

Description Lawrence D'Oliveiro 2015-02-16 03:12:39 UTC
Created attachment 113515 [details]
set CairoError to an exception that can be raised

There is a global variable called “CairoError” in python3-cairo, that is passed to PyErr_SetString to raise exceptions for errors returned from the underlying Cairo library. Unfortunately, this is always NULL, which seems to cause the PyErr_SetString calls to be no-ops. This can manifest itself as errors reported from Python to the effect of “null result without error return”.

It turns out an Exception object is created at module initialization time, but never assigned to this variable. This patch fixes the problem.
Comment 1 Christoph Reiter 2017-07-05 15:07:39 UTC
Fixed since 1.11


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.