[QGIS-trac] Re: [Quantum GIS] #1149: right clicking on attribute table of point file seg faults

Quantum GIS qgis at qgis.org
Fri Jul 11 13:55:52 EDT 2008


#1149: right clicking on attribute table of point file seg faults
--------------------------------------------------------------+-------------
        Reporter:  arkygeek                                   |         Owner:  nobody                  
            Type:  defect                                     |        Status:  closed                  
        Priority:  critical: causes crash or data corruption  |     Milestone:  Version 0.11.0          
       Component:  OGR Layer support                          |       Version:  HEAD                    
      Resolution:  fixed                                      |      Keywords:  postgis select shapefile
Platform_version:                                             |      Platform:  Debian                  
        Must_fix:  Yes                                        |   Status_info:  0                       
--------------------------------------------------------------+-------------
Changes (by timlinux):

  * status:  new => closed
  * resolution:  => fixed

Old description:

> when selectin multiple features from a postgis layer and right clicking
> to save to shapefile, immediate seg fault.
>
> arkygeek at arkygeek-desktop:~/apps/qgis/bin$ ./qgis
> Debug:
> **********************************
> Debug: QgsApplication state:
> Debug: Prefix       :/home/arkygeek/apps/qgis
> Debug: Plugin Path  :/home/arkygeek/apps/qgis/lib/qgis
> Debug: PkgData Path :/home/arkygeek/apps/qgis/share/qgis
> Debug: Theme Path   :/home/arkygeek/apps/qgis/share/qgis/themes/default/
> Debug: User DB Path
> :/home/arkygeek/apps/qgis/share/qgis/resources/qgis.db
> Debug: **********************************
>
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Debug:
> **********************************
> Debug: QgsApplication state:
> Debug: Prefix       :/home/arkygeek/apps/qgis
> Debug: Plugin Path  :/home/arkygeek/apps/qgis/lib/qgis
> Debug: PkgData Path :/home/arkygeek/apps/qgis/share/qgis
> Debug: Theme Path   :/home/arkygeek/apps/qgis/share/qgis/themes/default/
> Debug: User DB Path
> :/home/arkygeek/apps/qgis/share/qgis/resources/qgis.db
> Debug: **********************************
>
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libcopyrightlabelplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libdelimitedtextplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libdelimitedtextprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgeorefplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgpsimporterplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgpxprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgrassplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgrassprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libgridmakerplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libmemoryprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libnortharrowplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libogrprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libpggeoprocessingplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libpostgresprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libquickprintplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libscalebarplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libspitplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libwfsplugin.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libwfsprovider.so
> Loaded /home/arkygeek/apps/qgis/lib/qgis/libwmsprovider.so
> Debug: current properties:
> Debug: name: properties
> Debug:  key: <GRASS>  subkey: <GRASS>
> Debug:          name: GRASS
> Debug:                  key: <WorkingLocation>  value: shuna
> Debug:                  key: <WorkingGisdbase>  value:
> /home/arkygeek/GRASSDATA
> Debug:                  key: <WorkingMapset>  value: shuna
> Debug:  key: <Gui>  subkey: <Gui>
> Debug:          name: Gui
> Debug:                  key: <SelectionColorBluePart>  value: 0
> Debug:                  key: <CanvasColorGreenPart>  value: 255
> Debug:                  key: <CanvasColorRedPart>  value: 255
> Debug:                  key: <SelectionColorRedPart>  value: 255
> Debug:                  key: <SelectionColorGreenPart>  value: 255
> Debug:                  key: <CanvasColorBluePart>  value: 255
> Debug:  key: <PositionPrecision>  subkey: <PositionPrecision>
> Debug:          name: PositionPrecision
> Debug:                  key: <DecimalPlaces>  value: 2
> Debug:                  key: <Automatic>  value: true
> Debug: /home/arkygeek/devel/qgis_unstable/src/core/qgsproject.cpp : 558
> unable to find title element
>
> Warning: QFSFileEngine::open: No file name specified
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> Warning: QFSFileEngine::open: No file name specified
> Warning: No valid projection. Unable to set map units.
> Warning: No valid projection. Unable to set map units.
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2221001")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2020012")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2221017")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2323009")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2021030")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2121065")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2120049")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2321002")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2021039")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --accepting rule at line 75 ("2321003")
> --accepting rule at line 81 (" ")
> --accepting rule at line 59 ("OR")
> --accepting rule at line 81 (" ")
> --accepting rule at line 79 ("siteno")
> --accepting rule at line 61 ("=")
> --(end of buffer or a NUL)
> --accepting rule at line 75 ("2021013")
> --(end of buffer or a NUL)
> --EOF (start condition 0)
> Segmentation fault

