[GRASS-dev] [GRASS-SVN] r60048 - grass/trunk/vector/v.in.db

Huidae Cho grass4u at gmail.com
Fri May 2 10:18:56 PDT 2014


More detail.. When this happens, Map is not fully initialized and following
Vect_* calls with Map can fail unexpectedly, which caused a segmentation
fault in this case.


On Fri, May 2, 2014 at 1:15 PM, Huidae Cho <grass4u at gmail.com> wrote:

> Segmentation fault when you do v.in.db ... output=a at other_mapset because
> Vect_open_new returns -1 with a warning, not a fatal error, "unable to
> create new ... is not the current mapset". I didn't check why it's
> returning -1 instead of throwing a fatal error in this case. I believe that
> this warning has to be a fatal error if no modules rely on -1 return.
>
> Huidae
>
>
> On Fri, May 2, 2014 at 12:59 PM, Martin Landa <landa.martin at gmail.com>wrote:
>
>> Hi,
>>
>> 2014-05-02 18:53 GMT+02:00  <svn_grass at osgeo.org>:
>>
>> > -    Vect_open_new(&Map, outvect->answer, with_z);
>> > +    if (Vect_open_new(&Map, outvect->answer, with_z) == -1)
>> > +       exit(EXIT_FAILURE);
>> > +
>>
>> please provide more info where it fails. Also note that Vect_open_new
>> calls G_fatal_error() so the most of modules don't check return code
>> of this function.
>>
>> Martin
>>
>> --
>> Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140502/96a41a48/attachment.html>


More information about the grass-dev mailing list