Andreas,

Nice job hunting this down. I'd been seeing it as well upstream (http://trac.mapnik.org/ticket/392 ) but had not taken the time to debug.

I agree that #2 is critical - that we avoid crashes if pycairo python module is unavailable at import time even if mapnik was compiled with pycairo support.

Dane


On Jul 27, 2009, at 8:13 AM, Andreas Barth wrote:

Package: python-mapnik
Version: 0.6.0-1
Severity: serious
Tags: patch

Hi,

after installation of python-mapnik I tried to generate images, but I
got segmentation faults.

After some debugging (thanks, Steve) we found that the culprit is that
Pycairo_CAPI is null. This should be set by Pycairo_IMPORT. Howver,
looking at the code of PyCObject_Import this function returns null if
the requested python library is not there.


So, there are two possibilities to resolve this issue:

1. Add an dependency to python-cairo to the package.

2. Add an error message to the initalization function in case the
function returns null.


I think best both should be done.



Cheers,
Andi







--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to