[Qgis-developer] [Qgis-user] Segfault when using QgsComposition::exportAsPDF with QGIS 2.4 and python

Nyall Dawson nyall.dawson at gmail.com
Wed Aug 20 01:49:46 PDT 2014


On 20/08/2014 5:29 pm, "kimaidou" <kimaidou at gmail.com> wrote:
>
> Nyal,
>
> Thanks a lot, you find it !
> When instantiating QgsMapSettings first, then use this object to
instantiate QgsComposition, this works well with no segfault.

>
> 2014-08-19 22:48 GMT+02:00 Nyall Dawson <nyall.dawson at gmail.com>:
>> >
>>
>> Does it make any difference if you change:
>> c = QgsComposition(QgsMapSettings())
>>
>> To:
>> ms=QgsMapSettings()
>> c=QgsComposition(ms)
>>
>> ?

Martin/other python experts,

What's the best way to fix this? Is /Transfer/ appropriate, given that the
c++ code would never delete this object? Or is there an alternative sip
flag which is more appropriate for this?

Nyall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140820/efab50b1/attachment.html>


More information about the Qgis-developer mailing list