Bug report #1416

crash querying very small GRASS vector polygon

Added by Maciej Sieczka - almost 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:GRASS
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:worksforme
Crashes QGIS or corrupts data: Copied to github as #:11476

Description

amd64 Debian testing, QT 4.4.3, QGIS trunk r9668

I have a very small polygon in my GRASS vector map. If I try to query it with identify tool when
it's veray small on my screen (few pixels, hardly visible) QGIS crashes as below. No crash if I zoom close enough to see the polygon fill and then query.

Debug:

Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 189: (loadFromDb) load CRS from /usr/local/qgis/share/qgis/resources/srs.db where epsg is 4326
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1091: (debugPrint) ***SpatialRefSystem***
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1092: (debugPrint) * Valid : true
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1093: (debugPrint) * [[SrsId]] : 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1094: (debugPrint) * Proj4 : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs 
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1095: (debugPrint) * Desc. : WGS 84
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1106: (debugPrint) * Units : degrees
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 363: (createFromProj4) wholetext match on name failed, trying proj4string match
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 450: (getRecord) running query: select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 472: (getRecord) trying system srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 527: (getRecord) retrieved:  select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 368: (createFromProj4) proj4string match search for srsid returned srsid: 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 189: (loadFromDb) load CRS from /usr/local/qgis/share/qgis/resources/srs.db where srs_id is 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1091: (debugPrint) ***SpatialRefSystem***
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1092: (debugPrint) * Valid : true
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1093: (debugPrint) * [[SrsId]] : 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1094: (debugPrint) * Proj4 : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs 
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1095: (debugPrint) * Desc. : WGS 84
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1106: (debugPrint) * Units : degrees
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatetransform.cpp: 194: (initialise) Source/Dest CRS equal, shortcircuit is set.
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgsdistancearea.cpp: 156: (setEllipsoid) setEllipsoid: a=™, b=˜, 1/f=*
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 363: (createFromProj4) wholetext match on name failed, trying proj4string match
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 450: (getRecord) running query: select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 472: (getRecord) trying system srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 527: (getRecord) retrieved:  select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 368: (createFromProj4) proj4string match search for srsid returned srsid: 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 189: (loadFromDb) load CRS from /usr/local/qgis/share/qgis/resources/srs.db where srs_id is 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1091: (debugPrint) ***SpatialRefSystem***
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1092: (debugPrint) * Valid : true
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1093: (debugPrint) * [[SrsId]] : 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1094: (debugPrint) * Proj4 : +proj=longlat +ellps=WGS84 +no_defs 
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1095: (debugPrint) * Desc. : Unknown datum based upon the WGS 84 ellipsoid
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1106: (debugPrint) * Units : degrees
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatetransform.cpp: 109: (setDestCRS) entered.
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgsdistancearea.cpp: 156: (setEllipsoid) setEllipsoid: a=™, b=˜, 1/f=*
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 363: (createFromProj4) wholetext match on name failed, trying proj4string match
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 450: (getRecord) running query: select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 472: (getRecord) trying system srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 527: (getRecord) retrieved:  select * from tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 368: (createFromProj4) proj4string match search for srsid returned srsid: 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 189: (loadFromDb) load CRS from /usr/local/qgis/share/qgis/resources/srs.db where srs_id is 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1091: (debugPrint) ***SpatialRefSystem***
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1092: (debugPrint) * Valid : true
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1093: (debugPrint) * [[SrsId]] : 3132
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1094: (debugPrint) * Proj4 : +proj=longlat +ellps=WGS84 +no_defs 
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1095: (debugPrint) * Desc. : Unknown datum based upon the WGS 84 ellipsoid
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1106: (debugPrint) * Units : degrees
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatetransform.cpp: 109: (setDestCRS) entered.
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 189: (loadFromDb) load CRS from /usr/local/qgis/share/qgis/resources/srs.db where srs_id is 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1060: (openDb) path = /usr/local/qgis/share/qgis/resources/srs.db
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1091: (debugPrint) ***SpatialRefSystem***
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1092: (debugPrint) * Valid : true
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1093: (debugPrint) * [[SrsId]] : 3344
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1094: (debugPrint) * Proj4 : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs 
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1095: (debugPrint) * Desc. : WGS 84
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 1106: (debugPrint) * Units : degrees
Debug: /home/shoofi/src/straight/qgis-trunk/src/core/qgscoordinatereferencesystem.cpp: 719: (setMapUnits) Projection has angular units of degree
Debug: /home/shoofi/src/straight/qgis-trunk/src/providers/grass/qgsgrassprovider.cpp: 544: (fieldCount) return: 1
Debug: /home/shoofi/src/straight/qgis-trunk/src/providers/grass/qgsgrassprovider.cpp: 1160: (mapOutdated) entered.
Debug: /home/shoofi/src/straight/qgis-trunk/src/providers/grass/qgsgrassprovider.cpp: 1186: (attributesOutdated) entered.
Debug: /home/shoofi/src/straight/qgis-trunk/src/providers/grass/qgsgrassprovider.cpp: 420: (resetSelection) entered.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff02e55c710 (LWP 4808)]
0x00007ff01c7a688a in dig_alloc_points (points=0x0, num=1)
    at struct_alloc.c:237
237        alloced = points->alloc_points;
Current language:  auto; currently c

(gdb) bt
#0  0x00007ff01c7a688a in dig_alloc_points (points=0x0, num=1)
    at struct_alloc.c:237
#3905  0x00007ff01c9cea8b in Vect_copy_xyz_to_pnts (Points=0x0, x=0x7fff36695e10, 
    y=0x7fff36695e08, z=0x7fff36695e00, n=1) at line.c:118
#3906  0x00007ff01c9cd54d in find_cross (id=2, arg=0x7fff36695f34)
    at intersect.c:1095
#3907  0x00007ff01bd44962 in RTreeSearch (N=0x282bc70, R=0x7fff36695ef0, 
    shcb=0x7ff01c9cd2e5 <find_cross>, cbarg=0x7fff36695f34) at index.c:65
#3908  0x00007ff01c9cde42 in Vect_line_check_intersection (APoints=0x25949e0, 
    BPoints=0x27f1770, with_z=0) at intersect.c:1273
#3909  0x00007ff01c9dc922 in Vect_select_lines_by_polygon (Map=0x26a6d20, 
    Polygon=0x27f1770, nisles=0, Isles=0x0, type=4, List=0x28b21e0)
    at select.c:254
#3910  0x00007ff01c9dca3f in Vect_select_areas_by_polygon (Map=0x26a6d20, 
    Polygon=0x27f1770, nisles=0, Isles=0x0, List=0x281fbc0) at select.c:309
#3911  0x00007ff01d3b121c in [[QgsGrassProvider]]::select (this=0x2867dc0, 
    fetchAttributes=
        {{p = {static shared_null = {ref = {_q_value = 11685}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x7fff366961e0}, d = 0x7fff366961e0}}, rect=
      {xmin = 6.9531887103213781e-310, ymin = 6.9531887103229591e-310, xmax = 2.093279462441127e-316, ymax = 6.9531887103063585e-310}, fetchGeometry=true, 
    useIntersect=true)
    at /home/shoofi/src/straight/qgis-trunk/src/providers/grass/qgsgrassprovider.cpp:496
#3912  0x00007ff02de85947 in [[QgsVectorLayer]]::select (this=0x2846050, attributes=
        {{p = {static shared_null = {ref = {_q_value = 11685}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x7fff36696590}, d = 0x7fff36696590}}, rect=
      {xmin = 6.9531887103680179e-310, ymin = 6.9531887103695989e-310, xmax = 2.0864313173372507e-316, ymax = 1.9466186446145114e-321}, fetchGeometries=true, 
    useIntersect=true)
    at /home/shoofi/src/straight/qgis-trunk/src/core/qgsvectorlayer.cpp:1184
#3913  0x0000000000562833 in [[QgsMapToolIdentify]]::identifyVectorLayer (
    this=0x19d1dd0, point=@0x7fff36696ab0)
    at /home/shoofi/src/straight/qgis-trunk/src/app/qgsmaptoolidentify.cpp:270
#10 0x0000000000565c31 in [[QgsMapToolIdentify]]::canvasReleaseEvent (
    this=0x19d1dd0, e=0x7fff36697520)
    at /home/shoofi/src/straight/qgis-trunk/src/app/qgsmaptoolidentify.cpp:104
#3914 0x00007ff02e238253 in [[QgsMapCanvas]]::mouseReleaseEvent (this=0x1a149b0, 
    e=0x7fff36697520)
    at /home/shoofi/src/straight/qgis-trunk/src/gui/qgsmapcanvas.cpp:774
#3915 0x00007ff02cf9a139 in QWidget::event () from /usr/lib/libQtGui.so.4
#3916 0x00007ff02d49617b in QGraphicsView::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#3917 0x00007ff02da22658 in QCoreApplicationPrivate::sendThroughObjectEventFilters---Type <return> to continue, or q <return> to quit---
 () from /usr/lib/libQtCore.so.4
#3918 0x00007ff02cf47a2c in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#3919 0x00007ff02cf5004a in QApplication::notify () from /usr/lib/libQtGui.so.4
#3920 0x00007ff02ddf362e in [[QgsApplication]]::notify (this=0x7fff36698400, 
    receiver=0x198f970, event=0x7fff36697520)
    at /home/shoofi/src/straight/qgis-trunk/src/core/qgsapplication.cpp:78
#3921 0x00007ff02da23381 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#3922 0x00007ff02cf4f3e8 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#3923 0x00007ff02cfb3909 in ?? () from /usr/lib/libQtGui.so.4
#3924 0x00007ff02cfb27ff in QApplication::x11ProcessEvent ()
   from /usr/lib/libQtGui.so.4
#3925 0x00007ff02cfd9c84 in ?? () from /usr/lib/libQtGui.so.4
#3926 0x00007ff02988678b in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#3927 0x00007ff029889f5d in ?? () from /usr/lib/libglib-2.0.so.0
#3928 0x00007ff02988a11b in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#3929 0x00007ff02da4b70f in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#3930 0x00007ff02cfd944f in ?? () from /usr/lib/libQtGui.so.4
#3931 0x00007ff02da21ca2 in QEventLoop::processEvents ()
   from /usr/lib/libQtCore.so.4
#3932 0x00007ff02da21e2d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#3933 0x00007ff02da242dd in QCoreApplication::exec ()
   from /usr/lib/libQtCore.so.4
#3934 0x00000000004b5599 in main (argc=1, argv=0x7fff36698af8)
    at /home/shoofi/src/straight/qgis-trunk/src/app/main.cpp:683

History

#1 Updated by Maciej Sieczka - almost 16 years ago

Experiened today again with GRASS line vector as well. QGIS SVN trunk .

#2 Updated by Paolo Cavallini over 15 years ago

Still true? If so, please provide sample data to test. Thanks.

#3 Updated by Paolo Cavallini over 15 years ago

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

without sample data, the bug is impossible to reproduce. Please reopen it if appropriate, attaching sample data causing the crash

Also available in: Atom PDF