Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1523 closed defect (fixed)

v.select segfaults with atype and btype area

Reported by: pertusus Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: Cc:
CPU: x86-64 Platform: Linux

Description

If I do v.mkgrid map=continent_whole_grid grid=2,2 v.mkgrid map=other_grid grid=4,4

v.select ainput=other_grid atype=area binput=continent_whole_grid btype=area output=result operator=overlap

I get a segfault. If one of atype or btype is not area, no segfault.

Here is the backtrace (gdb) run Starting program: /usr/local/grass-7.0.svn/bin/v.select ainput=other_grid atype=area binput=continent_whole_grid btype=area output=result operator=overlap [Thread debugging using libthread_db enabled] Processing areas...

18%

Program received signal SIGSEGV, Segmentation fault. 0x000000000040393f in select_lines (aIn=0x7fffffffcad0, atype=16, afield=1,

bIn=<value optimized out>, btype=64, bfield=1, cat_flag=0, operator=8, relate=0x0, ALines=0x6aa1a0) at select.c:294

294 if (line_overlap_area(aIn, aline,

(gdb) bt #0 0x000000000040393f in select_lines (aIn=0x7fffffffcad0, atype=16,

afield=1, bIn=<value optimized out>, btype=64, bfield=1, cat_flag=0, operator=8, relate=0x0, ALines=0x6aa1a0) at select.c:294

#1 0x0000000000402f0e in main (argc=<value optimized out>,

argv=<value optimized out>) at main.c:115

I attach a tar that can be used to reproduce.

Attachments (1)

grass_select_segfault_bug.tar.gz (1.0 KB) - added by pertusus 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by pertusus

comment:1 Changed 8 years ago by mmetz

Please try trunk r49952.

Markus M

comment:2 Changed 8 years ago by pertusus

Resolution: fixed
Status: newclosed

comment:3 in reply to:  2 Changed 8 years ago by mmetz

BTW, thanks for the detailed description and the test case! That made it easy to locate and fix the bug.

Markus M

comment:4 Changed 8 years ago by pertusus

That's the least I can do, given that I use a lot grass and don't contribute much...

Note: See TracTickets for help on using tickets.