[QGIS-trac] Re: [Quantum GIS] #2714: Crash when resizing map window with Qt 4.6

Quantum GIS qgis at qgis.org
Sat May 15 13:48:09 EDT 2010


#2714: Crash when resizing map window with Qt 4.6
--------------------------------------------------------------+-------------
        Reporter:  mhugent                                    |         Owner:  nobody       
            Type:  bug                                        |        Status:  new          
        Priority:  critical: causes crash or data corruption  |     Milestone:  Version 1.5.0
       Component:  GUI                                        |       Version:  HEAD         
      Resolution:                                             |      Keywords:               
Platform_version:                                             |      Platform:  All          
        Must_fix:  Yes                                        |   Status_info:  0            
--------------------------------------------------------------+-------------
Comment (by jef):

 Replying to [comment:2 mhugent]:
 > Because disable the calls of processEvents would mean no incremental
 screen updates and no interruption of the rendering for 1.5? This would
 make handling of large datasets with QGIS very difficult.

 The WMS provider now has the same problem.  It seems to be a bug in the
 new Qt  [http://doc.trolltech.com/4.6/animation-overview.html Animation
 Framework] as the [http://bugreports.qt.nokia.com/browse/QTBUG-6897 Qt Bug
 report #6797] looks related.

 Following change works around the problem:
 {{{
 Index: src/gui/qgsmapcanvas.cpp
 ===================================================================
 --- src/gui/qgsmapcanvas.cpp    (revision 13491)
 +++ src/gui/qgsmapcanvas.cpp    (working copy)
 @@ -960,7 +960,11 @@
      updateCanvasItemPositions();

      updateScale();
 +#if QT_VERSION >= 0x40600
 +    QTimer::singleShot( 1, this, SLOT( refresh() ) );  // take rendering
 outside of resizeEvent()
 +#else
      refresh();
 +#endif
      emit extentsChanged();
    }
    isAlreadyIn = false;
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2714#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