#3494: r.thin crashes after 84 passes
-------------------------+-------------------------
Reporter: pitstop | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Raster | Version: 7.4.0
Keywords: | CPU: Unspecified
Platform: MSWindows 7 |
-------------------------+-------------------------
Hi Community,
I wanted to use r.thin on a raster map before r.to.vect on the result but
r.thin crashes after 84 passes every time. Smaller number of iterations
run without any problems. I was able to reproduce the error by using
r.thin on the elevation.dem from the Spearfish data set. The following
error is printed to the console.
{{{
Exception in thread Thread-25:
Traceback (most recent call last):
File "C:\OSGEO4~1\apps\Python27\lib\threading.py", line
808, in __bootstrap_inner
self.run()
File "C:\OSGEO4~1\apps\grass\grass-7.4.0\gui\wxpython\core
\gconsole.py", line 156, in run
self.resultQ.put((requestId, self.requestCmd.run()))
File "C:\OSGEO4~1\apps\grass\grass-7.4.0\gui\wxpython\core
\gcmd.py", line 614, in run
self._redirect_stream()
File "C:\OSGEO4~1\apps\grass\grass-7.4.0\gui\wxpython\core
\gcmd.py", line 643, in _redirect_stream
self.stderr.write(line)
File "C:\OSGEO4~1\apps\grass\grass-7.4.0\gui\wxpython\core
\gconsole.py", line 300, in write
self.message += line.split(':', 1)[1].strip() + '\n'
IndexError: list index out of range
}}}
Replying to [ticket:3494 pitstop]:
> Hi Community,
>
> I wanted to use r.thin on a raster map before r.to.vect on the result
but r.thin crashes after 84 passes every time. Smaller number of
iterations run without any problems. I was able to reproduce the error by
using r.thin on the elevation.dem from the Spearfish data set.
While this should probably be handled more gracefully, could you explain
what you are trying to do with r.thin ? Why would you run r.thin on a DEM
? r.thin is meant to thin raster lines (represented by some form of
discrete pixel values) to single pixel width so as to make their
vectorisation possible. Running it on a raster map with a continuous
variable doesn't make sense in my understanding.
Replying to [comment:1 mlennert]:
> Replying to [ticket:3494 pitstop]:
> > Hi Community,
> >
> > I wanted to use r.thin on a raster map before r.to.vect on the result
but r.thin crashes after 84 passes every time. Smaller number of
iterations run without any problems. I was able to reproduce the error by
using r.thin on the elevation.dem from the Spearfish data set.
>
> While this should probably be handled more gracefully,
On the OS command line
{{{
g.region -p rast=elevation.dem
r.thin in=elevation.dem out=elevation.dem.thin it=1000
}}}
finishes successfully after 229 passes.
Apparently the problem is that the gui can't handle the messages produced
by r.thin, i.e. the gui crashes, not r.thin.