Opened 11 years ago

Closed 10 years ago

#1795 closed defect (fixed)

segmentation fault in v.distance db_describe_table

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

Description

For a very simple case v.distance segfaults. It is strange, it may be that my setup has some issues, but I have no obvious idea.

The backtrace is:

gdb --args v.distance from=test_point to=test_bas column=cat_basin to_column=cat upload=to_attr
....
Program received signal SIGSEGV, Segmentation fault.
db_describe_table (driver=0x0, name=0x7fffffffb130, table=0x7fffffffb148) at c_desc_table.c:33
33          db__set_protocol_fds(driver->send, driver->recv);
(gdb) bt
#0  db_describe_table (driver=0x0, name=0x7fffffffb130, table=0x7fffffffb148) at c_desc_table.c:33
#1  0x00007ffff7b98a8c in db_column_sqltype (driver=<value optimized out>, tab=0x65fd40 "test_point", col=0x61b080 "cat_basin") at column.c:63
#2  0x00007ffff7b98b29 in db_column_Ctype (driver=<value optimized out>, tab=<value optimized out>, col=<value optimized out>) at column.c:103
#3  0x0000000000406c04 in main (argc=64, argv=<value optimized out>) at main.c:487

I attach a tarball that allows to reproduce the segfault. You should edit prepare.sh to set the correct path to grass, then run

./prepare.sh

Attachments (1)

bug_segf_distance.tar.gz (6.9 KB ) - added by pertusus 11 years ago.
tarball with data and script to reproduce the bug

Download all attachments as: .zip

Change History (7)

by pertusus, 11 years ago

Attachment: bug_segf_distance.tar.gz added

tarball with data and script to reproduce the bug

comment:1 by martinl, 11 years ago

Keywords: v.distance added

comment:2 by mmetz, 11 years ago

This bug has been fixed 3 days ago in r53761. Please try latest svn.

Markus M

comment:3 by pertusus, 11 years ago

Indeed, there is no more segfault anymore, but v.distance do not upload to the table.

> v.db.select test_point
cat|dbl_1|dbl_2|int_1|cat_basin
1|1535075.28996661|-2045868.67996559|1|

cat_basin should be the cat of the test_bas point since the point is in test_bas.

> v.db.select test_bas
cat
354

Should I open another bug?

in reply to:  3 comment:4 by mmetz, 11 years ago

Replying to pertusus:

Indeed, there is no more segfault anymore, but v.distance do not upload to the table.

Should I open another bug?

Fixed in r53805, please test.

Markus M

comment:5 by neteler, 10 years ago

Seems to be solved (no more complaints), closing.

comment:6 by neteler, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.