Bug report #280

QGIS crashes when measuring distances with another ellipsoid than the default one

Added by wolfgang-qual-gmx-net - about 18 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:Martin Dobias
Category:Map Canvas
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10339

Description

When changing the default ellipsoid for the measuring-tool (with the default one, the results of the measurement are wrong) to another one (e.g. bessel), QGIS crashes with the first click of the measurement.
I am using 0.8.0 prev. 2, on Debian sarge.

History

#1 Updated by Martin Dobias about 18 years ago

I can't reproduce it. Someone else can?

Also please could you add some more information:
- any selected ellipsoid will fail except WGS84?
- what tool fails - measuring of distances or areas or both?
- what's the spatial reference system of the project?

#2 Updated by anonymous - about 18 years ago

Can not reproduce on Ubuntu Edgy (QGIS from SVN).

Reporter: could You, please, fetch fresh version from SVN and then test with it?

#3 Updated by Gavin Macaulay - almost 18 years ago

I can reproduce it. The crash is caused by a throw in qgscoordinatetransform.cpp https://svn.qgis.org/trac/browser/trunk/qgis/src/gui/qgscoordinatetransform.cpp#L479), which isn't caught. Using the latest version from svn.

This is from loading a shapefile with an srs of +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs from postgres, choosing the measure line tool, and qgis exits with the first click of the mouse on the canvas. The ellipsoid for the length calculation is walbeck. Output on the console is:

Warning: [[QgsSpatialRefSys]]::getRecord failed :  select * from tbl_srs where parameters='+proj=longlat +ellps=walbeck +no_defs'
Warning: [[QgsSpatialRefSys]]::findMatchingProj -------> no match found in user db
Warning: [[QgsSpatialRefSys]]::getRecord failed :  select * from tbl_srs where parameters='+proj=longlat +ellps=walbeck +no_defs'
Warning: [[QgsSpatialRefSys]]::findMatchingProj -------> no match found in user db
Warning: QPainter::begin: Painter already active
Warning: [[QgsSpatialRefSys]]::getRecord failed :  select * from tbl_srs where parameters='+proj=longlat +ellps=walbeck +no_defs'
Warning: [[QgsSpatialRefSys]]::findMatchingProj -------> no match found in user db
Warning: Throwing exception qgscoordinatetransform.cpp
Warning: Throwing exception qgscoordinatetransform.cppÌ
terminate called after throwing an instance of 'QgsCsException'
  what():  Failed forward transform of
(47310.6, 104558)
with error: geocentric transformation missing z or ellps

Abort

relevant bit from the stacktrace is:

#3913  0xb6423ab2 in +cxa_throw () from /usr/lib/libstdc++.so.6
#10 0xb7daefa0 in [[QgsCoordinateTransform]]::transform (this=0x8174330, thePoint=
      {m_x = 2716238.255536627, m_y = 6044930.7005962525},
    direction=QgsCoordinateTransform::FORWARD)
    at qgscoordinatetransform.cpp:205
#3914 0xb7ca6ec3 in [[QgsDistanceArea]]::measureLine (this=0x820f810,
    p1=@0xbfffe430, p2=@0xbfffe420) at qgsdistancearea.cpp:297
#3915 0xb7e0e89a in [[QgsMeasure]]::mouseMove (this=0x81b0390, point=@0xbfffe4d0)
    at qgsmeasure.cpp:184

#4 Updated by Gavin Macaulay - almost 18 years ago

Fixed in svn 8bbd8062 (SVN r6084). But the lengths and areas given look wrong :(

#5 Updated by Gavin Macaulay - almost 18 years ago

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

My fault - the base srs was wrong for the data.

#6 Updated by Anonymous about 15 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF