[Qgis-user] Segmentation fault running QGis 2.8 python API

Raphael Dubois raphael.dubois at openocean.fr
Wed Feb 25 03:07:13 PST 2015


Hello,

I am using QGis API with python2.7. My script worked perfectly with QGis 
2.6, but since I upgraded it to 2.8 there are random errors occurring.
I use it on a headless server, so I call my script with xvfb-run, like that:
xvfb-run -a python myscript.py myconfig.xml

The segmentation fault (sometimes) occurs just at the beginning, when I 
launch QGis and instanciate my "QgisInitializer" class:
qgisprefix = '/usr'
sys.path.insert(0, qgisprefix+'/share/qgis/python')
sys.path.insert(1, qgisprefix+'/share/qgis/python/plugins')
qgis.core.QgsApplication.setPrefixPath(qgisprefix, True)
qgis.core.QgsApplication.initQgis()
self.appQgis = qgis.core.QgsApplication([], True)
self.canvas = qgis.gui.QgsMapCanvas()

Sometimes I have this segmentation fault, sometimes this error:
*** Error in `python': free(): invalid pointer: 0x00007fff1c6e7850 ***

...and sometimes it works. I must say I am lost here. Can anyone help ? 
Are those known bugs ?

Thank you,

-- 
Raphaƫl Dubois
Project Engineer
Open Ocean SAS
27 rue du Chemin Vert
75011 Paris
+33(0)9 7239 0165

raphael.dubois at openocean.fr <mailto:raphael.dubois at openocean.fr>
http://www.openocean.fr
<http://www.openocean.fr>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150225/337d6619/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open-ocean.gif
Type: image/gif
Size: 5361 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150225/337d6619/attachment.gif>


More information about the Qgis-user mailing list