[GRASS-dev] Segmentation fault i.smap

Markus Neteler neteler at osgeo.org
Tue Jun 29 07:11:42 EDT 2010


Hi,

using i.smap, I get a segfault:

i.smap group=22_1684 subgroup=22_1684 output=22_1684_classificate
signaturefile=sig_22_1684
Processing rows 1-128 (of 215)...
Processing rows 129-215 (of 215)...
Writing raster map <22_1684_classificate>...
D3/3: class: [0] row/col: [0][0]
Segmentation fault

bt full
#0  0x000000000040295d in write_img (img=0x75e950, ncols=210,
nrows=215, S=0x7fff87ab2a60, parms=0x7fff87ab2ba0,
files=0x7fff87ab2a80) at write_img.c:23
       class = 0
       row = 0
       col = 0
#1  0x0000000000402d14 in segment (S=0x7fff87ab2a60,
parms=0x7fff87ab2ba0, files=0x7fff87ab2a80) at segment.c:116
       block_size = 128
       ml = 0
       quiet = 0
       img = (DCELL ***) 0x74ce30
       last_row = 128
       wd = 210
       ht = 215
       region = {xmin = 128, xmax = 210, ymin = 128, ymax = 215, free =
{left = 0, right = 1, top = 0, bottom = 1}}
       nbands = 17
       nclasses = 0
       ll_pym = (float ****) 0x74c380
       sf_pym = (unsigned char ***) 0x75e900
       D = 6
       alpha_dec = (double *) 0x730ff0
       vlevel = 1
       i = 6
#2  0x000000000040216b in main (argc=5, argv=0x7fff87ab2cc8) at main.c:48
       parms = {output_map = 0x65ac20 "22_1684_classificate", group =
0x65abe0 "22_1684", subgroup = 0x65ac00 "22_1684", sigfile = 0x65ac40
"sig_22_1684", blocksize = 128, quiet = 0, ml = 0}
       files = {output_fd = 25, output_labels = {ncats = 0, num = 0, title =
0x74c340 "Labels", fmt = 0x0, m1 = 0, a1 = 0, m2 = 0, a2 = 0, q =
{truncate_only = 0, round_only = 0, defaultDRuleSet = 917799768,
defaultCRuleSet = 32743, infiniteLeftSet = 0, infiniteRightSet = 0,
cRangeSet = 0, maxNofRules = 0, nofRules = 0, defaultDMin =
6.9480961555761747e-310, defaultDMax = 2.0410903428666442e-314,
defaultCMin = 915632298, defaultCMax = 32743, infiniteDLeft = 0,
infiniteDRight = 6.9480961555761747e-310, infiniteCLeft = 1,
infiniteCRight = 32743, dMin = 0, dMax = 6.9480508183576405e-310, cMin
= 15774436, cMax = 0, table = 0xc2, fp_lookup = {vals =
0x7fff87ab2b6e, rules = 0x7fff87ab2b6f, nalloc = 917798912, active =
0, inf_dmin = 0, inf_dmax = 6.9480961636911041e-310, inf_min =
-2018825280, inf_max = 32767}}, labels = 0x0, marks = 0x100000000,
nalloc = 0, last_marked_rule = -1}, band_fd = 0x65a820, nbands = 17,
cellbuf = 0x65d410, outbuf = 0x65dab0, isdata = 0x65afc0 "è À5ç\177"}
       S = {nbands = 17, nclasses = 0, title = 0x74c320 " Labels",
ClassSig = 0x0}
       module = (struct GModule *) 0x7fe736721f20
(gdb)

i.group -l 22_1684 sub=22_1684
subgroup <22_1684> of group <22_1684> references the following raster maps
-------------
<22_1684_tagliata at classificazione>     <22_1684_5_SE_0 at classificazione>
<22_1684_5_SE_45 at classificazione>      <22_1684_5_SE_90 at classificazione>
<22_1684_5_SE_135 at classificazione>     <22_1684_5_Var_0 at classificazione>
<22_1684_5_Var_45 at classificazione>     <22_1684_5_Var_90 at classificazione>
<22_1684_5_Var_135 at classificazione>    <22_1684_9_SA_0 at classificazione>
<22_1684_9_SA_45 at classificazione>      <22_1684_9_SA_90 at classificazione>
<22_1684_9_SA_135 at classificazione>     <22_1684_9_SE_0 at classificazione>
<22_1684_9_SE_45 at classificazione>      <22_1684_9_SE_90 at classificazione>
<22_1684_9_SE_135 at classificazione>
-------------

I don't see the problem in the backtrace output... ("isdata" looks strange?).

It crashes in i.smap/shapiro/write_img.c line 23:
                files->outbuf[col] = (CELL) S->ClassSig[class].classnum;

Any hints?

thanks
Markus


More information about the grass-dev mailing list