Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#280 closed defect (fixed)

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

Reported by: wolfgang.qual@… Owned by: wonder
Priority: critical: causes crash or data corruption Milestone:
Component: MapCanvas Version: 0.8
Keywords: crash measure-tool Cc:
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

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.

Change History (8)

comment:1 by wonder, 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?

comment:2 by anonymous, 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?

comment:3 by rblazek, 18 years ago

Priority: majorcritical

comment:4 by gsherman, 18 years ago

Must Fix for Release: Yes

comment:5 by g_j_m, 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:

#9  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
#11 0xb7ca6ec3 in QgsDistanceArea::measureLine (this=0x820f810,
    p1=@0xbfffe430, p2=@0xbfffe420) at qgsdistancearea.cpp:297
#12 0xb7e0e89a in QgsMeasure::mouseMove (this=0x81b0390, point=@0xbfffe4d0)
    at qgsmeasure.cpp:184

comment:6 by g_j_m, 18 years ago

Fixed in svn r6083. But the lengths and areas given look wrong :(

comment:7 by g_j_m, 18 years ago

Resolution: fixed
Status: newclosed

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

comment:8 by (none), 15 years ago

Milestone: Version 0.8

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.