[GRASS5] i.smap problems

I've had this issue for some time and am now just looking into it. I
don't know if this is a 64-bit issue or not. Can anyone replicate this
under 32-bit architectures?

I'm no expert with gdb, either and use it so rarely I cannot remember
how to probe structures:

GRASS 6.1.cvs (spearfish60):/usr/src/grass6 > gdb --args i.smap gr=b
sub=b sig=b out=b

[snip]

(gdb) run
Starting program: /opt/gis/grass-6.1.cvs/bin/i.smap gr=b sub=b sig=b
out=b
Processing rows 1-128 (of 700), cols=1-128 (of 950)
Processing rows 1-128 (of 700), cols=129-256 (of 950)
Processing rows 1-128 (of 700), cols=257-384 (of 950)
Processing rows 1-128 (of 700), cols=385-512 (of 950)
Processing rows 1-128 (of 700), cols=513-640 (of 950)
Processing rows 1-128 (of 700), cols=641-768 (of 950)
Processing rows 1-128 (of 700), cols=769-896 (of 950)
Processing rows 1-128 (of 700), cols=897-950 (of 950)
Processing rows 129-256 (of 700), cols=1-128 (of 950)
Processing rows 129-256 (of 700), cols=129-256 (of 950)
Processing rows 129-256 (of 700), cols=257-384 (of 950)
Processing rows 129-256 (of 700), cols=385-512 (of 950)
Processing rows 129-256 (of 700), cols=513-640 (of 950)
Processing rows 129-256 (of 700), cols=641-768 (of 950)
Processing rows 129-256 (of 700), cols=769-896 (of 950)
Processing rows 129-256 (of 700), cols=897-950 (of 950)
Processing rows 257-384 (of 700), cols=1-128 (of 950)
Processing rows 257-384 (of 700), cols=129-256 (of 950)
Processing rows 257-384 (of 700), cols=257-384 (of 950)
Processing rows 257-384 (of 700), cols=385-512 (of 950)
Processing rows 257-384 (of 700), cols=513-640 (of 950)
Processing rows 257-384 (of 700), cols=641-768 (of 950)
Processing rows 257-384 (of 700), cols=769-896 (of 950)
Processing rows 257-384 (of 700), cols=897-950 (of 950)
Processing rows 385-512 (of 700), cols=1-128 (of 950)
Processing rows 385-512 (of 700), cols=129-256 (of 950)
Processing rows 385-512 (of 700), cols=257-384 (of 950)
Processing rows 385-512 (of 700), cols=385-512 (of 950)
Processing rows 385-512 (of 700), cols=513-640 (of 950)
Processing rows 385-512 (of 700), cols=641-768 (of 950)
Processing rows 385-512 (of 700), cols=769-896 (of 950)
Processing rows 385-512 (of 700), cols=897-950 (of 950)
Processing rows 513-640 (of 700), cols=1-128 (of 950)
Processing rows 513-640 (of 700), cols=129-256 (of 950)
Processing rows 513-640 (of 700), cols=257-384 (of 950)
Processing rows 513-640 (of 700), cols=385-512 (of 950)
Processing rows 513-640 (of 700), cols=513-640 (of 950)
Processing rows 513-640 (of 700), cols=641-768 (of 950)
Processing rows 513-640 (of 700), cols=769-896 (of 950)
Processing rows 513-640 (of 700), cols=897-950 (of 950)
Processing rows 641-700 (of 700), cols=1-128 (of 950)
Processing rows 641-700 (of 700), cols=129-256 (of 950)
Processing rows 641-700 (of 700), cols=257-384 (of 950)
Processing rows 641-700 (of 700), cols=385-512 (of 950)
Processing rows 641-700 (of 700), cols=513-640 (of 950)
Processing rows 641-700 (of 700), cols=641-768 (of 950)
Processing rows 641-700 (of 700), cols=769-896 (of 950)
Processing rows 641-700 (of 700), cols=897-950 (of 950)
Writing [b] ...
   0%
Program received signal SIGSEGV, Segmentation fault.
0x0000000000402887 in write_img (img=Variable "img" is not available.
) at write_img.c:28
28 files->cellbuf[col] = (CELL)S->ClassSig[class].classnum;
(gdb) bt
#0 0x0000000000402887 in write_img (img=Variable "img" is not
available.
) at write_img.c:28
#1 0x0000000000402eb3 in segment ()
#2 0x000000000040224a in main (argc=5, argv=Variable "argv" is not
available.
) at main.c:27
(gdb)

--
Brad Douglas <rez@touchofmadness.com>

Brad,

since I have access to a 64bit box now, could you please
post how you generated the 'b' group/subgroup?
Also the g.region settings?

Markus

On Fri, Jul 22, 2005 at 02:21:08PM -0700, Brad Douglas wrote:

I've had this issue for some time and am now just looking into it. I
don't know if this is a 64-bit issue or not. Can anyone replicate this
under 32-bit architectures?

I'm no expert with gdb, either and use it so rarely I cannot remember
how to probe structures:

GRASS 6.1.cvs (spearfish60):/usr/src/grass6 > gdb --args i.smap gr=b
sub=b sig=b out=b

[snip]

(gdb) run
Starting program: /opt/gis/grass-6.1.cvs/bin/i.smap gr=b sub=b sig=b
out=b
Processing rows 1-128 (of 700), cols=1-128 (of 950)
Processing rows 1-128 (of 700), cols=129-256 (of 950)
Processing rows 1-128 (of 700), cols=257-384 (of 950)
Processing rows 1-128 (of 700), cols=385-512 (of 950)
Processing rows 1-128 (of 700), cols=513-640 (of 950)
Processing rows 1-128 (of 700), cols=641-768 (of 950)
Processing rows 1-128 (of 700), cols=769-896 (of 950)
Processing rows 1-128 (of 700), cols=897-950 (of 950)
Processing rows 129-256 (of 700), cols=1-128 (of 950)
Processing rows 129-256 (of 700), cols=129-256 (of 950)
Processing rows 129-256 (of 700), cols=257-384 (of 950)
Processing rows 129-256 (of 700), cols=385-512 (of 950)
Processing rows 129-256 (of 700), cols=513-640 (of 950)
Processing rows 129-256 (of 700), cols=641-768 (of 950)
Processing rows 129-256 (of 700), cols=769-896 (of 950)
Processing rows 129-256 (of 700), cols=897-950 (of 950)
Processing rows 257-384 (of 700), cols=1-128 (of 950)
Processing rows 257-384 (of 700), cols=129-256 (of 950)
Processing rows 257-384 (of 700), cols=257-384 (of 950)
Processing rows 257-384 (of 700), cols=385-512 (of 950)
Processing rows 257-384 (of 700), cols=513-640 (of 950)
Processing rows 257-384 (of 700), cols=641-768 (of 950)
Processing rows 257-384 (of 700), cols=769-896 (of 950)
Processing rows 257-384 (of 700), cols=897-950 (of 950)
Processing rows 385-512 (of 700), cols=1-128 (of 950)
Processing rows 385-512 (of 700), cols=129-256 (of 950)
Processing rows 385-512 (of 700), cols=257-384 (of 950)
Processing rows 385-512 (of 700), cols=385-512 (of 950)
Processing rows 385-512 (of 700), cols=513-640 (of 950)
Processing rows 385-512 (of 700), cols=641-768 (of 950)
Processing rows 385-512 (of 700), cols=769-896 (of 950)
Processing rows 385-512 (of 700), cols=897-950 (of 950)
Processing rows 513-640 (of 700), cols=1-128 (of 950)
Processing rows 513-640 (of 700), cols=129-256 (of 950)
Processing rows 513-640 (of 700), cols=257-384 (of 950)
Processing rows 513-640 (of 700), cols=385-512 (of 950)
Processing rows 513-640 (of 700), cols=513-640 (of 950)
Processing rows 513-640 (of 700), cols=641-768 (of 950)
Processing rows 513-640 (of 700), cols=769-896 (of 950)
Processing rows 513-640 (of 700), cols=897-950 (of 950)
Processing rows 641-700 (of 700), cols=1-128 (of 950)
Processing rows 641-700 (of 700), cols=129-256 (of 950)
Processing rows 641-700 (of 700), cols=257-384 (of 950)
Processing rows 641-700 (of 700), cols=385-512 (of 950)
Processing rows 641-700 (of 700), cols=513-640 (of 950)
Processing rows 641-700 (of 700), cols=641-768 (of 950)
Processing rows 641-700 (of 700), cols=769-896 (of 950)
Processing rows 641-700 (of 700), cols=897-950 (of 950)
Writing [b] ...
   0%
Program received signal SIGSEGV, Segmentation fault.
0x0000000000402887 in write_img (img=Variable "img" is not available.
) at write_img.c:28
28 files->cellbuf[col] = (CELL)S->ClassSig[class].classnum;
(gdb) bt
#0 0x0000000000402887 in write_img (img=Variable "img" is not
available.
) at write_img.c:28
#1 0x0000000000402eb3 in segment ()
#2 0x000000000040224a in main (argc=5, argv=Variable "argv" is not
available.
) at main.c:27
(gdb)

--
Brad Douglas <rez@touchofmadness.com>

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

On Fri, 2005-07-29 at 11:17 +0200, Markus Neteler wrote:

since I have access to a 64bit box now, could you please
post how you generated the 'b' group/subgroup?
Also the g.region settings?

After trying the same problem on a 32bit box, I realized that I had
incorrectly generated the signature file. Once generated properly, all
was well.

I'm going to add some further (simple) checks to i.smap to validate the
integrity of the signature file.

--
Brad Douglas <rez@touchofmadness.com>

On Sat, 2005-07-30 at 00:33 -0700, Brad Douglas wrote:

On Fri, 2005-07-29 at 11:17 +0200, Markus Neteler wrote:
> since I have access to a 64bit box now, could you please
> post how you generated the 'b' group/subgroup?
> Also the g.region settings?

After trying the same problem on a 32bit box, I realized that I had
incorrectly generated the signature file. Once generated properly, all
was well.

I'm going to add some further (simple) checks to i.smap to validate the
integrity of the signature file.

UPDATE:

I_ReadSigSet() is broken and returns true regardless of signature
validity. Fix will be applied soon.

--
Brad Douglas <rez@touchofmadness.com>

On Fri, 22 Jul 2005 14:21:08 -0700
Brad Douglas <rez@touchofmadness.com> wrote:

I've had this issue for some time and am now just looking into it. I
don't know if this is a 64-bit issue or not. Can anyone replicate
this under 32-bit architectures?

I'm no expert with gdb, either and use it so rarely I cannot remember
how to probe structures:

GRASS 6.1.cvs (spearfish60):/usr/src/grass6 > gdb --args i.smap gr=b
sub=b sig=b out=b

[snip]

Sorry for the late reply,

You can probe structures by using kdbg as a front-end for gdb and
just expand it.

Hamish