Bug report #7730

Forward transformation error with symbol levels and labeling causes QGIS to hang

Added by Anita Graser over 9 years ago. Updated over 9 years ago.

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 #:16638


Please find the complete mailing list conversation at: http://osgeo-org.1560.x6.nabble.com/Transformation-amp-labeling-bug-td5050007.html

Larry tracked the error to https://github.com/qgis/Quantum-GIS/blob/master/src/core/qgspallabeling.cpp#L1056 so far:

Hi Anita,

On Sun, Apr 28, 2013 at 1:27 PM, Anita Graser <[hidden email]> wrote:
Am 28.04.2013, 18:01 Uhr, schrieb Andre Joost <[hidden email]>:

 Am <a href="tel:27.04.2013%2016" value="+12704201316" target="_blank">27.04.2013 16:14, schrieb Anita Graser:

 I get nasty forward transformation errors with today's nightly when
 using a predefined road style and labels:

 forward transform of
 (12557.230023, 71897.228375)
 PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=aea +lat_1=55
 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +datum=NAD27 +units=us-ft
 Error: latitude or longitude exceeded limits

 (afterwards QGIS hangs)

 Data is Natural Earth's road shapefile in WGS84.

 The layer extent is:
 xMin,yMin -166.532;-55.1121 : xMax,yMax 178.372;71.1777

 so I don't know what coordinates are to be forward transformed in your error message. Has your road style and labelling any coordinate information?

 I'm using the "Primary road" style which comes with nightly by default. The style alone seems to work. Once I enable labeling using street "name", the forward transform error pops up.

I can confirm this on Mac. However, it doesn't happen when labeling is turned on, but when symbol levels are set (and labeling is on). Symbol levels and labels work individually, but if either is turned on when the other is on the error occurs and force quitting becomes the only option.

I get the following (note it is being on-the-fly transformed to UTM here):

Debug: src/core/qgspallabeling.cpp: 1305: (registerFeature) Ignoring feature 1893 due PAL exception: Geometry Type is unknown
 Debug: src/core/qgscoordinatetransform.cpp: 623: (transformCoords) Projection failed emitting invalid transform signal: forward transform of
(25075.946436, 81366.459079)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=utm +zone=13 +datum=WGS84 +units=m +no_defs
 Error: latitude or longitude exceeded limits

I've traced it to line 1057 in qgspallabeling.cpp [0]. Just guessing, but it looks like something is different between how the features are sent to QgsPalLayerSettings::registerFeature from QgsVectorLayer::drawRendererV2Levels as opposed to QgsVectorLayer::drawRendererV2, which works fine.

Please create a ticket if you have the time.

[0] https://github.com/qgis/Quantum-GIS/blob/master/src/core/qgspallabeling.cpp#L1056




Associated revisions

Revision 68314984
Added by Jürgen Fischer over 9 years ago

catch transformation exceptions in pal labeling (fixes #7730)


#1 Updated by Salvatore Larosa over 9 years ago

is this issue still true ?

I can't reproduce, just tested with Linux and Windows XP.

I used the "Primary road" style and enabled the label using the field "name", as mentioned in the mailing list conversation,
with OTF actived (EPSG:2964)

#2 Updated by Nathan Woodrow over 9 years ago

I can confirm this on Win 7.

  • Primary Road
  • Symbol Levels
  • Labels
  • OTF EPSG:2964
  • Zoom to full extents

#3 Updated by Salvatore Larosa over 9 years ago

Nathan Woodrow wrote:

I can confirm this on Win 7.

  • Primary Road
  • Symbol Levels
  • Labels
  • OTF EPSG:2964
  • Zoom to full extents

Confirmed here too, I forgot to enable Symbol levels.

#4 Updated by Jürgen Fischer over 9 years ago

Apparently caused by feature 8126 of ne_10m_roads, which has "Mystry can't be deleted?" in the attribute edited - might tell us something ;)

#5 Updated by Jürgen Fischer over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF