Bug#758685: gmt: pscoast segfaults with gmt-gshhs-low

Hamish B hamish.webmail at gmail.com
Wed Aug 20 03:19:28 UTC 2014


Hi,

a bit more info--

updating to the latest versions of the data files (2.3.2) does not help.

http://www.soest.hawaii.edu/pwessel/gshhg/
http://www.soest.hawaii.edu/pwessel/gshhg/gshhg-gmt-2.3.2.tar.gz

--


I rebuild the sid package with -g -O0 and commented out dh_strip.

Here's a full backtrace:

*** Error in `/usr/lib/gmt/bin/pscoast': double free or corruption (!prev):
0x0000000000688a50 ***

Program received signal SIGABRT, Aborted.
0x00007ffff6c81407 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6c81407 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6c827e8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6cbf344 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6cc4b1e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff6cc5826 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff7919449 in GMT_free (addr=0x688a50) at gmt_support.c:2634
#6  0x00007ffff78d427c in GMT_graticule_path (x=0x686470, y=0x686478,
dir=1, w=310, e=320, s=70, n=80) at gmt_map.c:4475
#7  0x00007ffff790179e in GMT_assemble_shore (c=0x7fffffff17c0, dir=1,
assemble=1, shift=0, west=-180, east=180, pol=0x7fffffff1478)
    at gmt_shore.c:667
#8  0x0000000000405ca7 in main (argc=5, argv=0x7fffffffe148) at
pscoast.c:774

(gdb) bt full
#0  0x00007ffff6c81407 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007ffff6c827e8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x00007ffff6cbf344 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#3  0x00007ffff6cc4b1e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#4  0x00007ffff6cc5826 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#5  0x00007ffff7919449 in GMT_free (addr=0x688a50) at gmt_support.c:2634
No locals.
#6  0x00007ffff78d427c in GMT_graticule_path (x=0x686470, y=0x686478,
dir=1, w=310, e=320, s=70, n=80) at gmt_map.c:4475
        xtmp = 0x688a50
        ytmp = 0x694d00
        add = 0
        n_alloc = 6174
        np = 40
        xx = 0x694db0
        yy = 0x688b00
        px0 = 310
        px1 = 320
        px2 = 320
        px3 = 310
#7  0x00007ffff790179e in GMT_assemble_shore (c=0x7fffffff17c0, dir=1,
assemble=1, shift=0, west=-180, east=180, pol=0x7fffffff1478)
    at gmt_shore.c:667
        p = 0x686450
        start_side = 140737488294800
        next_side = 0
        id = 0
        P = 0
        more = -4577451624384954368
        p_alloc = 1
        wet_or_dry = 1
        use_this_level = 1
        high_seg_level = 1
        n_alloc = 0
        cid = 67
        nid = 114224
        add = 0
        first_pos = 140737334367632
        entry_pos = 4294967296
        n = 0
        low_level = 4
        high_level = 1
        fid = 140737353955136
        nseg_at_level = {0, 0, 0, 0, 0}
        completely_inside = 1
        xtmp = 0x0
        ytmp = 0x0
        plon = 6.9533558074342183e-310
        plat = 2.0764195710899237e-317
#8  0x0000000000405ca7 in main (argc=5, argv=0x7fffffffe148) at
pscoast.c:774
        i = 5
        np = 65
        ind = 67
        bin = 67
        base = 3
        anti_bin = -1
        np_new = 65
        k = 65
        last_k = 0
        err = 0
        level_to_be_painted = 1
        direction = 1
        start_direction = 1
        stop_direction = 1
        last_pen_level = -1
        n_blevels = 0
        n_rlevels = 0
        bin_trouble = -1
        n = 1
        river_use = {140737488347120, 140737353994240, 0, 140737353977624,
140737354014720, 4198799, 140737333546360, 4197056,
          4294967296, 4294969392, 0}
        border_use = {140737333493032, 140737333543336, 140737488347136}
        error = 0
        shift = 0
        need_coast_base = 1
        recursive = 1
        greenwich = 0
        possibly_donut_hell = 0
        fill_in_use = 0
        clobber_background = 0
        paint_polygons = 1
        donut = 140737488346864
        dumping = 0
        donut_hell = 0
        world_map_save = 1
        clipping = 0
        west = 0
        east = 360
        south = -90
        north = 90
        bin_x = {6.9533558074239417e-310, 6.9533490674750641e-310, 0,
2.0410903428666442e-314, 2.9643938750474793e-323}
        bin_y = {6.9533558074231512e-310, 6.9533558074112936e-310,
6.953347455435501e-310, 6.9533474557461695e-310,
          6.9533558074247322e-310}
        out = {6.9533491686757161e-310, 6.9533490675945292e-310}
        west_border = -180
        east_border = 180
        anti_lon = 0
        anti_lat = -90
        edge = 720
        xtmp = 0x0
        ytmp = 0x0
        step = 0.53168286387230679
        left = 6.9533491762143674e-310
        right = 6.9533558074393566e-310
        anti_x = 9.9967093593958416e-317
        anti_y = 6.9533491686757161e-310
        x_0 = 6.9533490674750641e-310
        y_0 = 5.434722104253712e-323
        x_c = 1.3178318464420269e-314
        y_c = 6.9533481566209754e-310
        dist = 6.9533558074373803e-310
        string = 0x0
        comment = "Bin #
67\000U\336\367\377\177\000\000\000\000\000\000\000\000\000\000@
\335\377\377\377\177\000\000\220\303\335\367\377\177\000\000\310\304\335\367\377\177\000\000P\336\377\377\377\177\000\000\245\226\n\001\000\000\000\000@\336\377\377\377\177\000\000\027\341/\261",
'\000' <repeats 12 times>,
"\240u\375\367\377\177\000\000\370\331\377\367\377\177\000\000\235\345\305\366\377\177\000\000\060\306\335\367\377\177\000\000\320\375\304\366\377\177\000\000\000\000\000\000\001\000\000\000\r\000\000\000\001\000\000\000\260\336\377\377\377\177\000\000\240u\375\367\377\177\000\000\340\336\377\377\377\177\000\000X#\376\367\377\177\000\000\b\337\377\377\377\177\000\000\\L\336\367\377\177\000\000\001\000\000\000\000\000\000\000"...
        shore_resolution = {0x407cb0 "full", 0x407cb5 "high", 0x407cba
"intermediate", 0x407cc7 "low", 0x407ccb "crude"}
        fill = {{use_pattern = 0, rgb = {255, 255, 255}, pattern_no = 0,
dpi = 0, inverse = 0, f_rgb = {0, 0, 0}, b_rgb = {255, 255,
              255}, pattern = '\000' <repeats 8191 times>}, {use_pattern =
0, rgb = {211, 211, 211}, pattern_no = 0, dpi = 0,
            inverse = 0, f_rgb = {0, 0, 0}, b_rgb = {255, 255, 255},
pattern = '\000' <repeats 8191 times>}, {use_pattern = 0, rgb = {
              255, 255, 255}, pattern_no = 0, dpi = 0, inverse = 0, f_rgb =
{0, 0, 0}, b_rgb = {255, 255, 255},
            pattern = '\000' <repeats 8191 times>}, {use_pattern = 0, rgb =
{211, 211, 211}, pattern_no = 0, dpi = 0, inverse = 0,
            f_rgb = {0, 0, 0}, b_rgb = {255, 255, 255}, pattern = '\000'
<repeats 8191 times>}, {use_pattern = 0, rgb = {255, 255,
              255}, pattern_no = 0, dpi = 0, inverse = 0, f_rgb = {0, 0,
0}, b_rgb = {255, 255, 255},
            pattern = '\000' <repeats 8191 times>}, {use_pattern = 0, rgb =
{255, 255, 255}, pattern_no = 0, dpi = 0, inverse = 0,
            f_rgb = {0, 0, 0}, b_rgb = {255, 255, 255}, pattern = '\000'
<repeats 8191 times>}}
        pen = {width = 0, offset = 0, rgb = {0, 0, 0}, texture = '\000'
<repeats 127 times>}
        c = {nb = 648, bins = 0x6542d0, min_level = 0, max_level = 4, flag
= 0, fraction = 0, min_area = 0,
          scale = 0.00015259021896696422, ns = 0, node_level =
"\001\001\001\001", seg = 0x687100, side = {0x688a30, 0x688a10,
            0x6889f0, 0x6889d0}, nside = {1, 1, 1, 1}, n_entries = 0,
leftmost_bin = 0, skip_feature = 0, bsize = 10, lon_sw = 310,
          lat_sw = 70, lon_corner = {320, 320, 310, 310}, lat_corner = {70,
80, 80, 70}, bin_size = 600, bin_nx = 36, bin_ny = 18,
          n_poly = 10695, n_bin = 648, n_seg = 12154, n_pt = 93377, n_nodes
= 0, GSHHS_node = 0x0, bin_firstseg = 0x67fe00,
          bin_info = 0x67f3c0, bin_nseg = 0x67f8e0, GSHHS_parent =
0x655720, GSHHS_area = 0x65fe50, GSHHS_area_fraction = 0x674c90,
          units = "1/65535 of 10 degrees relative to south-west corner of
bin", '\000' <repeats 21 times>,
          title = "Derived from World Vector Shoreline and CIA WDB-II
data", '\000' <repeats 24 times>,
          source = "Processed by Paul Wessel and Walter H. F. Smith,
1994-2011", '\000' <repeats 21 times>,
          version = "2.2.0\000\000", cdfid = 65536, bin_size_id = 0,
bin_nx_id = 1, bin_ny_id = 2, n_poly_id = 4, n_bin_id = 3,
          n_seg_id = 5, n_pt_id = 6, n_node_id = 7, bin_firstseg_id = 12,
bin_info_id = 13, bin_nseg_id = 14, seg_info_id = 15,
          seg_start_id = 16, seg_GSHHS_ID_id = 17, GSHHS_parent_id = 8,
GSHHS_area_id = 9, GSHHS_areafrac_id = 10,
          GSHHS_node_id = 11, pt_dx_id = 18, pt_dy_id = 19}
        b = {nb = 0, bins = 0x0, scale = 0, ns = 0, seg = 0x0, lon_sw = 0,
lat_sw = 0, bsize = 0, bin_size = 0, bin_nx = 0,
          bin_ny = 0, n_bin = 0, n_seg = 0, n_pt = 0, bin_firstseg = 0x0,
bin_nseg = 0x0, units = '\000' <repeats 79 times>,
          title = '\000' <repeats 79 times>, source = '\000' <repeats 79
times>, version = "\000\000\000\000\000\000\000", cdfid = 0,
          bin_size_id = 0, bin_nx_id = 0, bin_ny_id = 0, n_bin_id = 0,
n_seg_id = 0, n_pt_id = 0, bin_firstseg_id = 0,
          bin_nseg_id = 0, seg_n_id = 0, seg_level_id = 0, seg_start_id =
0, pt_dx_id = 0, pt_dy_id = 0}
        r = {nb = 0, bins = 0x0, scale = 0, ns = 0, seg = 0x0, lon_sw = 0,
lat_sw = 0, bsize = 0, bin_size = 0, bin_nx = 0,
          bin_ny = 0, n_bin = 0, n_seg = 0, n_pt = 0, bin_firstseg = 0x0,
bin_nseg = 0x0, units = '\000' <repeats 79 times>,
          title = '\000' <repeats 79 times>, source = '\000' <repeats 79
times>, version = "\000\000\000\000\000\000\000", cdfid = 0,
          bin_size_id = 0, bin_nx_id = 0, bin_ny_id = 0, n_bin_id = 0,
n_seg_id = 0, n_pt_id = 0, bin_firstseg_id = 0,
          bin_nseg_id = 0, seg_n_id = 0, seg_level_id = 0, seg_start_id =
0, pt_dx_id = 0, pt_dy_id = 0}
        p = 0x68b5a0
        Ctrl = 0x643bd0



(gdb) frame 8

774                             if ((np = (int)GMT_assemble_shore (&c,
direction, TRUE, shift, west_border, east_border, &p)) == 0) continue;
(gdb) list
769
770                     for (direction = start_direction; paint_polygons &&
direction <= stop_direction; direction += 2) {
771
772                             /* Assemble one or more segments into
polygons */
773
774                             if ((np = (int)GMT_assemble_shore (&c,
direction, TRUE, shift, west_border, east_border, &p)) == 0) continue;
775
776                             /* Get clipped polygons in x,y inches that
can be plotted */
777
778                             np_new = (int)GMT_prep_polygons (&p, np,
donut_hell, step, bin_trouble);

(gdb) frame 7
#7  0x00007ffff790179e in GMT_assemble_shore (c=0x7fffffff17c0, dir=1,
assemble=1, shift=0, west=-180, east=180, pol=0x7fffffff1478)
    at gmt_shore.c:667
667                     p[0].n = GMT_graticule_path (&p[0].lon, &p[0].lat,
dir, c->lon_corner[3], c->lon_corner[1], c->lat_corner[0],
c->lat_corner[2]);
(gdb) list
662             p = (struct GMT_GSHHS_POL *) GMT_memory (VNULL,
(size_t)p_alloc, sizeof (struct GMT_GSHHS_POL), "GMT_assemble_shore");
663
664             low_level = GMT_MAX_GSHHS_LEVEL;
665
666             if (completely_inside && use_this_level) {      /* Must
include path of this bin outline as first polygon */
667                     p[0].n = GMT_graticule_path (&p[0].lon, &p[0].lat,
dir, c->lon_corner[3], c->lon_corner[1], c->lat_corner[0],
c->lat_corner[2]);
668                     p[0].level = (c->node_level[0] == 2 && c->flag ==
GMT_NO_LAKES) ? 1 : c->node_level[0]; /* Any corner will do */
669                     p[0].fid = p[0].level;  /* Assumes no riverlake is
that big to contain an entire bin */
670                     p[0].interior = FALSE;
671                     P = 1;


(gdb) frame 5
#5  0x00007ffff7919449 in GMT_free (addr=0x688a50) at gmt_support.c:2634
2634            free (addr);
(gdb) list
2629    {
2630            if (!addr) return;      /* Do not try to free a NULL
pointer! */
2631    #ifdef DEBUG
2632            GMT_memtrack_sub (GMT_mem_keeper, fname, line, addr);
2633    #endif
2634            free (addr);
2635    }
2636
2637    #ifdef DEBUG
2638    GMT_LONG GMT_alloc_memory_func (void **ptr, GMT_LONG n, GMT_LONG
n_alloc, size_t element_size, char *module, char *fname, GMT_LONG line)



thanks,
Hamish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20140820/a63cc5db/attachment-0001.html>


More information about the Pkg-grass-devel mailing list