[GRASS-dev] r.gwflow

Soeren Gebbert soerengebbert at googlemail.com
Fri Mar 19 18:08:07 EDT 2010


Hello,
i can reproduce this error with grass7, latest svn version.

But i am completely lost why this happens.
parser.c fails after the following option is defined in r.gflow main.c:

param.type = G_define_option();
param.type->key = "type";
param.type->type = TYPE_STRING;
param.type->required = NO;
param.type->answer = "confined"; <----- this parameter is the reason
for the segfault
param.type->options = "confined,unconfined";
param.type->description = _("The type of groundwater flow");

param.type->answer is corrupted and this results the segfault in
G_recreate_command():

Starting program:
/home/soeren/src/grass7.0/grass_trunk/dist.i686-pc-linux-gnu/bin/r.gwflow
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb7f82956 in G_recreate_command () at parser.c:634
635             if (opt->answer && opt->answers[0]) {
(gdb) bt
#0  0xb7f82956 in G_recreate_command () at parser.c:634
#1  0xb7f82fd7 in module_gui_wx () at parser.c:784
#2  0xb7f82276 in G_parser (argc=1, argv=0xbfffea94) at parser.c:422
#3  0x080498f2 in main (argc=1, argv=0xbfffea94) at main.c:260


Why does this happen. I thought using the answer filed in an options
defines the default value of this option?

Any help appreciated.

Soeren


2010/3/19 Glynn Clements <glynn at gclements.plus.com>:
>
> Massimo Di Stefano wrote:
>
>> it's my first attempt to use r.gwflow
>> so i have to read it's manual page
>> with more carefully.
>>
>> i tried a fast try following the help page, but seems i did something wrong, see the logs :
>>
>> http://www.geofemengineering.it/data/r_gwflow.txt
>
> Says:
>
>> Sorry, <vx> is not a valid parameter
>> Sorry, <vy> is not a valid parameter
>> Sorry, <budget> is not a valid parameter
>
> These options are only present in 7.0, not in 6.5.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>


More information about the grass-dev mailing list