[GRASS-dev] g.copy bug?

Hello,

g.copy from mapsetA -> mapsetB does not work witht the most current cvs
version.

if I run g.copy rast=old@mapsetX,test1725heute

d.rast test1725heute
WARNING: can't read range file for [test1725heute in habitat_amount]
WARNING: color support for [test1725heute] in mapset [habitat_amount]
         missing
ERROR: Color file for [test1725heute] not available

r.support test1725heute
WARNING: Can't open header file for [test1725heute in habitat_amount]
Edit header for [test1725heute]? (y/n) [y]
Edit header for [test1725heute@habitat_amount]
WARNING: unable to open raster map [test1725heute in habitat_amount]
ERROR: Cannot open raster map [test1725heute]!
WARNING: Can't open header file for [test1725heute in habitat_amount]
ERROR: Canceling from edit header.

r.info test1725heute
WARNING: Can't open header file for [test1725heute in habitat_amount]
WARNING: category support for [test1725heute] in mapset [habitat_amount]
         missing
WARNING: can't get history information for [test1725heute] in mapset
         [habitat_amount]
WARNING: can't read range file for [test1725heute in habitat_amount]
ERROR: could not read range file

unfortunately my grass6 / 62 Debian versions are broken hence I cannot test it
using these releases.

can anybody report this bug as well?

Martin

BTW is there a way to move raster between mapsets?

Martin Wegmann wrote:

Hello,

g.copy from mapsetA -> mapsetB does not work witht the most current cvs
version.

if I run g.copy rast=old@mapsetX,test1725heute

d.rast test1725heute
WARNING: can't read range file for [test1725heute in habitat_amount]
WARNING: color support for [test1725heute] in mapset [habitat_amount]
         missing
ERROR: Color file for [test1725heute] not available

r.support test1725heute
WARNING: Can't open header file for [test1725heute in habitat_amount]
Edit header for [test1725heute]? (y/n) [y]
Edit header for [test1725heute@habitat_amount]
WARNING: unable to open raster map [test1725heute in habitat_amount]
ERROR: Cannot open raster map [test1725heute]!
WARNING: Can't open header file for [test1725heute in habitat_amount]
ERROR: Canceling from edit header.

r.info test1725heute
WARNING: Can't open header file for [test1725heute in habitat_amount]
WARNING: category support for [test1725heute] in mapset [habitat_amount]
         missing
WARNING: can't get history information for [test1725heute] in mapset
         [habitat_amount]
WARNING: can't read range file for [test1725heute in habitat_amount]
ERROR: could not read range file

unfortunately my grass6 / 62 Debian versions are broken hence I cannot test it
using these releases.

can anybody report this bug as well?

I can't reproduce this with a 2-day-version, which is after the recent
changes involving qualified names. I tried:

  $ g.mapsets mapset=glynn
  $ g.mapsets -p
  glynn
  $ g.copy elevation.dem@PERMANENT,foo
  Copy raster <elevation.dem@PERMANENT> to current mapset as <foo>
  $ ls /opt/grass-data/spearfish57/glynn/cell_misc/foo/
  null range

There may be other factors involved; can you create a minimal location
which demonstrates the issue?

BTW is there a way to move raster between mapsets?

Change to destination, g.copy, change to source, g.remove.

There isn't a faster way; you can't modify mapsets other than the
current one.

--
Glynn Clements <glynn@gclements.plus.com>

On Mon, Apr 23, 2007 at 05:31:26PM +0200, Martin Wegmann wrote:

Hello,

g.copy from mapsetA -> mapsetB does not work witht the most current cvs
version.

if I run g.copy rast=old@mapsetX,test1725heute

d.rast test1725heute
WARNING: can't read range file for [test1725heute in habitat_amount]
WARNING: color support for [test1725heute] in mapset [habitat_amount]
         missing
ERROR: Color file for [test1725heute] not available

Martin,

most likely a "make distclean" and full recompile will
cure the problem. Did you try this?

Markus

On Monday 23 April 2007 21:08, Markus Neteler wrote:

On Mon, Apr 23, 2007 at 05:31:26PM +0200, Martin Wegmann wrote:
> Hello,
>
> g.copy from mapsetA -> mapsetB does not work witht the most current cvs
> version.
>
> if I run g.copy rast=old@mapsetX,test1725heute
>
> d.rast test1725heute
> WARNING: can't read range file for [test1725heute in habitat_amount]
> WARNING: color support for [test1725heute] in mapset [habitat_amount]
> missing
> ERROR: Color file for [test1725heute] not available

Martin,

most likely a "make distclean" and full recompile will
cure the problem. Did you try this?

my script does:

make clean
make distclean
cvs update -dP grass6
./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-postgres-includes=/usr/include/postgresql --with-gdal=/usr/local/bin/gdal-config --enable-largefile
make
make install

I am recompiling it again and perhaps I'll redo it by-hand if it does not work
afterwards.

Martin

Markus

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

On Monday 23 April 2007 20:27, Glynn Clements wrote:

Martin Wegmann wrote:
> Hello,
>
> g.copy from mapsetA -> mapsetB does not work witht the most current cvs
> version.
>
> if I run g.copy rast=old@mapsetX,test1725heute
>
> d.rast test1725heute
> WARNING: can't read range file for [test1725heute in habitat_amount]
> WARNING: color support for [test1725heute] in mapset [habitat_amount]
> missing
> ERROR: Color file for [test1725heute] not available
>
>
> r.support test1725heute
> WARNING: Can't open header file for [test1725heute in habitat_amount]
> Edit header for [test1725heute]? (y/n) [y]
> Edit header for [test1725heute@habitat_amount]
> WARNING: unable to open raster map [test1725heute in habitat_amount]
> ERROR: Cannot open raster map [test1725heute]!
> WARNING: Can't open header file for [test1725heute in habitat_amount]
> ERROR: Canceling from edit header.
>
> r.info test1725heute
> WARNING: Can't open header file for [test1725heute in habitat_amount]
> WARNING: category support for [test1725heute] in mapset [habitat_amount]
> missing
> WARNING: can't get history information for [test1725heute] in mapset
> [habitat_amount]
> WARNING: can't read range file for [test1725heute in habitat_amount]
> ERROR: could not read range file
>
> unfortunately my grass6 / 62 Debian versions are broken hence I cannot
> test it using these releases.
>
> can anybody report this bug as well?

I can't reproduce this with a 2-day-version, which is after the recent
changes involving qualified names. I tried:

  $ g.mapsets mapset=glynn
  $ g.mapsets -p
  glynn
  $ g.copy elevation.dem@PERMANENT,foo
  Copy raster <elevation.dem@PERMANENT> to current mapset as <foo>
  $ ls /opt/grass-data/spearfish57/glynn/cell_misc/foo/
  null range

There may be other factors involved; can you create a minimal location
which demonstrates the issue?

I did it with spearfish

g.copy rast=aspect@PERMANENT,testcopy

same error message with compilation from yesterday.

I finished cvs update, make clean, distclean, ./configure, make, make install
and now I get:

g.copy rast=aspect@PERMANENT,testcopy2
Copy raster <aspect@PERMANENT> to current mapset as <testcopy2>
Speicherzugriffsfehler

(-> Memory access error)

GRASS error or Linux problem? (Debian unstable)

r.info testcopy2
WARNING: Can't open header file for [testcopy2 in anna]
WARNING: category support for [testcopy2] in mapset [anna] missing
WARNING: can't get history information for [testcopy2] in mapset [anna]
WARNING: can't read range file for [testcopy2 in anna]
ERROR: could not read range file

BTW I commented \visualization out due to errors in make - but that should not
affect it, should it?

> BTW is there a way to move raster between mapsets?

Change to destination, g.copy, change to source, g.remove.

There isn't a faster way; you can't modify mapsets other than the
current one.

well, stupid question - then I change destination as usual. thanks.

Martin

Martin Wegmann wrote:

my script does:

make clean
make distclean
cvs update -dP grass6

Being curious - doesn't "make distclean" alone suffice? Does'n it do
all that "make clean" does and more?

Maciek

Martin Wegmann wrote:

> I can't reproduce this with a 2-day-version, which is after the recent
> changes involving qualified names. I tried:
>
> $ g.mapsets mapset=glynn
> $ g.mapsets -p
> glynn
> $ g.copy elevation.dem@PERMANENT,foo
> Copy raster <elevation.dem@PERMANENT> to current mapset as <foo>
> $ ls /opt/grass-data/spearfish57/glynn/cell_misc/foo/
> null range
>
> There may be other factors involved; can you create a minimal location
> which demonstrates the issue?

I did it with spearfish

g.copy rast=aspect@PERMANENT,testcopy

same error message with compilation from yesterday.

I finished cvs update, make clean, distclean, ./configure, make, make install
and now I get:

g.copy rast=aspect@PERMANENT,testcopy2
Copy raster <aspect@PERMANENT> to current mapset as <testcopy2>
Speicherzugriffsfehler

(-> Memory access error)

GRASS error or Linux problem? (Debian unstable)

Works fine here.

  $ g.copy rast=aspect@PERMANENT,testcopy2
  Copy raster <aspect@PERMANENT> to current mapset as <testcopy2>
  $ r.info testcopy2
   +----------------------------------------------------------------------------+
   | Layer: testcopy2 Date: Mon Nov 5 10:55:57 2001 |
   | Mapset: glynn Login of Creator: neteler |
   | Location: spearfish57 |
   | DataBase: /opt/grass-data |
   | Title: aspect in degrees from east ( aspect ) |
   | timestamp: none |

Could you try it under gdb, e.g.:

  $ gdb g.copy
  > run rast=aspect@PERMANENT,testcopy2
  [segfault]
  > where

?

r.info testcopy2
WARNING: Can't open header file for [testcopy2 in anna]
WARNING: category support for [testcopy2] in mapset [anna] missing
WARNING: can't get history information for [testcopy2] in mapset [anna]
WARNING: can't read range file for [testcopy2 in anna]
ERROR: could not read range file

BTW I commented \visualization out due to errors in make - but that should not
affect it, should it?

No.

--
Glynn Clements <glynn@gclements.plus.com>

Maciej Sieczka wrote:

> my script does:
>
> make clean
> make distclean
> cvs update -dP grass6

Being curious - doesn't "make distclean" alone suffice? Does'n it do
all that "make clean" does and more?

Yes.

--
Glynn Clements <glynn@gclements.plus.com>

On Tuesday 24 April 2007 21:04, Glynn Clements wrote:

Martin Wegmann wrote:
> > I can't reproduce this with a 2-day-version, which is after the recent
> > changes involving qualified names. I tried:
> >
> > $ g.mapsets mapset=glynn
> > $ g.mapsets -p
> > glynn
> > $ g.copy elevation.dem@PERMANENT,foo
> > Copy raster <elevation.dem@PERMANENT> to current mapset as <foo>
> > $ ls /opt/grass-data/spearfish57/glynn/cell_misc/foo/
> > null range
> >
> > There may be other factors involved; can you create a minimal location
> > which demonstrates the issue?
>
> I did it with spearfish
>
> g.copy rast=aspect@PERMANENT,testcopy
>
> same error message with compilation from yesterday.
>
> I finished cvs update, make clean, distclean, ./configure, make, make
> install and now I get:
>
> g.copy rast=aspect@PERMANENT,testcopy2
> Copy raster <aspect@PERMANENT> to current mapset as <testcopy2>
> Speicherzugriffsfehler
>
> (-> Memory access error)
>
> GRASS error or Linux problem? (Debian unstable)

Works fine here.

  $ g.copy rast=aspect@PERMANENT,testcopy2
  Copy raster <aspect@PERMANENT> to current mapset as <testcopy2>
  $ r.info testcopy2
  
+--------------------------------------------------------------------------
--+

   | Layer: testcopy2 Date: Mon Nov 5 10:55:57 2001
   | | Mapset: glynn Login of Creator: neteler
   | | Location: spearfish57
   | | DataBase: /opt/grass-data
   | | Title: aspect in degrees from east ( aspect )
   | | timestamp: none
   | |

Could you try it under gdb, e.g.:

  $ gdb g.copy

  > run rast=aspect@PERMANENT,testcopy2

  [segfault]

  > where

cvs update 1h ago
make distclean
rm -rf /usr/local/grass
./configure
make
make install

GRASS 6.3.cvs (spearfish60):~ > gdb g.copy
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) run rast=aspect@PERMANENT,testcopy7
Starting program: /usr/local/grass-6.3.cvs/bin/g.copy
rast=aspect@PERMANENT,testcopy7
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1225282800 (LWP 13535)]
Copy raster <aspect@PERMANENT> to current mapset as <testcopy7>

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1225282800 (LWP 13535)]
do_copy (n=0, old=0x804e7f8 "aspect", mapset=0x804e840 "PERMANENT",
new=0x804e810 "testcopy7") at do_copy.c:40
40 for (i = 0; i < list[n].nelem; i++)

BTW how can I check that the running version is really the most recent one -
just in case I did a mistake and I am still starting an "old" grass63-cvs
version?

Martin

Martin Wegmann wrote:

GRASS 6.3.cvs (spearfish60):~ > gdb g.copy
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) run rast=aspect@PERMANENT,testcopy7
Starting program: /usr/local/grass-6.3.cvs/bin/g.copy
rast=aspect@PERMANENT,testcopy7
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1225282800 (LWP 13535)]
Copy raster <aspect@PERMANENT> to current mapset as <testcopy7>

Program received signal SIGSEGV, Segmentation fault.

FWIW, I can't reproduce this.

(current GRASS 6.3 CVS built and running on Ubuntu Dapper, 32 bit, GCC
4.0.3, Pentium M, kernel 2.6.15-28-686)

Maciek

Martin Wegmann wrote:

cvs update 1h ago
make distclean
rm -rf /usr/local/grass
./configure
make
make install

GRASS 6.3.cvs (spearfish60):~ > gdb g.copy
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(gdb) run rast=aspect@PERMANENT,testcopy7
Starting program: /usr/local/grass-6.3.cvs/bin/g.copy
rast=aspect@PERMANENT,testcopy7
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1225282800 (LWP 13535)]
Copy raster <aspect@PERMANENT> to current mapset as <testcopy7>

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1225282800 (LWP 13535)]
do_copy (n=0, old=0x804e7f8 "aspect", mapset=0x804e840 "PERMANENT",
new=0x804e810 "testcopy7") at do_copy.c:40
40 for (i = 0; i < list[n].nelem; i++)

Odd. If n==0, the only way I can see of this causing a segfault is if
"list" is invalid, but "list" is used to initialise the option list
used by G_parser().

--
Glynn Clements <glynn@gclements.plus.com>

On Thursday 26 April 2007 01:01, Glynn Clements wrote:

