Bug report #12050

Occasional crash on launch

Added by Nyall Dawson almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Martin Dobias
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20252

Description

I'm seeing an occasional crash on launch with current master. I've been unable to reliably reproduce it, but the console will output

src/gui/qgsmapcanvas.cpp: 846: (setExtent) [0ms] Empty extent - keeping old scale with new center!

hundreds of times before the crash occurs. I suspect this is probably related to the rotation refactoring changes to map canvas.

Associated revisions

Revision ffd7f8a8
Added by Martin Dobias almost 10 years ago

Fix #12050 - possible crash on launch

Do not allow infinite recursion setExtent() -> setCenter() -> setExtent()

History

#1 Updated by Martin Dobias almost 10 years ago

  • Assignee set to Martin Dobias

Couldn't reproduce a crash on start, but this Python code will lead to the same crash:

from qgis.gui import QgsMapCanvas
c=QgsMapCanvas()
c.resize(0,0)
c.setExtent(QgsRectangle(1,1,1,1))

#2 Updated by Martin Dobias almost 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF