#280 closed defect (fixed)
QGIS crashes when measuring distances with another ellipsoid than the default one
Reported by: | 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 , 18 years ago
comment:2 by , 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 , 18 years ago
Priority: | major → critical |
---|
comment:4 by , 18 years ago
Must Fix for Release: | → Yes |
---|
comment:5 by , 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:7 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
My fault - the base srs was wrong for the data.
I can't reproduce it. Someone else can?
Also please could you add some more information: