Hi,
curiose i tried to compile grass on debian enabling "glw" supprt
to give a try to the module "r.gwflow"
the build go ahead without errors but ring to run "r.gwflow" i received a segfault
teing with gdm i have this log :
GRASS 6.5.svn (WGS84_33N):~ > gdb r.gwflow
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>\.\.\.
Reading symbols from /usr/local/grass-6.5.svn/bin/r.gwflow...done.
(gdb) run
Starting program: /usr/local/grass-6.5.svn/bin/r.gwflow
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bbab71 in G_recreate_command () at parser.c:2857
2857 if (opt->answer != '\0' && opt->answers[0] != NULL) {
(gdb)
(gdb)
Hello Massimo,
unfortunately i am not able to reproduce the segfault, because i do
not run a 64bit system. Does this error also occurs when you start
r.gwflow with parameters, so without gui generation?
Best regards
Soeren
2010/3/19 Massimo Di Stefano <massimodisasha@gmail.com>:
Hi,
curiose i tried to compile grass on debian enabling "glw" supprt
to give a try to the module "r.gwflow"
the build go ahead without errors but ring to run "r.gwflow" i received a segfault
teing with gdm i have this log :
GRASS 6.5.svn (WGS84_33N):~ > gdb r.gwflow
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>\.\.\.
Reading symbols from /usr/local/grass-6.5.svn/bin/r.gwflow...done.
(gdb) run
Starting program: /usr/local/grass-6.5.svn/bin/r.gwflow
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bbab71 in G_recreate_command () at parser.c:2857
2857 if (opt->answer != '\0' && opt->answers[0] != NULL) {
(gdb)
(gdb)
Il giorno 19/mar/2010, alle ore 21.27, Soeren Gebbert ha scritto:
Hello Massimo,
unfortunately i am not able to reproduce the segfault, because i do
not run a 64bit system. Does this error also occurs when you start
r.gwflow with parameters, so without gui generation?
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?
i have both 6.5 - 7.0 installed and i openend the wrong help file.
following the 6.5 help the command line examples works nice
and i'm able to visualize the data in paraview without any problems.
( the segfault affects only the gui )
thanks,
Massimo.
Il giorno 19/mar/2010, alle ore 22.44, Glynn Clements ha scritto:
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 :
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?
> 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
... is this statement incorrect?
First i thought my code is wrong, but now i think this is correct. The
reason for the segfault was in parser.c. I reproduced it with other
modules setting a default answer.
Because this appears to have nothing to do with r41496.
The segfault in parser.c only appeared in case a module set a default
answer. So IMHO this is related to the problem which was reported by
Massimo. Now r.gwflow works as expected.