Bug report #262

Projectin transformations on fly still crash QGIS

Added by anonymous - over 17 years ago. Updated over 14 years ago.

Assignee:Gary Sherman
Category:Projection Support
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 #:10321


I loaded simple shapefile with coordinate system r1 and started to play with projection changing. At third projection it crashed :) Unfortunately crashes on projection changes are very often.
I can add more fault examples, if you need such :)

r1:+proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=WGS84 +units=m +no_defs


Selection sql : select parameters from tbl_srs where srs_id = 2473
Item selected : Lisbon
Item selected full string : +proj=longlat +ellps=intl +no_defs
[[SpatialRefSys]]/ProjectSRSProj4String: +proj=longlat +ellps=intl +no_defs
 [[QgsProjectionSelector]]::getCurrentProj4String :  mySrsId = 2473
 [[QgsProjectionSelector]]::getCurrentProj4String :  USER_PROJECTION_START_ID = 100000
[[QgsProjectionSelector]]::getCurrentProj4String db = /usr/local/share/qgis/resources/srs.db
Selection sql : select parameters from tbl_srs where srs_id = 2473
Item selected : Lisbon
Item selected full string : +proj=longlat +ellps=intl +no_defs
Debug: qgsspatialrefsys.cpp: 408: (createFromSrsId) [[QgsSpatialRefSys]]::createFromSrsId
Debug: qgsspatialrefsys.cpp: 1285: (openDb) [[QgsSpatialRefSys]]::openDb path = /usr/local/share/
Debug: qgsspatialrefsys.cpp: 906: (setMapUnits) Projection has angular units of degree
Setting map units to 2
Debug: qgsscalecalculator.cpp: 114: (calculateGeographicDistance) Distance across map extent
(m): 1.16284e+10
Debug: qgsscalecalculator.cpp: 70: (calculate) Using conversionFactor of 39.3701
Debug: qgsmaprender.cpp: 184: (render) ========== Rendering ==========
Debug: qgsmaprender.cpp: 200: (render) Starting to render layer stack.
Debug: qgsmaprender.cpp: 210: (render) At layer item 'krasta_linija_poly20060908234320269'
Debug: qgsmaprender.cpp: 218: (render) If there is a QPaintEngine error here, it is caused by
 an emit call
Debug: qgsmaplayer.cpp: 127: (name) [[QgsMapLayer]]::name: returning name 'krasta_linija_poly
Debug: qgsmaprender.cpp: 231: (render) Rendering layer krasta_linija_poly
Debug: qgsmaprender.cpp: 232: (render),   Layer minscale : 0
Debug: qgsmaprender.cpp: 233: (render),   Layer maxscale : 0
Debug: qgsmaprender.cpp: 235: (render),   Scale dep. visibility enabled? : 0
Debug: qgsmaprender.cpp: 236: (render)   Input extent: 588123.5256602407898754,6360201.563419
8477491736 : 654035.8441072874702513,6418725.7058217935264111
Debug: qgsmaplayer.cpp: 561: (coordinateTransform) Maplayer asked for coordinateTransform whi
ch is....
Debug: qgsmaplayer.cpp: 568: (coordinateTransform) valid
Debug: qgscoordinatetransform.cpp: 336: (transformBoundingBox) Entering transformBoundingBox.
Debug: qgscoordinatetransform.cpp: 383: (transformBoundingBox) Projected extent: 25.465525428
0335228,57.3593244591122442 : 26.5979268904583002,57.9023568248321681
Debug: qgsmaprender.cpp: 239: (render)   Transformed extent: 25.4655254280335228,57.359324459
1122442 : 26.5979268904583002,57.9023568248321681
Debug: qgsmaplayer.cpp: 520: (connectNotify) [[QgsMapLayer]] connected to 2drawingProgress(int,in
Debug: qgsmaplayer.cpp: 598: (projectExtent) Getting extent of canvas in layers CS. Canvas is
  = 1632007.9092671519611031,1161399.9868973668199033 : 1739450.5885653679724783,1238356.1759
Debug: qgscoordinatetransform.cpp: 461: (transformCoords) Projection failed emitting invalid
transform signal: Neveiksmīgs inverse trasnform from
(1.63201e+06, 1.1614e+06)
with error: geocentric transformation missing z or ellps

Warning: [[QgsMapLayer]]::invalidTransformInput() called
Warning: Throwing exception qgscoordinatetransform.cppǐ
Warning: Throwing exception qgscoordinatetransform.cppË
Warning: Throwing exception qgscoordinatetransform.cppß
Warning: Transform error caught in qgsmaplayer.cpp, line 633
Debug: qgsogrprovider.cpp: 607: (select) Selection rectangle is:  = -179769313486231570814527                    423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382                    464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133                    942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124                    858368.0000000000000000,-17976931348623157081452742373170435679807056752584499659891747680315                    726078002853876058955863276687817154045895351438246423432132688946418276846754670353751698604                    991057655128207624549009038932894407586850845513394230458323690322294816580855933212334827479                    7826204144723168738177180919299881250404026184124858368.0000000000000000 : 179769313486231570                    814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953                    514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508                    455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026                    184124858368.0000000000000000,179769313486231570814527423731704356798070567525844996598917476                    803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516                    986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348                    274797826204144723168738177180919299881250404026184124858368.0000000000000000
Warning: Setting spatial filter failed!
qgis: qgsogrprovider.cpp:638: virtual void [[QgsOgrProvider]]::select(QgsRect*, bool): Assertion                     @result==0' failed.

qgis_latvia.tar.gz - Simplified border of Latvia as shapefile (made w QGIS) (1.8 KB) anonymous -, 2006-11-06 08:50 AM


#1 Updated by magnus-homann-se - over 17 years ago

This is probably due to the fact that the selection rectangle is very big, and that
it somehow fails to set it and that 'filter' is set to NULL in

void QgsOgrProvider::select(QgsRect *rect, bool useIntersect)

Is there a way to reproduce this issue?

#2 Updated by anonymous - over 17 years ago

I created new shapefile and started top play with proj transformations (clicking on random projections till QGIS segfaults). No mater how insane those projection transformations could be, QGIS should NOT segfault. Error message, refusal to perform transformation etc. is OK, but not segfault.

To reproduce crash, load attached shapefile, enable projection changing on fly and choose one of these projections: br
QGIS SRSID: 175 br
QGIS SRSID: 937 br

#3 Updated by Gavin Macaulay - over 17 years ago

Fix in 68871e4b (SVN r6077) to prevent qgis crashing in this situation. The real problem is why are those projections listed above considered invalid by geos?

#4 Updated by Martin Dobias over 17 years ago

Probably another roboustness problem with GEOS. I guess this happens due the BIG coordinate values that may cause problems when calculating with floating point numbers.

However the main problem with QGIS crashing is solved. Can we close this?

#5 Updated by Gavin Macaulay - over 17 years ago

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

Yes, we can close it. The original crash problem no longer happens.

Geos, when given the prokections listed above, considers them to be invalid, even be it's asked to do any transformations.

#6 Updated by Anonymous over 14 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF