[GRASS-user] r.reclass and "Abort trap"

I am a fairly new GRASS user who recently shifted to a Mac computer (Lion
OS). The program seems to run well on the new platform for the most part,
although periodically a line of working code, when copied and pasted
directly from the GUI (layer manager) to the command terminal, will produce
an error message. I will continue to get error messages until I reboot
GRASS, at which time the same original line of code will work no problem.
Sometimes the same line of working code simply never works again, such as in
this present case:

The task is really quite simple: a simple reclass of two categories into 1.
My rules .txt file looks like this (or some variation of this with or
without different amounts of spacing):
1 2 = 1

Therefore categories 1 and 2 should be reclassed as category 1 (I have not
attempted to give it a label yet). Here is the command:

r.reclass --overwrite input=map1@Forest_Attributes output=map1_reclass
rules=temp.txt

The result is an empty map, and command terminal invariably says this:
"Abort trap: 6"

I can't imagine the code is wrong, though I am open to suggestions.... I
have searched the GRASS book and forums and there is precious little about
any "Abort trap" output. However I gather from the web that it's some sort
of memory issue (buffer overflow)? I am not a command line genius, but I
would certainly appreciate a user-friendly solution to this.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/r-reclass-and-Abort-trap-tp4352104p4352104.html
Sent from the Grass - Users mailing list archive at Nabble.com.

DGann wrote:

I am a fairly new GRASS user who recently shifted to a Mac computer (Lion
OS). The program seems to run well on the new platform for the most part,
although periodically a line of working code, when copied and pasted
directly from the GUI (layer manager) to the command terminal, will
produce an error message. I will continue to get error messages until
I reboot GRASS, at which time the same original line of code will
work no problem. Sometimes the same line of working code simply never
works again, such as in this present case:

sounds a lot like a memory/pointer error in the grass code.

The task is really quite simple: a simple reclass of two categories
into 1.
My rules .txt file looks like this (or some variation of this with or
without different amounts of spacing):
1 2 = 1

Therefore categories 1 and 2 should be reclassed as category
1 (I have not attempted to give it a label yet). Here is the
command:

r.reclass --overwrite input=map1@Forest_Attributes output=map1_reclass
rules=temp.txt

The result is an empty map, and command terminal invariably says this:
"Abort trap: 6"

I can't imagine the code is wrong, though I am open to suggestions....
I have searched the GRASS book and forums and there is precious little
about any "Abort trap" output. However I gather from the web
that it's some sort of memory issue (buffer overflow)?

apparently the stack is being smashed.

Can you try 6.5svn? there is a segfault fix for r.reclass there (see
trac bug #800) which has not yet been backported to 6.4.

Hamish