[GRASS-dev] get_row.c: output north/east values? G__.window structure

Markus Neteler neteler at osgeo.org
Tue Aug 26 19:40:44 EDT 2008


On Tue, Aug 26, 2008 at 11:23 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> >> Does below makes sense for v.extrude?
>> >
>> > That causes an infinite loop, as you're skipping the k++ at the
>>
>> yes, this was my problem indeed (but not in every run).
>
> It can only happen when -t is used (and when there are nulls).
>
>> > bottom. I suggest changing it to a for loop.
>> >
>> > Also, the third test should probably be testing voffset_next rather
>> > than voffset_curr.
>>
>> err, would you mind to submit these suggestion?
>
> Done.

Thanks. However, now it segfaults:

Starting program:
/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/bin/v.extrude -t
bldg_resid out=bldg_resid_3d height=10              elev=el_D792_6m
--o
[Thread debugging using libthread_db enabled]
[New Thread 47029681048288 (LWP 30711)]
warning: Lowest section in /usr/lib64/libicudata.so.36 is .gnu.hash at
0000000000000120
WARNING: Vector map <bldg_resid_3d> already exists and will be overwritten

Extruding vector primitives...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47029681048288 (LWP 30711)]
0x0000000000402ec5 in extrude (In=0x7fffbf41a5a0, Out=0x7fffbf419f80,
Cats=0x60ac00, Points=0x60a130, fdrast=11,
    trace=1, objheight=10, voffset=0, window=
      {format = 0, compressed = -1, rows = 750, rows3 = 750, cols =
700, cols3 = 700, depths = 1, proj = 99, zone = 0, ew_res = 1, ew_res3
= 1, ns_res = 1, ns_res3 = 1, tb_res = 1, north = 220750, south =
220000, east = 639000, west = 638300, top = 1, bottom = 0}, type=2,
centroid=-1) at main.c:426
426                 voffset_curr = G_get_raster_sample(fdrast, &window, NULL,
(gdb) bt full
#0  0x0000000000402ec5 in extrude (In=0x7fffbf41a5a0,
Out=0x7fffbf419f80, Cats=0x60ac00, Points=0x60a130, fdrast=11,
    trace=1, objheight=10, voffset=0, window=
      {format = 0, compressed = -1, rows = 750, rows3 = 750, cols =
700, cols3 = 700, depths = 1, proj = 99, zone = 0, ew_res = 1, ew_res3
= 1, ns_res = 1, ns_res3 = 1, tb_res = 1, north = 220750, south =
220000, east = 639000, west = 638300, top = 1, bottom = 0}, type=2,
centroid=-1) at main.c:426
        k = 6098
        nlines = 0
        Points_wall = (struct line_pnts *) 0x60d710
        Points_roof = (struct line_pnts *) 0x619fe0
        voffset_dem = 0
        voffset_curr = 0
        voffset_next = 0
