#2643: d.vect png with icon=basic/circle and long paths segfaults
----------------------+-----------------------------------------------------
Reporter: pertusus | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.0.1
Component: Display | Version: svn-releasebranch70
Keywords: | Platform: Linux
Cpu: x86-64 |
----------------------+-----------------------------------------------------
In some cases, d.vect segfaults. I can only reproduce a segfault when I
am in a directory with a long name (and the location name needs to be long
too, though I surmise that it is the same issue).
Here is the backtrace
{{{
gdb --args d.vect map=selection_demand icon=basic/circle
Reading symbols from /localdata/local/grass-7.0.0svn/bin/d.vect...done.
(gdb) run
Starting program: /localdata/local/grass-7.0.0svn/bin/d.vect
map=selection_demand icon=basic/circle
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6cd2bef in store_xy (x=750.5, y=-nan(0x8000000000000))
at draw_line.c:22
22 png.grid[yi * png.width + xi] = png.current_color;
(gdb) bt
#0 0x00007ffff6cd2bef in store_xy (x=750.5, y=-nan(0x8000000000000)) at
draw_line.c:22
#1 0x00007ffff6cd2fe9 in draw_line (x1=<value optimized out>, y1=<value
optimized out>,
x2=<value optimized out>, y2=<value optimized out>) at draw_line.c:60
#2 png_draw_line (x1=<value optimized out>, y1=<value optimized out>,
x2=<value optimized out>, y2=<value optimized out>) at draw_line.c:73
#3 0x00007ffff68c8908 in path_stroke (p=0x7ffff6ed76a0,
line=0x7ffff6cd2c00 <png_draw_line>) at path.c:106
#4 0x00007ffff7dfa42e in symbol (Symb=0x8359b0, x0=-1474999.7945148,
y0=3456000.0026465799, fill_color=0x835920, line_color=0x835900,
string_color=0x835900) at symbol.c:93
#5 0x0000000000406014 in draw_line (Map=0x7fffffffd1b0, type=87,
Clist=0x630400,
color=0x7fffffffdcb0, fcolor=0x7fffffffdca0, chcat=0,
symbol_name=0x6289d0 "basic/circle", size=5, sqrt_flag=0, id_flag=0,
cats_color_flag=0, default_width=0, width_scale=1, zcolors=0x0,
cvarr_rgb=0x0,
colors=0x0, cvarr_width=0x7fffffffafb0, nrec_width=0,
cvarr_size=0x7fffffffaf90,
nrec_size=0, cvarr_rot=0x7fffffffaf70, nrec_rot=0) at lines.c:350
#6 display_lines (Map=0x7fffffffd1b0, type=87, Clist=0x630400,
color=0x7fffffffdcb0,
fcolor=0x7fffffffdca0, chcat=0, symbol_name=0x6289d0 "basic/circle",
size=5,
sqrt_flag=0, id_flag=0, cats_color_flag=0, default_width=0,
width_scale=1,
zcolors=0x0, cvarr_rgb=0x0, colors=0x0, cvarr_width=0x7fffffffafb0,
nrec_width=0,
cvarr_size=0x7fffffffaf90, nrec_size=0, cvarr_rot=0x7fffffffaf70,
nrec_rot=0)
at lines.c:150
#7 0x0000000000408716 in display_shape (Map=0x7fffffffd1b0, type=87,
Clist=0x630400,
window=0x7fffffffdba0, bcolor=0x7fffffffdcb0, fcolor=0x7fffffffdca0,
chcat=0,
icon=0x6289d0 "basic/circle", size=5, size_column=0x0, sqrt_flag=0,
rot_column=0x0,
id_flag=0, cats_colors_flag=0, rgb_column=0x0, default_width=0,
width_column=0x0,
width_scale=1, z_style=0x0) at shape.c:207
#8 0x00000000004073ed in main (argc=0, argv=0x0) at main.c:408
}}}
I attach a reproducer. You may want to change GRASS_VERSION in
reproduce.sh and code in grass_common_setup.sh.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2643>
GRASS GIS <http://grass.osgeo.org>