New description:

 when selectin multiple features from a postgis layer and right clicking to
 save to shapefile, immediate seg fault.

 {{{
 arkygeek at arkygeek-desktop:~/apps/qgis/bin$ ./qgis
 Debug:
 **********************************
 Debug: QgsApplication state:
 Debug: Prefix       :/home/arkygeek/apps/qgis
 Debug: Plugin Path  :/home/arkygeek/apps/qgis/lib/qgis
 Debug: PkgData Path :/home/arkygeek/apps/qgis/share/qgis
 Debug: Theme Path   :/home/arkygeek/apps/qgis/share/qgis/themes/default/
 Debug: User DB Path :/home/arkygeek/apps/qgis/share/qgis/resources/qgis.db
 Debug: **********************************

 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Debug:
 **********************************
 Debug: QgsApplication state:
 Debug: Prefix       :/home/arkygeek/apps/qgis
 Debug: Plugin Path  :/home/arkygeek/apps/qgis/lib/qgis
 Debug: PkgData Path :/home/arkygeek/apps/qgis/share/qgis
 Debug: Theme Path   :/home/arkygeek/apps/qgis/share/qgis/themes/default/
 Debug: User DB Path :/home/arkygeek/apps/qgis/share/qgis/resources/qgis.db
 Debug: **********************************

 Loaded /home/arkygeek/apps/qgis/lib/qgis/libcopyrightlabelplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libdelimitedtextplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libdelimitedtextprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgeorefplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgpsimporterplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgpxprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgrassplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgrassprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libgridmakerplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libmemoryprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libnortharrowplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libogrprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libpggeoprocessingplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libpostgresprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libquickprintplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libscalebarplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libspitplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libwfsplugin.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libwfsprovider.so
 Loaded /home/arkygeek/apps/qgis/lib/qgis/libwmsprovider.so
 Debug: current properties:
 Debug: name: properties
 Debug:  key: <GRASS>  subkey: <GRASS>
 Debug:          name: GRASS
 Debug:                  key: <WorkingLocation>  value: shuna
 Debug:                  key: <WorkingGisdbase>  value:
 /home/arkygeek/GRASSDATA
 Debug:                  key: <WorkingMapset>  value: shuna
 Debug:  key: <Gui>  subkey: <Gui>
 Debug:          name: Gui
 Debug:                  key: <SelectionColorBluePart>  value: 0
 Debug:                  key: <CanvasColorGreenPart>  value: 255
 Debug:                  key: <CanvasColorRedPart>  value: 255
 Debug:                  key: <SelectionColorRedPart>  value: 255
 Debug:                  key: <SelectionColorGreenPart>  value: 255
 Debug:                  key: <CanvasColorBluePart>  value: 255
 Debug:  key: <PositionPrecision>  subkey: <PositionPrecision>
 Debug:          name: PositionPrecision
 Debug:                  key: <DecimalPlaces>  value: 2
 Debug:                  key: <Automatic>  value: true
 Debug: /home/arkygeek/devel/qgis_unstable/src/core/qgsproject.cpp : 558
 unable to find title element

 Warning: QFSFileEngine::open: No file name specified
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.
 Warning: QFSFileEngine::open: No file name specified
 Warning: No valid projection. Unable to set map units.
 Warning: No valid projection. Unable to set map units.

 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2221001")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2020012")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2221017")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2323009")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2021030")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2121065")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2120049")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2321002")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2021039")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --accepting rule at line 75 ("2321003")
 --accepting rule at line 81 (" ")
 --accepting rule at line 59 ("OR")
 --accepting rule at line 81 (" ")
 --accepting rule at line 79 ("siteno")
 --accepting rule at line 61 ("=")
 --(end of buffer or a NUL)
 --accepting rule at line 75 ("2021013")
 --(end of buffer or a NUL)
 --EOF (start condition 0)
 Segmentation fault
 }}}

Comment:

 Fix with r8754.. At times the current row can be returned as -1 which will
 cause a crash if you try to fetch its display role. The fix checks for
 invalid row numbers and skips fetching data for them if this is the case.
 May result in edge cases where user clicks and attribute actions are not
 invoked.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1149#comment:6>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list