#1  0x0000000000402c40 in main (argc=7, argv=0x7fffbf41ad78) at main.c:320
        module = (struct GModule *) 0x2ac5ebf62700
        mapset = 0x60ae80 "PERMANENT"
        old = (struct Option *) 0x2ac5ebf62660
        new = (struct Option *) 0x609ba0
        zshift = (struct Option *) 0x609c40
        height = (struct Option *) 0x609dc0
        elevation = (struct Option *) 0x609d00
        hcolumn = (struct Option *) 0x609e80
        type_opt = (struct Option *) 0x609f40
        field_opt = (struct Option *) 0x60a000
        t_flag = (struct Flag *) 0x2ac5ebf62620
        In = {format = 0, temporary = 32767, dblnk = 0x60f5b0, plus =
{Version_Major = 5, Version_Minor = 0,
    Back_Major = 5, Back_Minor = 0, spidx_Version_Major = 1,
spidx_Version_Minor = 0, spidx_Back_Major = -345417671,
    spidx_Back_Minor = 10949, cidx_Version_Major = 5,
cidx_Version_Minor = 0, cidx_Back_Major = 5,
    cidx_Back_Minor = 0, with_z = 1, spidx_with_z = 0, head_size =
142, spidx_head_size = 2090266759,
    cidx_head_size = 9, release_support = 0, port = {byte_order = 0,
dbl_cnvrt = "\000\001\002\003\004\005\006\a",
      flt_cnvrt = "\000\001\002\003", lng_cnvrt = "\000\001\002\003",
int_cnvrt = "\000\001\002\003",
---Type <return> to continue, or q <return> to quit---
      shrt_cnvrt = "\000\001", dbl_quick = 1, flt_quick = 1, lng_quick
= 1, int_quick = 1, shrt_quick = 1},
    spidx_port = {byte_order = 32767, dbl_cnvrt = "�z���*\000",
flt_cnvrt = "\000\000\000",
      lng_cnvrt = "\000\000\000", int_cnvrt = "\b�n�", shrt_cnvrt =
"�*", dbl_quick = -306958336, flt_quick = 10949,
      lng_quick = -345450726, int_quick = 10949, shrt_quick =
-306889552}, cidx_port = {byte_order = 0,
      dbl_cnvrt = "\000\001\002\003\004\005\006\a", flt_cnvrt =
"\000\001\002\003", lng_cnvrt = "\000\001\002\003",
      int_cnvrt = "\000\001\002\003", shrt_cnvrt = "\000\001",
dbl_quick = 1, flt_quick = 1, lng_quick = 1,
      int_quick = 1, shrt_quick = 1}, mode = 0, built = 4, box = {N =
220980.44196085163, S = 220580.34848866172,
      E = 639267.43815087667, W = 638573.15113030211, T = 0, B = 0},
Node = 0x60e4a0, Line = 0x60ec00,
    Area = 0x60f090, Isle = 0x60f0b0, n_nodes = 14, n_edges = 0,
n_lines = 11, n_areas = 0, n_isles = 0,
    n_volumes = 0, n_holes = 0, n_plines = 0, n_llines = 11, n_blines
= 0, n_clines = 0, n_flines = 0, n_klines = 0,
    alloc_nodes = 14, alloc_edges = 0, alloc_lines = 11, alloc_areas =
0, alloc_isles = 0, alloc_volumes = 0,
    alloc_holes = 0, Node_offset = 142, Edge_offset = 0, Line_offset =
766, Area_offset = 1437, Isle_offset = 1437,
    Volume_offset = 0, Hole_offset = 0, Spidx_built = 0,
Node_spidx_offset = 0, Edge_spidx_offset = 0,
    Line_spidx_offset = 0, Area_spidx_offset = 0, Isle_spidx_offset =
0, Volume_spidx_offset = 0,
    Hole_spidx_offset = 0, Node_spidx = 0x60da70, Line_spidx =
0x60dc80, Area_spidx = 0x60de90,
    Isle_spidx = 0x60e0a0, update_cidx = 0, n_cidx = 1, a_cidx = 1,
cidx = 0x60f4b0, cidx_up_to_date = 1,
    coor_size = 1833, coor_mtime = 140736402139392, do_uplist = 0,
uplines = 0x2ac500000000, alloc_uplines = 0,
    n_uplines = 0, upnodes = 0x7fffbf41a8c8, alloc_upnodes =
-345345192, n_upnodes = 10949}, graph_line_type = 0,
  graph = {iErrno = -215078720, Version = 197 '�', Endian = 42 '*',
NodeAttrSize = 47029678922040,
    EdgeAttrSize = 47029546439616, aOpaqueSet = {47029548642336,
47029546473529, 47029546440546, 47029681037800, 13,
      47, 2659860426, 47029546473529, 4169033597, 47029681037968, 34,
47029546473529, 1928641016, 47029681037968, 34,
      47}, cNode = 1525626798, cHead = 47029546474570, cTail =
140736402139392, cAlone = 1525626798,
    cEdge = 200777247368, nnCost = 47029546473529, Flags =
140736402139424, nFamily = 47029546473529, nOptions = 13,
    pNodeTree = 0x2ac5eb695839, pEdgeTree = 0x22, pNodeBuffer =
0x2ac5f36ea1e8 "", iNodeBuffer = 13,
    pEdgeBuffer = 0x2f <Address 0x2f out of bounds>, iEdgeBuffer =
226653584, edgePrioritizer = {cEdge = -345416630,
      iEdge = 10949, pEdgePri32Item = 0x10308716da, pvAVL =
0xd827590}, nodePrioritizer = {pvAVL = 0x10bf41a980}},
  spCache = {nStartNode = 3541462, NodeHeap = {index =
140736402139536, count = 140736402139904,
      block = 140736402139928, pnode = 0x2ac5edb47aa0}, pvVisited =
0x0, pvPredist = 0x2ac5f36ea2a8},
  edge_fcosts = 0x25, edge_bcosts = 0x2ac5f36ea218, node_costs = 0x13,
cost_multip = -345417671, open = 1428335138,
  mode = 0, level = 2, head_only = 0, support_updated = 0, next_line =
1, name = 0x60d6d0 "bldg_resid",
---Type <return> to continue, or q <return> to quit---
  mapset = 0x60d760 "neteler", location = 0x60d780 "nc_spm_07",
gisdbase = 0x60d7a0 "/home/neteler/grassdata",
  Constraint_region_flag = 0, Constraint_type_flag = 0, Constraint_N =
3.1293275214595779e-313,
  Constraint_S = 2.69003862903306e-316, Constraint_E = 6.9533021416522296e-310,
  Constraint_W = 6.9533021416704112e-310, Constraint_T = 6.953302141671597e-310,
  Constraint_B = 2.3235695423668155e-310, Constraint_type = 0, proj =
0, dig_fp = {file = 0x60d7e0, start = 0x0,
    current = 0x0, end = 0x0, size = 0, alloc = 0, loaded = 0}, head =
{organization = 0x60cc00 "NC OneMap",
    date = 0x60cc20 "Mar 16 7", your_name = 0x60cc40 "helena",
    map_name = 0x60da20 "Raleigh detailed planimetrics, tile P079215
(polygon map)", source_date = 0x60d7c0 "",
    orig_scale = 2400, line_3 = 0x60cc80 "", plani_zone = 0,
digit_thresh = 0, Version_Major = 5, Version_Minor = 1,
    Back_Major = 5, Back_Minor = 1, with_z = 1, size = 1833, head_size
= 14, port = {byte_order = 0,
      dbl_cnvrt = "\000\001\002\003\004\005\006\a", flt_cnvrt =
"\000\001\002\003", lng_cnvrt = "\000\001\002\003",
      int_cnvrt = "\000\001\002\003", shrt_cnvrt = "\000\001",
dbl_quick = 1, flt_quick = 1, lng_quick = 1,
      int_quick = 1, shrt_quick = 1}, last_offset = 14, recycle =
0x4010a6, Map = 0x2ac5edb53cb0}, fInfo = {
    i = 4196368, ogr = {dsn = 0x100000000 <Address 0x100000000 out of bounds>,
      layer_name = 0x10000079c <Address 0x10000079c out of bounds>, ds
= 0x605de0, layer = 0x2ac5eb6a7358,
      lines = 0x7fffbf41acc0, lines_types = 0x7fffbf41ac70,
lines_alloc = -163754450, lines_num = 0,
      lines_next = -1086215032, feature_cache = 0x0, feature_cache_id
= -345416110, offset = 0x0,
      offset_num = -210853080, offset_alloc = 10949, next_line = 1}},
hist_fp = 0x60f5d0, site_att = 0x1,
  n_site_att = -322980616, n_site_dbl = 64, n_site_str = 6319952}
        Out = {format = 0, temporary = 10949, dblnk = 0x60cbe0, plus =
{Version_Major = 0, Version_Minor = 0,
    Back_Major = 0, Back_Minor = 0, spidx_Version_Major = -336171008,
spidx_Version_Minor = 10949,
    spidx_Back_Major = -336169744, spidx_Back_Minor = 10949,
cidx_Version_Major = -306958336,
    cidx_Version_Minor = 10949, cidx_Back_Major = 0, cidx_Back_Minor =
0, with_z = 0, spidx_with_z = 0,
    head_size = -142372820221952, spidx_head_size =
6164256717578567680, cidx_head_size = 140736402139280,
    release_support = 0, port = {byte_order = 32767, dbl_cnvrt =
"8\020\027��*\000", flt_cnvrt = "\000\000\000",
      lng_cnvrt = "\000\000\000", int_cnvrt = "`�A�", shrt_cnvrt =
"�\177", dbl_quick = 0, flt_quick = 0,
      lng_quick = -345408307, int_quick = 10949, shrt_quick = 0},
spidx_port = {byte_order = 0,
      dbl_cnvrt = "\000\000\000\000\000\000\000", flt_cnvrt =
"\000\000\000", lng_cnvrt = "\000\000\000",
      int_cnvrt = "�\231i�", shrt_cnvrt = "�*", dbl_quick =
-1086216048, flt_quick = 32767, lng_quick = -345408368,
      int_quick = 10949, shrt_quick = -1086215985}, cidx_port =
{byte_order = 32767, dbl_cnvrt = "�A��\177\000",
---Type <return> to continue, or q <return> to quit---
      flt_cnvrt = "��A�", lng_cnvrt = "�\177\000", int_cnvrt =
"\030{\212�", shrt_cnvrt = "�*",
      dbl_quick = -333873617, flt_quick = 10949, lng_quick = 2,
int_quick = 0, shrt_quick = -1086215936},
    mode = 32767, built = 0, box = {N = 0, S = 0, E = 0, W = 0, T = 0,
B = 0}, Node = 0x0, Line = 0x0, Area = 0x0,
    Isle = 0x0, n_nodes = 0, n_edges = 0, n_lines = 0, n_areas = 0,
n_isles = 0, n_volumes = 0, n_holes = 0,
    n_plines = 0, n_llines = 0, n_blines = 0, n_clines = 0, n_flines =
0, n_klines = 0, alloc_nodes = 0,
    alloc_edges = 0, alloc_lines = 0, alloc_areas = 0, alloc_isles =
0, alloc_volumes = 0, alloc_holes = 0,
    Node_offset = 0, Edge_offset = 0, Line_offset = 0, Area_offset =
0, Isle_offset = 0, Volume_offset = 0,
    Hole_offset = 0, Spidx_built = 0, Node_spidx_offset = 0,
Edge_spidx_offset = 0, Line_spidx_offset = 0,
    Area_spidx_offset = 0, Isle_spidx_offset = 0, Volume_spidx_offset
= 0, Hole_spidx_offset = 0,
    Node_spidx = 0x60c1b0, Line_spidx = 0x60c3c0, Area_spidx =
0x60c5d0, Isle_spidx = 0x60c7e0, update_cidx = 0,
    n_cidx = 0, a_cidx = 5, cidx = 0x60c9f0, cidx_up_to_date = 0,
coor_size = 624, coor_mtime = 0, do_uplist = 0,
    uplines = 0x7fffbf41a890, alloc_uplines = -345408368, n_uplines =
10949, upnodes = 0x7fffbf41a8cf,
    alloc_upnodes = -1086216000, n_upnodes = 32767}, graph_line_type =
-1086216008, graph = {iErrno = 5,
    Version = 0 '\0', Endian = 0 '\0', NodeAttrSize = 47029584934376,
EdgeAttrSize = 47029546484906, aOpaqueSet = {
      47029555721456, 47029555720192, 47029568911792, 47029584932864,
0, 140736402137888, 3, -142372732141568,
      6164256717578567680, 27455186257, 0, 140736402139280,
140736402139392, 47029550999224, 0, 140736402138128},
    cNode = 10, cHead = 47029546482893, cTail = 0, cAlone = 3430256,
cEdge = 0, nnCost = 47029546490342,
    Flags = 140736402139280, nFamily = 47029546482832, nOptions =
140736402139343, pNodeTree = 0x7fffbf41a8c0,
    pEdgeTree = 0x7fffbf41a8b8, pNodeBuffer = 0x5 <Address 0x5 out of
bounds>, iNodeBuffer = 47029584934288,
    pEdgeBuffer = 0x2ac5eb6984aa "H\213\225
���D\213\032E\205�\017\204�����\023H\213\205
���D\213\020E\205�\017\204����H\213\235 ���H\213[\020H\205�H\211\235
���u��\2054���", iEdgeBuffer = 47029546551104, edgePrioritizer = {
      cEdge = -336171008, iEdge = 10949, pEdgePri32Item =
0x2ac5ebf674f0, pvAVL = 0x2ac5edb43000}, nodePrioritizer = {
      pvAVL = 0x0}}, spCache = {nStartNode = 140736402138128, NodeHeap
= {index = 10, count = -142372700684288,
      block = 6164256717578567680, pnode = 0x5810005020040024},
pvVisited = 0x800600284244ca80,
    pvPredist = 0x80402000421810}, edge_fcosts = 0x10408a51005009,
edge_bcosts = 0x1011000008000000,
  node_costs = 0xc82100b180400840, cost_multip = -1601978046, open =
1428335138, mode = 2, level = 1, head_only = 0,
  support_updated = 0, next_line = 642122777, name = 0x60bc40
"bldg_resid_3d", mapset = 0x60bc60 "neteler",
  location = 0x60bc80 "nc_spm_07", gisdbase = 0x60bca0
"/home/neteler/grassdata", Constraint_region_flag = 0,
  Constraint_type_flag = 0, Constraint_N = 6.95330214163721e-310,
Constraint_S = 3.1166095717434172e-317,
  Constraint_E = 0, Constraint_W = 5.9287877500949585e-323,
Constraint_T = 2.3235702254133614e-310,
---Type <return> to continue, or q <return> to quit---
  Constraint_B = 2.3235683257686009e-310, Constraint_type =
-345340096, proj = 10949, dig_fp = {file = 0x60bcc0,
    start = 0x0, current = 0x0, end = 0x0, size = 0, alloc = 0, loaded
= 0}, head = {organization = 0x60ac20 "",
    date = 0x60ac40 "", your_name = 0x60a3c0 "neteler", map_name = 0x60ac60 "",
    source_date = 0x60b3b0 "Wed Aug 27 01:38:13 2008", orig_scale = 1,
line_3 = 0x60b3e0 "", plani_zone = 0,
    digit_thresh = 0, Version_Major = 5, Version_Minor = 1, Back_Major
= 5, Back_Minor = 1, with_z = 1, size = 0,
    head_size = 14, port = {byte_order = 0, dbl_cnvrt =
"\000\001\002\003\004\005\006\a",
      flt_cnvrt = "\000\001\002\003", lng_cnvrt = "\000\001\002\003",
int_cnvrt = "\000\001\002\003",
      shrt_cnvrt = "\000\001", dbl_quick = 1, flt_quick = 1, lng_quick
= 1, int_quick = 1, shrt_quick = 1},
    last_offset = 0, recycle = 0x0, Map = 0x0}, fInfo = {i = 1226833920, ogr = {
      dsn = 0x558bd6d333960000 <Address 0x558bd6d333960000 out of
bounds>, layer_name = 0x6040c8 "\001", ds = 0x0,
      layer = 0x0, lines = 0x1, lines_types = 0x2ac5edb43000,
lines_alloc = -1086219696, lines_num = 32767,
      lines_next = 0, feature_cache = 0x401084, feature_cache_id =
-345406566, offset = 0x1, offset_num = -322979408,
      offset_alloc = 10949, next_line = -1086216912}}, hist_fp =
0x60bf70, site_att = 0x40107a,
  n_site_att = -345406566, n_site_dbl = 10949, n_site_str = 1}
        Points = (struct line_pnts *) 0x60a130
        Cats = (struct line_cats *) 0x60ac00
        window = {format = 0, compressed = -1, rows = 750, rows3 =
750, cols = 700, cols3 = 700, depths = 1,
  proj = 99, zone = 0, ew_res = 1, ew_res3 = 1, ns_res = 1, ns_res3 =
1, tb_res = 1, north = 220750, south = 220000,
  east = 639000, west = 638300, top = 1, bottom = 0}
        Clist = (struct cat_list *) 0x606f50
        i = 1
        only_type = 67
        cat = 49
        ctype = 0
        fdrast = 11
        areanum = 1
        nelements = 11
        line = 1
        type = 2
        area = 1
---Type <return> to continue, or q <return> to quit---
        trace = 1
        centroid = 0
        objheight = 10
        voffset = 0
        Fi = (struct field_info *) 0x403585
        driver = (dbDriver *) 0x0
        query =
"�t���*\000\000h�\204��*\000\000\000����*\000\000�����*\000\000h����*\000\000\000\200f��*\000\000�\204f��*\000\000�����*\000\000h\211f��*\000\000\000����*\000\000��*\000\000\210����*\000\000\0000���*",
'\0' <repeats 20 times>,
"�5\203~��\000\000\2263��\213UH����*\000\000\000\000\000\000\000\000\000\000�\234A��\177\000\000\001\000\000\000\000\000\000\000�|i��*",
'\0' <repeats 26 times>,
"�\231i��*\000\000\220�A��\177\000\000\220|i��*\000\000Ϩ"...
        sql = {string = 0x2ac5ef84e000 "", nalloc = -276503368}
        cursor = {token = -294109184, driver = 0x2ac5ee7844c0, table =
0x2ac5ee784980, column_flags = 0x2ac5ef1ce000,
  type = -283319104, mode = 10949}
        table = (dbTable *) 0x2ac5eb8a6c00
        column = (dbColumn *) 0x403540
        value = (dbValue *) 0x0
        more = 10949
        comment = 0x2ac5ee0a04b8 ""
(gdb)

Markus


More information about the grass-dev mailing list