[GRASS-dev] [GRASS GIS] #2643: d.vect png with icon=basic/circle and long paths segfaults
GRASS GIS
trac at osgeo.org
Mon Apr 6 04:36:17 PDT 2015
#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 |
----------------------+-----------------------------------------------------
Comment(by pertusus):
I poked around a bit in gdb, and my first impression is that the error is
already in draw_line, it is never checked if x1 could be equal to x2,
which means dx = 0, so at line 59, in
{{{
y = y1 + (x - x1) * dy / dx;
}}}
y is set to nan and the segfault is a consequence of that.
I have no idea whether x1 and X2 are supposed never to be equal or not.
There are other points processed before the one that is problematic.
It really puzzles me that I can only reproduce this when paths are long.
There does not seems to be any relationship with that issue. My feeling
is that the length of paths is unrelated to that issue, but for a
mysterious reason, rounding of x1 and x2 depends on the path length and
they are exactly equal only when the path is long but by complete chance.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2643#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list