[GRASS-dev] [GRASS GIS] #2019: v.voronoi Segmentation fault

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------
The next lines cause crash report:
{{{
echo "7414297.17458|6180640.72109|242
7414836.48276|6179963.8034|817
" | v.in.ascii in=- out=test_tmp x=1 y=2 cat=3 --o

g.region vect=test_tmp

v.voronoi -t in=test_tmp out=test_tmp_v --o
WARNING: Vector map <test_tmp_v> already exists and will be overwritten
Reading sites...
Voronoi triangulation...
Segmentation fault (core dumped)
}}}
The version GRASS GIS is
{{{
g.version -r
GRASS 6.4.3RC3 (2013)
Revision: 50937
Date: 2012-02-25 14:14:51 +0100 (Sat, 25 Feb 2012)
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2019&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by hamish):

is it trying to make a triangle (with area==0) from two points? or were
those two points extracted from a larger map having the problem?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------
Changes (by hamish):

  * keywords: => v.voronoi

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by DmitryKolesov):

Replying to [comment:1 hamish]:
> is it trying to make a triangle (with area==0) from two points? or were
those two points extracted from a larger map having the problem?
>
Yes, I tryed to create Voronoi diagram from 2 points. But I think
(probably wrong):
1) Voronoi diagram of 2 points is possible (the line splits the plain in
two half-planes)
2) In any case the module should print a message (the module crashes now).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by mmetz):

Replying to [comment:3 DmitryKolesov]:
> Replying to [comment:1 hamish]:
> > is it trying to make a triangle (with area==0) from two points? or
were those two points extracted from a larger map having the problem?
> >
> Yes, I tryed to create Voronoi diagram from 2 points. But I think
(probably wrong):

> 1) Voronoi diagram of 2 points is possible (the line splits the plain in
two half-planes)

I agree, this should be possible, but the algorithm (basically written in
1992) does not support this. I guess that the algorithm also does not
support points lying on a straight line.

> 2) In any case the module should print a message (the module crashes
now).

Done for trunk in r57182.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by mmetz):

Replying to [comment:3 DmitryKolesov]:
> Replying to [comment:1 hamish]:
> > is it trying to make a triangle (with area==0) from two points? or
were those two points extracted from a larger map having the problem?
> >
> Yes, I tryed to create Voronoi diagram from 2 points. But I think
(probably wrong):
> 1) Voronoi diagram of 2 points is possible (the line splits the plain in
two half-planes)

Right, the same applies to any number of points lying on a straight line.
Fixed in trunk r57610.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by hamish):

Replying to [comment:5 mmetz]:
> Right, the same applies to any number of points lying on a straight
> line. Fixed in trunk r57610.

great, thanks.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by hamish):

btw, if it is of interest, I've beeen playing around with some 3D grid
creation software lately called Gmsgh, (GPL>=2, standard debian/ubuntu
package)

http://www.geuz.org/gmsh/

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------

Comment(by hamish):

> called Gmsgh

sorry for the typo, make that "Gmsh".
  apt-get install gmsh

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
---------------------------+------------------------------------------------
Reporter: DmitryKolesov | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Vector | Version:
Keywords: v.voronoi | Platform: Unspecified
      Cpu: Unspecified |
---------------------------+------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.3 => 6.4.4

Comment:

For the record: fix r57610 (trunk) was backported to relbranch in r57820.

The original crash reported above no longer occurs. Can the ticket be
closed?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2019#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#2019: v.voronoi Segmentation fault
----------------------------+-----------------------------------------------
  Reporter: DmitryKolesov | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.4
Component: Vector | Version: svn-releasebranch64
Resolution: fixed | Keywords: v.voronoi
  Platform: Unspecified | Cpu: Unspecified
----------------------------+-----------------------------------------------
Changes (by neteler):

  * status: new => closed
  * version: => svn-releasebranch64
  * resolution: => fixed

Comment:

Replying to [comment:9 neteler]:
...
> The original crash reported above no longer occurs. Can the ticket be
closed?

Closing as fixed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2019#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>