[GRASS-dev] g.region -g crashes in a latlon location

Yann Chemin yann.chemin at gmail.com
Mon Jul 21 05:22:21 EDT 2008


I also have g.region -p crashing for about 2 weeks, cannot run tcltk
GUI and wxpython GUI because of that.

it does not say anything, on the segfault sentence...


2008/7/21 Maciej Sieczka <tutey at o2.pl>:
> Glynn Clements pisze:
>>
>> Maciej Sieczka wrote:
>
>>> I have just noticed that g.region -g or -p crashes in a latlon
>>> location. Example:
>
>>> 0x00007f33d130f69e in sincos (val=0.90594848802138783,
>>> sin_val=0x7fffda923030, cos_val=0x7fffda923028) at GDapi.c:6265 6265
>>>  *sin_val = sin(val); (gdb) bt #0  0x00007f33d130f69e in
>>> sincos (val=0.90594848802138783, sin_val=0x7fffda923030,
>>> cos_val=0x7fffda923028) at GDapi.c:6265 #1  0x00007f33d130f6a3 in
>>> sincos (val=0.90594848802138783, sin_val=0x7fffda923060,
>>> cos_val=0x7fffda923058) at GDapi.c:6265 #2  0x00007f33d130f6a3 in
>>> sincos (val=0.90594848802138783, sin_val=0x7fffda923090,
>>> cos_val=0x7fffda923088) at GDapi.c:6265
>
>>> (The whole backtrace is all very long.)
>
>> When you say "very long", is it actually finite? Or did you give up before
>> reaching the end?
>
> The latter. After reaching line #5473 in gdb I gave up.
>
>> Because the line which the debugger shows:
>
>>> 6265        *sin_val = sin(val);
>
>> doesn't appear to be a recursive call, but the backtrace indicates an
>>  infinite "direct" recursion (i.e. the function calls itself with exactly
>> the same arguments).
>>
>> My guess is that the saved frame pointer is actually pointing to the
>> current frame, i.e. a linked list where "p->next == p".
>>
>> In any case, this doesn't help identify the real problem. Can you
>> step through the g.region code from the beginning and find where in
>> g.region (or the GRASS libraries) that it's going out of control?
>
> If you can tell how to do it I'd try.
>
> Can you reproduce the crash? Anybody else?
>
> Maciek
>
> P.S.
>
> Here's GRASS debug output. Maybe it helps some:
>
> D2/10: G__read_Cell_head
> D2/10: G__read_Cell_head_array
> D3/10: region item: proj:       3
> D3/10: region item: zone:       0
> D3/10: region item: north:      51N
> D3/10: region item: south:      50N
> D3/10: region item: east:       16E
> D3/10: region item: west:       15E
> D3/10: region item: cols:       1
> D3/10: region item: rows:       1
> D3/10: region item: e-w resol:  1
> D3/10: region item: n-s resol:  1
> D3/10: region item: top:        1
> D3/10: region item: bottom:     0
> D3/10: region item: cols3:      1
> D3/10: region item: rows3:      1
> D3/10: region item: depths:     1
> D3/10: region item: e-w resol3: 1
> D3/10: region item: n-s resol3: 1
> D3/10: region item: t-b resol:  1
> D3/10: G_adjust_Cell_head: epsilon_ns: 0.001, epsilon_ew: 1e-06
> D2/10: G__read_Cell_head
> D2/10: G__read_Cell_head_array
> D3/10: region item: proj:       3
> D3/10: region item: zone:       0
> D3/10: region item: north:      52:00:01.5N
> D3/10: region item: south:      50:59:58.5N
> D3/10: region item: east:       17:00:01.5E
> D3/10: region item: west:       14:59:58.5E
> D3/10: region item: cols:       2401
> D3/10: region item: rows:       1201
> D3/10: region item: e-w resol:  0:00:03
> D3/10: region item: n-s resol:  0:00:03
> D3/10: region item: top:        1
> D3/10: region item: bottom:     0
> D3/10: region item: cols3:      2401
> D3/10: region item: rows3:      1201
> D3/10: region item: depths:     1
> D3/10: region item: e-w resol3: 0:00:03
> D3/10: region item: n-s resol3: 0:00:03
> D3/10: region item: t-b resol:  1
> D3/10: G_adjust_Cell_head: epsilon_ns: 8.32639e-07, epsilon_ew: 1e-06
> D3/10: G_adjust_Cell_head: epsilon_ns: 8.32639e-07, epsilon_ew: 1e-06
> Segmentation fault
>
> --
> Maciej Sieczka
> www.sieczka.org
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>



-- 
Yann Chemin
International Rice Research Institute
Office: http://www.irri.org/gis
Perso: http://www.freewebs.com/ychemin


More information about the grass-dev mailing list