[GRASS-dev] Re: [GRASS GIS] #474: r.quantile: segfaults with percentile=100

GRASS GIS trac at osgeo.org
Tue Feb 10 11:15:29 EST 2009


#474: r.quantile: segfaults with percentile=100
---------------------+------------------------------------------------------
  Reporter:  hamish  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect  |      Status:  new                      
  Priority:  major   |   Milestone:  6.4.0                    
 Component:  Raster  |     Version:  svn-develbranch6         
Resolution:          |    Keywords:  r.quantile               
  Platform:  Linux   |         Cpu:  x86-32                   
---------------------+------------------------------------------------------
Comment (by glynn):

 Replying to [ticket:474 hamish]:

 > presumably values[b->base + i0] is just outside the array.

 Actually, it's way outside the array, as the last bin never gets
 initialised.

 Hopefully fixed in r35846.

 This also fixes a bug where the quantile corresponds to the last value in
 the bin (e.g. if there is only one value in the bin). The interpolation
 will use the first value from the bin for the next quantile, which could
 be way off.

 Ideally, it should retain the values from the following bin in case one is
 needed for interpolation. In practice, this won't make much difference.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/474#comment:1>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list