[GRASS-dev] Re: [GRASS GIS] #455: d.what.rast segfault

2010-01-08 Thread GRASS GIS
#455: d.what.rast segfault
--+-
  Reporter:  hamish   |   Owner:  grass-dev@lists.osgeo.org
  Type:  defect   |  Status:  closed   
  Priority:  major|   Milestone:  6.4.0
 Component:  default  | Version:  unspecified  
Resolution:  fixed|Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Changes (by hamish):

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

Comment:

 appears to be fixed.

-- 
Ticket URL: 
GRASS GIS 
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] Re: [GRASS GIS] #455: d.what.rast segfault

2009-01-23 Thread GRASS GIS
#455: d.what.rast segfault
--+-
  Reporter:  hamish   |   Owner:  grass-dev@lists.osgeo.org
  Type:  defect   |  Status:  new  
  Priority:  major|   Milestone:  6.4.0
 Component:  default  | Version:  unspecified  
Resolution:   |Keywords:   
  Platform:  Unspecified  | Cpu:  Unspecified  
--+-
Comment (by hamish):

 Hi,

 this bug is probably related to incomplete #392 (backport
 G_is_c_null_value() to devbr6).


 It fails here:
 {{{
 #0  0xb7f0e72a in G_get_raster_cat (rast=0x80598f0, pcats=0x8051b68,
 data_type=2)
 at cats.c:673
 }}}

 which is:
 {{{
 if (!G_is_c_null_value(&i) && i < pcats->ncats) {
 if (pcats->labels[i] != NULL)
 return pcats->labels[i];
 return label;
 }
 }}}

 because ''i'' = -2147483648 and the pcats->labels[i] lookup fails.

 So either G_quant_get_cell_value() is setting ''i'' wrong, or
 G_is_c_null_value() is testing it wrong.

 stepping through in the debugger shows that G_quant_get_cell_value() does
 [lib/gis/quant.c:line 798]
 {{{
 if (NO_EXPLICIT_RULE)
 return NO_DATA;
 if (NO_EXPLICIT_RULE)
 return NO_DATA;
 }}}

 (huh? why twice?)


 earlier,
 #define NO_DATA (G_set_c_null_value (&tmp, 1), (CELL) tmp)


 and
 {{{
 GR6.5> r.info -t elev.sl.parm.scale
 datatype=DCELL
 }}}


 In this case I was clicking on non-NULL data:
 {{{
 D0/0: G_get_raster_cat(): val 131.987214 found i -2147483648
 }}}



 ?,
 Hamish

-- 
Ticket URL: 
GRASS GIS 
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev