Bug report #10352

Exception with offset polygon layer and composition

Added by Nyall Dawson over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:Alvaro Huarte
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:18773

Description

I get an unknown except error when working with a map item in a composition, which I'm 90% certain is caused by an offset line applied to a polygon layer in the map.

Steps to reproduce:
- Add a polygon layer to the map
- Style this layer with an Outline: Simple Line layer
- Set a negative offset on the line so that it is drawn outside the polygon's outer ring
- Create a composition, add a map item
- Pan and zoom the composer map item around the edge of the polygon with the offset line fill. Sooner or later an "unknown exception" error box will pop up.

I'm only seeing this with the layer with the offset fill. My guess is it's something to do with the polygon being clipped due to the bounds of the map item in the composer, and that this causes the exception.
I haven't seen this on 2.2, so I suspect it's something to do with the new GEOS method for line offsets, so I'm tentatively assigning this to Alvaro...


Related issues

Related to QGIS Application - Bug report #10195: Offset line symbology added to polygon layer leads to crash Closed 2014-05-06

History

#1 Updated by Nyall Dawson over 7 years ago

  • Subject changed from Expection with offset polygon layer and composition to Exception with offset polygon layer and composition

#2 Updated by Alvaro Huarte over 7 years ago

Hi Nyall, this PR ( https://github.com/qgis/QGIS/pull/1437 ) attemps to fix this bug.
Best regards

#3 Updated by Martin Dobias over 7 years ago

Please test to see if the fix helps.

Alvaro, the "unknown error" message box indicates uncaught exception from GEOS. It would be good to have any calls to GEOS (e.g. for offset line or buffer for labeling) going through QgsGeometry class, which handles the exceptions.

#4 Updated by Alvaro Huarte over 7 years ago

Martin Dobias wrote:

Please test to see if the fix helps.

Alvaro, the "unknown error" message box indicates uncaught exception from GEOS. It would be good to have any calls to GEOS (e.g. for offset line or buffer for labeling) going through QgsGeometry class, which handles the exceptions.

Hi Martin, I agree with it, I will incluide the wrapper methods of GEOSOffsetCurve and GEOSBuffer in QgsGeometry class
Thank you very much

#5 Updated by Alvaro Huarte over 7 years ago

Alvaro Huarte wrote:

Martin Dobias wrote:

Please test to see if the fix helps.

Alvaro, the "unknown error" message box indicates uncaught exception from GEOS. It would be good to have any calls to GEOS (e.g. for offset line or buffer for labeling) going through QgsGeometry class, which handles the exceptions.

Hi Martin, I agree with it, I will incluide the wrapper methods of GEOSOffsetCurve and GEOSBuffer in QgsGeometry class
Thank you very much

Done!

https://github.com/qgis/QGIS/pull/1451

#6 Updated by Jürgen Fischer over 7 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

PR was merged in 9d8a8424

Also available in: Atom PDF