Martin Wegmann wrote:
> cvs update 1h ago
> make distclean
> rm -rf /usr/local/grass
> ./configure
> make
> make install
>
> GRASS 6.3.cvs (spearfish60):~ > gdb g.copy
> GNU gdb 6.6-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are welcome to change it and/or distribute copies of it under certain
> conditions. Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details. This GDB was configured as "i486-linux-gnu"...
> Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
> (gdb) run rast=aspect@PERMANENT,testcopy7
> Starting program: /usr/local/grass-6.3.cvs/bin/g.copy
> rast=aspect@PERMANENT,testcopy7
> Failed to read a valid object file image from memory.
> [Thread debugging using libthread_db enabled]
> [New Thread -1225282800 (LWP 13535)]
> Copy raster <aspect@PERMANENT> to current mapset as <testcopy7>
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1225282800 (LWP 13535)]
> do_copy (n=0, old=0x804e7f8 "aspect", mapset=0x804e840 "PERMANENT",
> new=0x804e810 "testcopy7") at do_copy.c:40
> 40 for (i = 0; i < list[n].nelem; i++)

Odd. If n==0, the only way I can see of this causing a segfault is if
"list" is invalid, but "list" is used to initialise the option list
used by G_parser().

I recompiled GRASS again - same error message.

just to be sure that I did not introduce a stupid mistake:

rm -rf
/usr/local/grass6-cvs-...
/usr/local/bin/grass6...

rm -rf
my_grass_cvs_folder

then:
export CVSROOT=:ext:martin@grasscvs:/grassrepository
export CVS_RSH=ssh
cvs -z3 co grass6
cd grass6
./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-postgres-includes=/usr/include/postgresql --with-gdal=/usr/local/bin/gdal-config --enable-largefile
make
sudo make install

grass63

g.copy rast=old,new

if not GRASS related, can debian unstable cause this error?

Martin

On Thursday 26 April 2007 11:43, Martin Wegmann wrote:

On Thursday 26 April 2007 01:01, Glynn Clements wrote:
> Martin Wegmann wrote:
> > cvs update 1h ago
> > make distclean
> > rm -rf /usr/local/grass
> > ./configure
> > make
> > make install
> >
> > GRASS 6.3.cvs (spearfish60):~ > gdb g.copy
> > GNU gdb 6.6-debian
> > Copyright (C) 2006 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and
> > you are welcome to change it and/or distribute copies of it under
> > certain conditions. Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB. Type "show warranty" for
> > details. This GDB was configured as "i486-linux-gnu"...
> > Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
> > (gdb) run rast=aspect@PERMANENT,testcopy7
> > Starting program: /usr/local/grass-6.3.cvs/bin/g.copy
> > rast=aspect@PERMANENT,testcopy7
> > Failed to read a valid object file image from memory.
> > [Thread debugging using libthread_db enabled]
> > [New Thread -1225282800 (LWP 13535)]
> > Copy raster <aspect@PERMANENT> to current mapset as <testcopy7>
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1225282800 (LWP 13535)]
> > do_copy (n=0, old=0x804e7f8 "aspect", mapset=0x804e840 "PERMANENT",
> > new=0x804e810 "testcopy7") at do_copy.c:40
> > 40 for (i = 0; i < list[n].nelem; i++)
>
> Odd. If n==0, the only way I can see of this causing a segfault is if
> "list" is invalid, but "list" is used to initialise the option list
> used by G_parser().

I recompiled GRASS again - same error message.

just to be sure that I did not introduce a stupid mistake:

rm -rf
/usr/local/grass6-cvs-...
/usr/local/bin/grass6...

rm -rf
my_grass_cvs_folder

then:
export CVSROOT=:ext:martin@grasscvs:/grassrepository
export CVS_RSH=ssh
cvs -z3 co grass6
cd grass6
./configure --with-tcltk-includes=/usr/include/tcl8.4
--with-postgres-includes=/usr/include/postgresql
--with-gdal=/usr/local/bin/gdal-config --enable-largefile make
sudo make install

grass63

g.copy rast=old,new

if not GRASS related, can debian unstable cause this error?

BTW I get the same error using r.reclass (Speicherzugriffsfehler, memory
allocation error)

I compiled grass 6.2.1 and redid all analysis and this error prompt did not
appear hence it must be somehow related to grass6.3

Martin

Martin

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev