[QGIS-trac] Re: [Quantum GIS] #3286: Qgis segfaults instanciating QgsComposition from python

Quantum GIS qgis at qgis.org
Fri Dec 3 12:06:13 EST 2010


#3286: Qgis segfaults instanciating QgsComposition from python
---------------------------------------------------------+------------------
   Reporter:  elpaso                                     |              Owner:  mhugent           
       Type:  bug                                        |             Status:  new               
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.7.0     
  Component:  Python plugins and bindings                |            Version:  Trunk             
   Keywords:  QgsComposition                             |   Platform_version:  ubuntu lucid 64bit
   Platform:  Linux                                      |           Must_fix:  No                
Status_info:  0                                          |  
---------------------------------------------------------+------------------

Comment(by elpaso):

 Hi, I tested your patch but it still crashes. BTW I suspect it's a bug in
 QT and I found a way to make it work, it seems like QGraphicsScene (from
 which QgsComposition inherits, needs a QApplication instance, so this line
 needs to be added before the call to QgsComposition constructor.

 {{{
 app = QtGui.QApplication(sys.argv, QtGui.QApplication.Tty)
 }}}

 I thought having called QgsApplication.initQgis would have been enough to
 have a QApplication instance.

 You can probably close this bug.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3286#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list