segfault when inserting transparent PNGs in emacs

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
nicolasavru
Posts: 2
Joined: 2013-03-15T03:41:38-07:00
Authentication code: 6789

segfault when inserting transparent PNGs in emacs

Post by nicolasavru »

To reproduce:
emacs -Q
(imagemagick-register-types)
(insert-image (create-image "/tmp/PNG_transparency_demonstration_2.png" 'imagemagick))

The segfault appears to happen on all PNGs with transparency. In particular, this is the image I used: http://en.wikipedia.org/wiki/File:PNG_t ... tion_2.png
PNGs without transparency are inserted fine.

Using the same version of emacs, I tested the problem with different versions of imagemagick. It appears to have began with imagemagick-6.8.2.0. imagemagick-6.8.1.9 works fine, but 6.8.2.0 and later versions (including the latest version, 6.8.3.7) do not. The ImageMagick changelog mentions some changes with regard to handling PNG transparency in 6.8.2-0. As near as I can tell, the problem was introduced between ImageMagick trunk revisions 10523 and 10826 (inclusive) and is probably in trunk/coders/png.c, which narrows it down to revisions { 10523, 10524, 10577, 10578, 10602, 10640, 10709, 10711, 10762, 10809, 10810, 10820, 10826 }.

Unfortunately I haven't been able to get emacs to compile against the trunk revisions of imagemagick (emacs just doesn't detect them and builds without imagemagick support).

I have reported this bug on the emacs bug tracker (http://lists.gnu.org/archive/html/bug-g ... 00110.html), but we haven't been able to identify anything obviously wrong on the emacs end.

Crash:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3e60b47 in AcquireQuantumInfo (image_info=0x19e9000, image=0x198bd80) at magick/quantum.c:132
132 magick/quantum.c: No such file or directory.

Backtrace:

Code: Select all

#0  0x00007ffff3e60b47 in AcquireQuantumInfo (image_info=0x19e9000, image=0x198bd80) at magick/quantum.c:132
#1  0x00007fffcee5785e in ReadOnePNGImage (mng_info=0x19ed1a0, image_info=0x19e9000, exception=0x17efe80)
    at coders/png.c:3055
#2  0x00007fffcee5931b in ReadPNGImage (image_info=0x19e9000, exception=0x17efe80) at coders/png.c:3824
#3  0x00007ffff3d63c30 in ReadImage (image_info=0x1998bc0, exception=0x17efe80) at magick/constitute.c:541
#4  0x00007ffff42d302b in MagickReadImage (wand=0x19ad300, filename=
    0x18a3c38 "/tmp/PNG_transparency_demonstration_2.png") at wand/magick-image.c:8654
#5  0x00000000006afda3 in imagemagick_load_image (f=0x1212a68, img=0x18ce520, contents=0x0, size=0, filename=
    0x18a3c38 "/tmp/PNG_transparency_demonstration_2.png") at image.c:7685
#6  0x00000000006b0960 in imagemagick_load (f=0x1212a68, img=0x18ce520) at image.c:7978
#7  0x00000000006a5f07 in lookup_image (f=0x1212a68, spec=16608598) at image.c:1697
#8  0x000000000043e8de in handle_single_display_spec (it=0x7fffffff8590, spec=16608598, object=13241813, 
    overlay=13215010, position=0x7fffffff86d8, bufpos=192, display_replaced_p=0, frame_window_p=1)
    at xdisp.c:5017
#9  0x000000000043d1eb in handle_display_spec (it=0x7fffffff8590, spec=16608598, object=13241813, overlay=
    13215010, position=0x7fffffff86d8, bufpos=192, frame_window_p=1) at xdisp.c:4544
#10 0x000000000043ced7 in handle_display_prop (it=0x7fffffff8590) at xdisp.c:4467
#11 0x0000000000439ec9 in handle_stop (it=0x7fffffff8590) at xdisp.c:3219
#12 0x0000000000447195 in next_element_from_buffer (it=0x7fffffff8590) at xdisp.c:7924
#13 0x000000000044331f in get_next_display_element (it=0x7fffffff8590) at xdisp.c:6591
#14 0x00000000004682a8 in display_line (it=0x7fffffff8590) at xdisp.c:19256
#15 0x000000000045ebc3 in try_window (window=18954877, pos=..., flags=1) at xdisp.c:16120
#16 0x000000000045cc81 in redisplay_window (window=18954877, just_this_one_p=0) at xdisp.c:15650
#17 0x0000000000456696 in redisplay_window_0 (window=18954877) at xdisp.c:13691
#18 0x00000000005fe97c in internal_condition_case_1 (bfun=0x456645 <redisplay_window_0>, arg=18954877, 
    handlers=13412822, hfun=0x4565ed <redisplay_window_error>) at eval.c:1231
#19 0x00000000004565ba in redisplay_windows (window=18954877) at xdisp.c:13671
#20 0x00000000004555b6 in redisplay_internal () at xdisp.c:13277
#21 0x000000000044e699 in resize_echo_area_exactly () at xdisp.c:10222
#22 0x0000000000555bf3 in command_loop_1 () at keyboard.c:1605
#23 0x00000000005fe7d8 in internal_condition_case (bfun=0x5552c9 <command_loop_1>, handlers=13266322, hfun=
    0x554a1a <cmd_error>) at eval.c:1193
#24 0x0000000000554eb6 in command_loop_2 (ignore=13215010) at keyboard.c:1173
#25 0x00000000005fe0d5 in internal_catch (tag=13262002, func=0x554e81 <command_loop_2>, arg=13215010)
    at eval.c:964
#26 0x0000000000554e52 in command_loop () at keyboard.c:1152
#27 0x0000000000554436 in recursive_edit_1 () at keyboard.c:785
#28 0x0000000000554623 in Frecursive_edit () at keyboard.c:849
#29 0x0000000000551f0d in main (argc=2, argv=0x7fffffffc5a8) at emacs.c:1530
Full backtrace:

Code: Select all

#0  0x00007ffff3e60b47 in AcquireQuantumInfo (image_info=0x19e9000, image=0x198bd80) at magick/quantum.c:132
        status = MagickFalse
        quantum_info = 0x0
        __func__ = "AcquireQuantumInfo"
#1  0x00007fffcee5785e in ReadOnePNGImage (mng_info=0x19ed1a0, image_info=0x19e9000, exception=0x17efe80)
    at coders/png.c:3055
        quantum_info = 0x7fff00000000
        found_transparent_pixel = MagickFalse
        image = 0x198bd80
        intent = 0
        num_raw_profiles = 0
        num_text = 0
        num_text_total = 0
        num_passes = 1
        number_colors = 0
        pass = 0
        ping_bit_depth = 8
        ping_color_type = 2
        ping_file_depth = 8
        ping_interlace_method = 0
        ping_compression_method = 0
        ping_filter_method = 0
        ping_num_trans = 0
        unit_type = 64
        file_gamma = 0.45454543828964233
        transparent_color = {red = 65537, green = 65537, blue = 65537, opacity = 65537, index = 14637632}
        logging = MagickFalse
        ping_found_cHRM = MagickFalse
        ping_found_gAMA = MagickFalse
        ping_found_iCCP = MagickFalse
        ping_found_sRGB = MagickTrue
        ping_found_sRGB_cHRM = MagickFalse
        status = MagickFalse
        ping_trans_alpha = 
    0x7ffff3e8761b <AcquireSemaphoreMemory+172> "\205\300t\bH\307", <incomplete sequence \340>
        ping_background = 0x0
        ping_trans_color = 0x7ffff190b44c <posix_memalign+76>
        end_info = 0x17edff0
        ping_info = 0xdf5f90
        ping = 0xdf5a90
        text = 0x7ffff190992f <memalign+143>
        ping_height = 600
        ping_width = 800
        x_resolution = 0
        y_resolution = 0
        ping_rowbytes = 2400
        y = 0
        p = 0x7fffffffc5a0 "\002"
        indexes = 0x0
        i = 0
        x = 0
        q = 0x7fffc9118040
        length = 140737488340384
        row_offset = 0
        j = 20560
        ping_pixels = 
    0x19f8010 "\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\22
6\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\
226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\226\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"...
        unused_chunks = "hIST\000iTXt\000pCAL\000sCAL\000sPLT\000tIME\000acTL\000fcTL\000fdAT"
        __func__ = "ReadOnePNGImage"
#2  0x00007fffcee5931b in ReadPNGImage (image_info=0x19e9000, exception=0x17efe80) at coders/png.c:3824
        image = 0x198bd80
        previous = 0x198bd80
        have_mng_structure = MagickTrue
        logging = MagickFalse
        status = MagickTrue
        mng_info = 0x19ed1a0
        magic_number = 
    "\211PNG\r\n\032\n\220\214\230\001\000\000\000\000\340\213\230\001\000\000\000\000PG\242\001\000\000\000\000(\000\000\000\000\000\000\000pϖ\001\000\000\000\000\320q\242\001\000\000\000\000`\213\230\001)\000\000\000Ћ\230\001\000\000\000\000\020cA\000\000\000\000\000\200\017\377\377\377\177\000\000t\v\351\363\377\177\000\000\340\067\240\001\000\000\000\000p\030\240\001\000\000\000\000\220\214\230\001\000\000\000\000PG\242\001\000\000\000\000'\000\000\000\000\000\000\000pϖ\001\000\000\000\000\340\213\230\001\000\000\000\000P\177\230\001*\000\000\000\200\214\230\001\000\000\000\000\020cA\000\000\000\000\000\340\017\377\377\377\177\000\000t\v\351\363\377\177\000\000pM\240\001\000\000\000\000\340\067\240\001\000\000\000\000p\030\240\001\000\000\000\000PG\242\001\000\000\000\000&\000\000\000\000\000\000\000pϖ\001\000\000\000\000\220\214\230\001\000\000\000\000\340\256\230\001*\000\000\000"...
        count = 8
        __PRETTY_FUNCTION__ = "ReadPNGImage"
        __func__ = "ReadPNGImage"
#3  0x00007ffff3d63c30 in ReadImage (image_info=0x1998bc0, exception=0x17efe80) at magick/constitute.c:541
        filename = 
    "/tmp/PNG_transparency_demonstration_2.png\000\000\000\000\000\000\000\250`\377\377\377\177\000\000\003", '\000' <repeats 15 times>"\375, \061\222\000\000\000\000\000\"\245\311\000\000\000\000\000\020\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000rJ\314\000\000\000\000\000\000\000\000\000\207", '\000' <repeats 11 times>, "`e\377\377\377\177\000\000rJ\314\000\000\000\000\000\260`\377\377\377\177\000\000\002\000\000\000\000\000\000\000\360\220n\000\000\000\000\000\000\210\360i\215_\252L\000\000\000\000\000\000\000\000\000\210\360i\215_\252LPd\377\377\377\177\000\000\035\370d", '\000' <repeats 13 times>, "\"\245\311\000\000\000\000\000ve\003\001\000\000\000\000\262\225\313", '\000' <repeats 21 times>, "\020"...
        magick = 
    "PNG\000\000\000\000\000\000\210\360i\215_\252L P\377\377\377\177\000\000\030\375f\000\000\000\000\000.\000\000\000\000\000\000\000\330\205\245\000\000\000\000\000\331\356C\020\365/\362\067\240e\201\001\000\000\000\001\"\246\377\000\000\000\000\000\"\245\311\000\000\000\000\000PP\377\377\377\177\000\000\266\345\003\001\000\000\000\000R\245\311\000\000\000\000\000\000\210\360i\215_\252Lf\345\003\001\000\000\000\000\062%?\001\000\000\000\000\"\245\311\000\000\000\000\000\"\245\311\000\000\000\000\000xU\377\377\377\177\000\000\"\245\311\000\000\000\000\000\001\000\000\000\000\000\000\000xU\377\377\377\177\000\000\000\000\000\000\000\000\000\000\236\020\255\364\377\177\000\000\342\270\314\000\001\000\000\000\060U\377\377\377\177\000\000\060\060\317\000\000\000\000\000\b\000\000\000\000\000\000\000\"\245\311\000\000\000\000\000\000\210\360i\000\000\000\000\273\027D\001\000\000\000\000\000\210\360i\215_\252L\350U\377\377\377\177\000\000\200\316\333\000\000\000\000\000"...
        magick_filename = 
    "/tmp/PNG_transparency_demonstration_2.png\000\377\377\377\177\000\000\000A\377\377\377\177\000\000\001", '\000' <repeats 12 times>"\340, g@\000\210\360i\215_\252L\004\000\000\000\000\000\000\000\000\003\000\000\000\000\000\000\"\245\311\000\000\000\000\000\016\000\000\000\377\377\377\377\006\355\065\001\000\000\000\000\"\245\311\000:\000\000\000\071;\271\000\000\000\000\000\071;\271", '\000' <repeats 13 times>, "\b\035\200\001\000\000\000\000\000\035\200\001", '\000' <repeats 20 times>, "5\t\301\000\000\000\000\000\226\331\003\001\000\000\000\000\006", '\000' <repeats 15 times>"\362, \260\314", '\000' <repeats 14 times>"\210, \360i\215_\252L\020F\377\377\377\177\000\000\362\260\314\000\000\000\000\000 A\377\377\377\177\000\000\005\000\000\000\000\000\000\000"...
        value = 0x7ffff3f24ad2 "..."
        delegate_info = 0x7fffffff70a0
        magick_info = 0x1a3a990
        sans_exception = 0x0
        geometry_info = {rho = 2.5197347937903574e-322, sigma = 5.9975962725912689e-317, xi = 
    -nan(0xfffffffffffff), psi = 7.2929020786435141e-304, chi = 2.1220281700514382e-314}
        image = 0x0
        next = 0x340204
        read_info = 0x19e9000
        flags = 0
        thread_support = 3
        domain = CoderPolicyDomain
        rights = ReadPolicyRights
        __PRETTY_FUNCTION__ = "ReadImage"
        __func__ = "ReadImage"
#4  0x00007ffff42d302b in MagickReadImage (wand=0x19ad300, filename=
    0x18a3c38 "/tmp/PNG_transparency_demonstration_2.png") at wand/magick-image.c:8654
        images = 0x101010101010101
        read_info = 0x1998bc0
        __PRETTY_FUNCTION__ = "MagickReadImage"
        __func__ = "MagickReadImage"
#5  0x00000000006afda3 in imagemagick_load_image (f=0x1212a68, img=0x18ce520, contents=0x0, size=0, filename=
    0x18a3c38 "/tmp/PNG_transparency_demonstration_2.png") at image.c:7685
        width = 1362764634
        height = 4909425
        status = MagickTrue
        ximg = 0x1af2d1c0
        x = 0
        y = 26957936
        image_wand = 0x19ad300
        ping_wand = 0x19ad300
        iterator = 0x17e56e1
        pixels = 0x7ffff1c46459 <close+57>
        bg_wand = 0x0
        pixel = {storage_class = UndefinedClass, colorspace = UndefinedColorspace, matte = 
    (MagickTrue | unknown: 6974084), fuzz = 7.2911220195563975e-304, depth = 25062769, red = 1.88763003e-38, 
          green = 2.52233724e-44, blue = 4.67145852e-38, opacity = 0, index = 2.42105979e-38}
        image = 13215010
        value = 7021238735354200096
        crop = 4911067
        ino = 0
        desired_width = 0
        desired_height = 16384
        rotation = 6.6261189195543357e-317
        pixelwidth = 0
#6  0x00000000006b0960 in imagemagick_load (f=0x1212a68, img=0x18ce520) at image.c:7978
        file = 25056929
        success_p = false
        file_name = 25062769
#7  0x00000000006a5f07 in lookup_image (f=0x1212a68, spec=16608598) at image.c:1697
        img = 0x18ce520
        hash = 2063766302518129916
#8  0x000000000043e8de in handle_single_display_spec (it=0x7fffffff8590, spec=16608598, object=13241813, 
    overlay=13215010, position=0x7fffffff86d8, bufpos=192, display_replaced_p=0, frame_window_p=1)
    at xdisp.c:5017
        retval = 1
        form = 13215058
        location = 13215010
        value = 16608598
        start_pos = {charpos = 192, bytepos = 192}
        valid_p = 1
#9  0x000000000043d1eb in handle_display_spec (it=0x7fffffff8590, spec=16608598, object=13241813, overlay=
    13215010, position=0x7fffffff86d8, bufpos=192, frame_window_p=1) at xdisp.c:4544
        replacing_p = 0
        rv = 1286233997
#10 0x000000000043ced7 in handle_display_prop (it=0x7fffffff8590) at xdisp.c:4467
        propval = 16608598
        object = 13241813
        overlay = 13215010
        position = 0x7fffffff86d8
        bufpos = 192
        display_replaced_p = 0
#11 0x0000000000439ec9 in handle_stop (it=0x7fffffff8590) at xdisp.c:3219
        handled = HANDLED_NORMALLY
        handle_overlay_change_p = 1
        p = 0x91ba50 <it_props+48>
#12 0x0000000000447195 in next_element_from_buffer (it=0x7fffffff8590) at xdisp.c:7924
        success_p = 1
#13 0x000000000044331f in get_next_display_element (it=0x7fffffff8590) at xdisp.c:6591
        success_p = 0
#14 0x00000000004682a8 in display_line (it=0x7fffffff8590) at xdisp.c:19256
        x_before = 0
        nglyphs = 0
        ascent = 0
        phys_ascent = 0
        n_glyphs_before = 0
        hpos_before = 0
        x = 0
        descent = 0
        phys_descent = 0
        row = 0xf24000
        overlay_arrow_string = 13215010
        wrap_it = {window = 0, w = 0x0, f = 0x0, method = GET_FROM_BUFFER, stop_charpos = 0, prev_stop = 0, 
          base_level_stop = 0, end_charpos = 0, s = 0x0, string_nchars = 0, region_beg_charpos = 0, 
          region_end_charpos = 0, redisplay_end_trigger_charpos = 0, multibyte_p = 0, header_line_p = 0, 
          string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, from_disp_prop_p = 0, ellipsis_p = 
    0, avoid_cursor_p = 0, dp = 0x0, dpvec = 0x0, dpend = 0x0, dpvec_char_len = 0, dpvec_face_id = 0, 
          saved_face_id = 0, ctl_chars = {0 <repeats 16 times>}, start = {pos = {charpos = 0, bytepos = 0}, 
            overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, current = {
            pos = {charpos = 0, bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 
    0}, dpvec_index = 0}, n_overlay_strings = 0, overlay_strings_charpos = 0, overlay_strings = {0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 13215010, 0, 0, 0, 0, 0}, string_overlays = {0 <repeats 16 times>}, string = 0, 
          from_overlay = 0, stack = {{string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, 
              prev_stop = 0, base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, 
                lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 
    0, to = 0, width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, height = 
    0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {charpos = 0, bytepos = 0}, 
              current = {pos = {charpos = 0, bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 
    0, bytepos = 0}, dpvec_index = 0}, from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {
              string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 20241158, ch = 16584290, rule_idx = 0, 
                lookback = 0, nglyphs = 1777371136, reversed_p = 141, charpos = 140737488321648, nchars = 
    5237159, nbytes = 0, from = -33680, to = 32767, width = 6336920}, face_id = 16584290, u = {image = {
                  object = 18950760, slice = {x = 19105325, y = 5524332953895733248, width = 
    140737488321712, height = 5237478}, image_id = 0}, comp = {object = 18950760}, stretch = {object = 
    18950760}}, position = {charpos = 140737488321920, bytepos = 16584290}, current = {pos = {charpos = 
    18950760, bytepos = 19105325}, overlay_string_index = 5524332953895733248, string_pos = {charpos = 
    140737488321824, bytepos = 5237762}, dpvec_index = 0}, from_overlay = 140737488321888, area = 
    4294933856, method = 32767, paragraph_embedding = (unknown: 4294935248), multibyte_p = 1, 
              string_from_display_prop_p = 1, string_from_prefix_prop_p = 1, display_ellipsis_p = 1, 
              avoid_cursor_p = 1, bidi_p = 1, from_disp_prop_p = 1, line_wrap = (unknown: 4294933888), 
              voffset = 32767, space_width = 18950760, font_height = 140737488321840}, {string = 
    77322626338, string_nchars = 13215010, end_charpos = 5524332953895733248, stop_charpos = 0, prev_stop = 
    0, base_level_stop = 140737488322080, cmp_it = {stop_pos = 5240234, id = 140737488321888, ch = -32048, 
                rule_idx = 32767, lookback = 16584290, nglyphs = 18950760, reversed_p = false, charpos = 0, 
                nchars = 0, nbytes = 1, from = 16584290, to = 0, width = 0}, face_id = -32944, u = {image = {
                  object = 0, slice = {x = 13215586, y = 13244578, width = 13244578, height = 13244578}, 
                  image_id = 13244578}, comp = {object = 0}, stretch = {object = 0}}, position = {charpos = 
    13244578, bytepos = 13244578}, current = {pos = {charpos = 13244578, bytepos = 13244578}, 
                overlay_string_index = 10850809, string_pos = {charpos = 13244578, bytepos = 13244578}, 
                dpvec_index = 13244578}, from_overlay = 13244578, area = 13244578, method = GET_FROM_BUFFER, 
              paragraph_embedding = (R2L | unknown: 13244576), multibyte_p = 0, string_from_display_prop_p = 
    0, string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = (WINDOW_WRAP | unknown: 13244576), voffset = 0, 
              space_width = 13244578, font_height = 0}, {string = 5524332953895733248, string_nchars = 
    -33104, end_charpos = 5242225, stop_charpos = 140737488322144, prev_stop = 140737488322384, 
              base_level_stop = 20913650, cmp_it = {stop_pos = 140737488323280, id = 16584290, ch = 
    18950760, rule_idx = 0, lookback = 140733193388033, nglyphs = 5237478, reversed_p = false, charpos = 0, 
                nchars = -32912, nbytes = 32767, from = 20913650, to = 0, width = 18950760}, face_id = 
    19105477, u = {image = {object = 5524332953895733248, slice = {x = 140737488322320, y = 
    5524332953895733248, width = 140737488322320, height = 5239039}, image_id = 140737488322384}, comp = {
                  object = 5524332953895733248}, stretch = {object = 5524332953895733248}}, position = {
                charpos = 140737488323280, bytepos = 140737488322416}, current = {pos = {charpos = 18950760, 
                  bytepos = 140737488322336}, overlay_string_index = 77322626338, string_pos = {charpos = 
    13215010, bytepos = 5524332953895733248}, dpvec_index = 0}, from_overlay = 0, area = 4294934544, 
              method = 32767, paragraph_embedding = (R2L | unknown: 5240232), multibyte_p = 0, 
              string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, display_ellipsis_p = 0, 
              avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = (unknown: 4294934352), 
              voffset = 32767, space_width = 140737488323280, font_height = 20913650}, {string = 18950760, 
              string_nchars = 0, end_charpos = 4294967296, stop_charpos = 20913650, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 13215586, ch = 13244578, rule_idx = 0, 
                lookback = 13244578, nglyphs = 13244578, reversed_p = false, charpos = 13244578, nchars = 
    13244578, nbytes = 0, from = 13244578, to = 0, width = 13244578}, face_id = 13244578, u = {image = {
                  object = 433804941474, slice = {x = 13244578, y = 25256648, width = 25256648, height = 
    13241808}, image_id = 0}, comp = {object = 433804941474}, stretch = {object = 433804941474}}, position = 
    {charpos = 5524332953895733248, bytepos = 140737488322608}, current = {pos = {charpos = 6749464, 
                  bytepos = 21230917}, overlay_string_index = 25256648, string_pos = {charpos = 14401121, 
                  bytepos = 72057594052329057}, dpvec_index = 13241813}, from_overlay = 5524332953895733248, 
              area = 4294934624, method = 32767, paragraph_embedding = (L2R | R2L | unknown: 6750776), 
              multibyte_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = 
    (WORD_WRAP | unknown: 13241812), voffset = 0, space_width = 5524332953895733248, font_height = 
    13241808}}, sp = 1, selective = 13215010, what = 25256648, face_id = 0, selective_display_ellipsis_p = 
    0, ctl_arrow_p = 0, face_box_p = 0, start_of_box_run_p = 1, end_of_box_run_p = 0, 
          overlay_strings_at_end_processed_p = 0, ignore_overlay_strings_at_pos_p = 1, 
          glyph_not_available_p = 1, starts_in_middle_of_char_p = 0, face_before_selective_p = 1, 
          constrain_row_ascent_descent_p = 0, line_wrap = TRUNCATE, base_face_id = 13241808, c = 0, len = 0, 
          cmp_it = {stop_pos = 5524332953895733248, id = 140737488322768, ch = 6749464, rule_idx = 0, 
            lookback = 13215010, nglyphs = 25256648, reversed_p = false, charpos = 140737488323312, nchars = 
    1777371136, nbytes = 27942797, from = 13215010, to = 0, width = 13418514}, char_to_display = -32512, 
          glyphless_method = 32767, image_id = 5524332953895733248, slice = {x = 140737488322880, y = 
    6760667, width = 13241808, height = 4294967297}, space_width = 13418514, voffset = -17114, tab_width = 
    254, font_height = 13241813, object = 13215010, position = {charpos = 13215010, bytepos = 
    5524332953895733248}, truncation_pixel_width = 3541, continuation_pixel_width = 202, first_visible_x = 
    0, last_visible_x = 25257096, last_visible_y = 0, extra_line_spacing = -32400, max_extra_line_spacing = 
    32767, override_ascent = 6760394, override_descent = 0, override_boff = -32320, glyph_row = 
    0x4caa5f8d69f08800, area = 25257096, nglyphs = 0, pixel_width = 13215010, ascent = 0, descent = -32320, 
          max_ascent = 32767, max_descent = 6778494, phys_ascent = 0, phys_descent = 772, max_phys_ascent = 
    0, max_phys_descent = 13241813, current_x = 0, continuation_lines_width = 13418514, eol_pos = {charpos = 
    4, bytepos = 140737488323056}, current_y = 1777371136, first_vpos = 1286233997, vpos = 16756136, hpos = 
    0, left_user_fringe_bitmap = 4, right_user_fringe_bitmap = 0, left_user_fringe_face_id = 0, 
          right_user_fringe_face_id = 1016336, bidi_p = 1, bidi_it = {bytepos = 6800472, charpos = 13215010, 
            ch = -32128, nchars = 140737488323192, ch_len = 140737488323184, type = 193, type_after_w1 = 
    UNKNOWN_BT, orig_type = 193, resolved_level = 0, invalid_levels = 772, invalid_rl_levels = 0, prev = {
              bytepos = 5524332953895733248, charpos = 140737488323392, type = 6811818, type_after_w1 = 
    UNKNOWN_BT, orig_type = 101}, last_strong = {bytepos = 13215010, charpos = 193, type = 78, 
              type_after_w1 = UNKNOWN_BT, orig_type = 78}, next_for_neutral = {bytepos = 140737488326136, 
              charpos = 0, type = STRONG_L, type_after_w1 = RLE, orig_type = 4294935200}, prev_for_neutral = 
    {bytepos = 2147490397464, charpos = 1, type = 25256648, type_after_w1 = UNKNOWN_BT, orig_type = 
    13215010}, next_for_ws = {bytepos = 13215010, charpos = 13366480, type = 13215010, type_after_w1 = 
    UNKNOWN_BT, orig_type = 4294935248}, next_en_pos = 5524332953895733248, next_en_type = 4294935312, 
            ignore_bn_limit = 6760514, sor = (unknown: 13241808), scan_dir = 0, disp_pos = 4294967297, 
            disp_prop = 13215586, stack_idx = 0, level_stack = {{level = 20310726, override = NEUTRAL_DIR}, {
                level = 5, override = NEUTRAL_DIR}, {level = 20310726, override = NEUTRAL_DIR}, {level = 
    13215010, override = NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {
                level = 193, override = NEUTRAL_DIR}, {level = 16756136, override = NEUTRAL_DIR}, {level = 
    -31936, override = (L2R | R2L | unknown: 32764)}, {level = 14637244, override = NEUTRAL_DIR}, {level = 
    0, override = NEUTRAL_DIR}, {level = 20310726, override = NEUTRAL_DIR}, {level = 25256592, override = 
    NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {level = -31744, override = 
    (L2R | R2L | unknown: 32764)}, {level = 4433106, override = NEUTRAL_DIR}, {level = -31840, override = 
    (L2R | R2L | unknown: 32764)}, {level = -31344, override = (L2R | R2L | unknown: 32764)}, {level = 
    -31840, override = (L2R | R2L | unknown: 32764)}, {level = 4, override = NEUTRAL_DIR}, {level = 
    13241813, override = NEUTRAL_DIR}, {level = 404, override = NEUTRAL_DIR}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = 9550392, override = NEUTRAL_DIR}, {level = 
    193, override = NEUTRAL_DIR}, {level = 193, override = NEUTRAL_DIR}, {level = 16584290, override = 
    NEUTRAL_DIR}, {level = 13215058, override = NEUTRAL_DIR}, {level = 20913650, override = NEUTRAL_DIR}, {
                level = 13215010, override = NEUTRAL_DIR}, {level = 13215010, override = NEUTRAL_DIR}, {
                level = 13215010, override = NEUTRAL_DIR}, {level = 4453601, override = NEUTRAL_DIR}, {
                level = 1, override = NEUTRAL_DIR}, {level = 1777371136, override = 
    (L2R | unknown: 1286233996)}, {level = 0, override = NEUTRAL_DIR}, {level = 4285200, override = 
    NEUTRAL_DIR}, {level = -31680, override = (L2R | R2L | unknown: 32764)}, {level = 4432012, override = 
    NEUTRAL_DIR}, {level = 0, override = NEUTRAL_DIR}, {level = -31344, override = 
    (L2R | R2L | unknown: 32764)}, {level = 1, override = NEUTRAL_DIR}, {level = 0, override = L2R}, {
                level = 9550488, override = NEUTRAL_DIR}, {level = 1777371136, override = 
    (L2R | unknown: 1286233996)}, {level = -31616, override = (L2R | R2L | unknown: 32764)}, {level = 
    4466422, override = NEUTRAL_DIR}, {level = -28872, override = L2R}, {level = 1, override = NEUTRAL_DIR}, 
    {level = 1, override = NEUTRAL_DIR}, {level = -31344, override = (L2R | R2L | unknown: 32764)}, {level = 
    1, override = NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {level = 
    -31504, override = (L2R | R2L | unknown: 32764)}, {level = 4428182, override = NEUTRAL_DIR}, {level = 
    -26480, override = NEUTRAL_DIR}, {level = 15875072, override = NEUTRAL_DIR}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = 18954872, override = NEUTRAL_DIR}, {level = 
    -31344, override = (L2R | R2L | unknown: 32764)}, {level = 1, override = NEUTRAL_DIR}, {level = -1, 
                override = (L2R | R2L | unknown: 4294967292)}, {level = 13241808, override = NEUTRAL_DIR}}, 
            string = {lstring = 5524332953895733248, s = 0xca0dd0 "E\020\003\006", schars = 128, bufpos = 
    140737488323904, from_disp_str = 0, unibyte = 0}, paragraph_dir = L2R, separator_limit = 1, 
            prev_was_pdf = 0, first_elt = 0, new_paragraph = 0, frame_window_p = 1}, paragraph_embedding = 
    (unknown: 4294935952)}
        wrap_data = 0x0
        may_wrap = 0
        wrap_x = 524
        wrap_row_used = -1
        wrap_row_ascent = -31880
        wrap_row_height = 32767
        wrap_row_phys_ascent = -34840
        wrap_row_phys_height = 32767
        wrap_row_extra_line_spacing = 13578288
        wrap_row_min_pos = 140737322234062
        wrap_row_min_bpos = 92
        wrap_row_max_pos = 13933920
        wrap_row_max_bpos = 25020896
        cvpos = -1
        min_pos = 194
        max_pos = 0
        min_bpos = 191
        max_bpos = 191
#15 0x000000000045ebc3 in try_window (window=18954877, pos=..., flags=1) at xdisp.c:16120
        w = 0x1213a78
        it = {window = 18954877, w = 0x1213a78, f = 0x1212a68, method = GET_FROM_BUFFER, stop_charpos = 193, 
          prev_stop = 192, base_level_stop = 192, end_charpos = 193, s = 0x0, string_nchars = 0, 
          region_beg_charpos = -1, region_end_charpos = -1, redisplay_end_trigger_charpos = 0, multibyte_p = 
    1, header_line_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, from_disp_prop_p = 
    1, ellipsis_p = 0, avoid_cursor_p = 0, dp = 0x0, dpvec = 0x0, dpend = 0x0, dpvec_char_len = 0, 
          dpvec_face_id = 0, saved_face_id = 0, ctl_chars = {0 <repeats 16 times>}, start = {pos = {
              charpos = 192, bytepos = 192}, overlay_string_index = -1, string_pos = {charpos = -1, 
              bytepos = -1}, dpvec_index = -1}, current = {pos = {charpos = 193, bytepos = 193}, 
            overlay_string_index = -1, string_pos = {charpos = -1, bytepos = -1}, dpvec_index = -1}, 
          n_overlay_strings = 0, overlay_strings_charpos = 191, overlay_strings = {0 <repeats 16 times>}, 
          string_overlays = {0 <repeats 16 times>}, string = 13215010, from_overlay = 13215010, stack = {{
              string = 13215010, string_nchars = 0, end_charpos = 193, stop_charpos = 193, prev_stop = 192, 
              base_level_stop = 192, cmp_it = {stop_pos = 192, id = -1, ch = -2, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {
                charpos = 193, bytepos = 193}, current = {pos = {charpos = 193, bytepos = 193}, 
                overlay_string_index = -1, string_pos = {charpos = -1, bytepos = -1}, dpvec_index = -1}, 
              from_overlay = 0, area = TEXT_AREA, method = GET_FROM_BUFFER, paragraph_embedding = L2R, 
              multibyte_p = 1, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 1, from_disp_prop_p = 0, line_wrap = 
    WINDOW_WRAP, voffset = 0, space_width = 13215010, font_height = 13215010}, {string = 0, string_nchars = 
    0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, base_level_stop = 0, cmp_it = {stop_pos = 0, id = 
    0, ch = 0, rule_idx = 0, lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, 
                nbytes = 0, from = 0, to = 0, width = 0}, face_id = 0, u = {image = {object = 0, slice = {
                    x = 0, y = 0, width = 0, height = 0}, image_id = 0}, comp = {object = 0}, stretch = {
                  object = 0}}, position = {charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, 
                  bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, 
                dpvec_index = 0}, from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {
              string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {
                charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, bytepos = 0}, 
                overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, 
              from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, paragraph_embedding = 
    NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = 
    TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {string = 0, string_nchars = 0, end_charpos = 
    0, stop_charpos = 0, prev_stop = 0, base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, 
                rule_idx = 0, lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, 
                nbytes = 0, from = 0, to = 0, width = 0}, face_id = 0, u = {image = {object = 0, slice = {
                    x = 0, y = 0, width = 0, height = 0}, image_id = 0}, comp = {object = 0}, stretch = {
                  object = 0}}, position = {charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, 
                  bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, 
                dpvec_index = 0}, from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {
              string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {
                charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, bytepos = 0}, 
                overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, 
              from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, paragraph_embedding = 
    NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = 
    TRUNCATE, voffset = 0, space_width = 0, font_height = 0}}, sp = 1, selective = 0, what = IT_IMAGE, 
          face_id = 0, selective_display_ellipsis_p = 1, ctl_arrow_p = 1, face_box_p = 0, 
          start_of_box_run_p = 0, end_of_box_run_p = 0, overlay_strings_at_end_processed_p = 0, 
          ignore_overlay_strings_at_pos_p = 0, glyph_not_available_p = 0, starts_in_middle_of_char_p = 0, 
          face_before_selective_p = 0, constrain_row_ascent_descent_p = 0, line_wrap = WINDOW_WRAP, 
          base_face_id = 0, c = 0, len = 1, cmp_it = {stop_pos = 192, id = -1, ch = -2, rule_idx = 0, 
            lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, 
            to = 0, width = 0}, char_to_display = 10, glyphless_method = GLYPHLESS_DISPLAY_THIN_SPACE, 
          image_id = 0, slice = {x = 13215010, y = 13215010, width = 13215010, height = 13215010}, 
          space_width = 13215010, voffset = 0, tab_width = 8, font_height = 13215010, object = 13241813, 
          position = {charpos = 191, bytepos = 191}, truncation_pixel_width = 0, continuation_pixel_width = 
    9, first_visible_x = 0, last_visible_x = 747, last_visible_y = 414, extra_line_spacing = 0, 
          max_extra_line_spacing = 0, override_ascent = -1, override_descent = 0, override_boff = 0, 
          glyph_row = 0xf24000, area = TEXT_AREA, nglyphs = 1, pixel_width = 9, ascent = 14, descent = 4, 
          max_ascent = 0, max_descent = 0, phys_ascent = 0, phys_descent = 0, max_phys_ascent = 0, 
          max_phys_descent = 0, current_x = 0, continuation_lines_width = 0, eol_pos = {charpos = 0, 
            bytepos = 0}, current_y = 72, first_vpos = 0, vpos = 4, hpos = 0, left_user_fringe_bitmap = 0, 
          right_user_fringe_bitmap = 0, left_user_fringe_face_id = 0, right_user_fringe_face_id = 0, 
          bidi_p = 1, bidi_it = {bytepos = 192, charpos = 192, ch = 65532, nchars = 1, ch_len = 1, type = 
    STRONG_L, type_after_w1 = NEUTRAL_ON, orig_type = NEUTRAL_ON, resolved_level = 0, invalid_levels = 0, 
            invalid_rl_levels = -1, prev = {bytepos = 191, charpos = 191, type = NEUTRAL_B, type_after_w1 = 
    NEUTRAL_B, orig_type = NEUTRAL_B}, last_strong = {bytepos = 188, charpos = 188, type = UNKNOWN_BT, 
              type_after_w1 = UNKNOWN_BT, orig_type = UNKNOWN_BT}, next_for_neutral = {bytepos = 0, 
              charpos = -1, type = UNKNOWN_BT, type_after_w1 = UNKNOWN_BT, orig_type = UNKNOWN_BT}, 
            prev_for_neutral = {bytepos = 191, charpos = 191, type = STRONG_L, type_after_w1 = NEUTRAL_ON, 
              orig_type = WEAK_CS}, next_for_ws = {bytepos = 183, charpos = 183, type = UNKNOWN_BT, 
              type_after_w1 = UNKNOWN_BT, orig_type = UNKNOWN_BT}, next_en_pos = 0, next_en_type = 
    UNKNOWN_BT, ignore_bn_limit = -1, sor = L2R, scan_dir = 1, disp_pos = 193, disp_prop = 0, stack_idx = 0, 
            level_stack = {{level = 0, override = NEUTRAL_DIR} <repeats 64 times>}, string = {lstring = 
    13215010, s = 0x0, schars = 0, bufpos = 0, from_disp_str = 0, unibyte = 0}, paragraph_dir = L2R, 
            separator_limit = 193, prev_was_pdf = 0, first_elt = 0, new_paragraph = 0, frame_window_p = 1}, 
          paragraph_embedding = L2R}
        last_text_row = 0xf23f00
        f = 0x1212a68
#16 0x000000000045cc81 in redisplay_window (window=18954877, just_this_one_p=0) at xdisp.c:15650
        d2 = 0
        d4 = 0
        d6 = 0
        d1 = 0
        d3 = 0
        d5 = 0
        w = 0x1213a78
        f = 0x1212a68
        buffer = 0xca0dd0
        old = 0xca0dd0
        lpoint = {charpos = 193, bytepos = 193}
        opoint = {charpos = 193, bytepos = 193}
        startp = {charpos = 1, bytepos = 1}
        update_mode_line = 1
        tem = 0
        it = {window = 13215010, w = 0x0, f = 0x0, method = GET_FROM_BUFFER, stop_charpos = 0, prev_stop = 
    0, base_level_stop = 0, end_charpos = 0, s = 0x0, string_nchars = 0, region_beg_charpos = 0, 
          region_end_charpos = 0, redisplay_end_trigger_charpos = 0, multibyte_p = 0, header_line_p = 0, 
          string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, from_disp_prop_p = 0, ellipsis_p = 
    0, avoid_cursor_p = 0, dp = 0x0, dpvec = 0x0, dpend = 0x0, dpvec_char_len = 0, dpvec_face_id = 0, 
          saved_face_id = 0, ctl_chars = {0 <repeats 16 times>}, start = {pos = {charpos = 0, bytepos = 0}, 
            overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, current = {
            pos = {charpos = 0, bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 
    0}, dpvec_index = 0}, n_overlay_strings = 0, overlay_strings_charpos = 0, overlay_strings = {
    0 <repeats 14 times>, 13215010, 0}, string_overlays = {0 <repeats 16 times>}, string = 0, from_overlay = 
    0, stack = {{string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {
                charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, bytepos = 0}, 
                overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, 
              from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, paragraph_embedding = 
    NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = 
    TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {string = 0, string_nchars = 0, end_charpos = 
    0, stop_charpos = 0, prev_stop = 0, base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, 
                rule_idx = 0, lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, 
                nbytes = 0, from = 0, to = 0, width = 0}, face_id = 0, u = {image = {object = 0, slice = {
                    x = 0, y = 0, width = 0, height = 0}, image_id = 0}, comp = {object = 0}, stretch = {
                  object = 0}}, position = {charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, 
                  bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, 
                dpvec_index = 0}, from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {
              string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 0}, comp = {object = 0}, stretch = {object = 0}}, position = {
                charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, bytepos = 0}, 
                overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, dpvec_index = 0}, 
              from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, paragraph_embedding = 
    NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, string_from_prefix_prop_p = 0, 
              display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, from_disp_prop_p = 0, line_wrap = 
    TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {string = 0, string_nchars = 0, end_charpos = 
    0, stop_charpos = 0, prev_stop = 0, base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, 
                rule_idx = 0, lookback = 0, nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, 
                nbytes = 0, from = 0, to = 0, width = 0}, face_id = 0, u = {image = {object = 0, slice = {
                    x = 0, y = 0, width = 0, height = 0}, image_id = 0}, comp = {object = 0}, stretch = {
                  object = 0}}, position = {charpos = 0, bytepos = 0}, current = {pos = {charpos = 0, 
                  bytepos = 0}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 0}, 
                dpvec_index = 0}, from_overlay = 0, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = NEUTRAL_DIR, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = TRUNCATE, voffset = 0, space_width = 0, font_height = 0}, {
              string = 0, string_nchars = 0, end_charpos = 0, stop_charpos = 0, prev_stop = 0, 
              base_level_stop = 0, cmp_it = {stop_pos = 0, id = 0, ch = 0, rule_idx = 0, lookback = 0, 
                nglyphs = 0, reversed_p = false, charpos = 0, nchars = 0, nbytes = 0, from = 0, to = 0, 
                width = 0}, face_id = 0, u = {image = {object = 0, slice = {x = 0, y = 0, width = 0, 
                    height = 0}, image_id = 8589934595}, comp = {object = 0}, stretch = {object = 0}}, 
              position = {charpos = 395136991232, bytepos = 1}, current = {pos = {charpos = 0, bytepos = 
    -1}, overlay_string_index = 0, string_pos = {charpos = 0, bytepos = 140737488330368}, dpvec_index = 
    -24952}, from_overlay = 140737488330360, area = LEFT_MARGIN_AREA, method = GET_FROM_BUFFER, 
              paragraph_embedding = L2R, multibyte_p = 0, string_from_display_prop_p = 0, 
              string_from_prefix_prop_p = 0, display_ellipsis_p = 0, avoid_cursor_p = 0, bidi_p = 0, 
              from_disp_prop_p = 0, line_wrap = (unknown: 92), voffset = 0, space_width = 0, font_height = 
    0}}, sp = 0, selective = 40, what = 15997632, face_id = 0, selective_display_ellipsis_p = 0, 
          ctl_arrow_p = 1, face_box_p = 0, start_of_box_run_p = 0, end_of_box_run_p = 0, 
          overlay_strings_at_end_processed_p = 0, ignore_overlay_strings_at_pos_p = 0, 
          glyph_not_available_p = 0, starts_in_middle_of_char_p = 0, face_before_selective_p = 0, 
          constrain_row_ascent_descent_p = 0, line_wrap = TRUNCATE, base_face_id = 1777371136, c = 
    1286233997, len = 13215010, cmp_it = {stop_pos = 13416914, id = 0, ch = 1777371136, rule_idx = 
    1286233997, lookback = 140737488329984, nglyphs = 6760667, reversed_p = false, charpos = 0, nchars = 0, 
            nbytes = 1, from = 13416914, to = 0, width = 13215010}, char_to_display = -24816, 
          glyphless_method = 32767, image_id = 13215010, slice = {x = 13215010, y = 5524332953895733248, 
            width = 0, height = 140737488330528}, space_width = 140737488330544, voffset = 6848, tab_width = 
    244, font_height = 1, object = 5524332953895733248, position = {charpos = 140737488330128, bytepos = 
    6769234}, truncation_pixel_width = 0, continuation_pixel_width = 0, first_visible_x = 0, 
          last_visible_x = -25160, last_visible_y = 32767, extra_line_spacing = -25160, 
          max_extra_line_spacing = 32767, override_ascent = 15997637, override_descent = 0, override_boff = 
    2, glyph_row = 0x0, area = TEXT_AREA, nglyphs = 0, pixel_width = 4285200, ascent = 0, descent = -25120, 
          max_ascent = 32767, max_descent = 1777371136, phys_ascent = 1286233997, phys_descent = 0, 
          max_phys_ascent = 0, max_phys_descent = 4285200, current_x = 0, continuation_lines_width = -25120, 
          eol_pos = {charpos = 6778434, bytepos = 8}, current_y = 15997637, first_vpos = 0, vpos = 13418514, 
          hpos = 0, left_user_fringe_bitmap = 4, right_user_fringe_bitmap = 0, left_user_fringe_face_id = 0, 
          right_user_fringe_face_id = 1023504, bidi_p = 1, bidi_it = {bytepos = 5524332953895733248, 
            charpos = 0, ch = 4285200, nchars = 140737488330288, ch_len = 6800472, type = 13215010, 
            type_after_w1 = UNKNOWN_BT, orig_type = 4294942368, resolved_level = 32767, invalid_levels = 
    -24936, invalid_rl_levels = 32767, prev = {bytepos = 140737488330384, charpos = 2, type = STRONG_R, 
              type_after_w1 = UNKNOWN_BT, orig_type = LRE}, last_strong = {bytepos = 5524332953895733248, 
              charpos = 140737488330592, type = 6811818, type_after_w1 = UNKNOWN_BT, orig_type = 101}, 
            next_for_neutral = {bytepos = 13215010, charpos = 2, type = STRONG_R, type_after_w1 = 
    UNKNOWN_BT, orig_type = STRONG_L}, prev_for_neutral = {bytepos = 140737488333336, charpos = 0, type = 
    STRONG_L, type_after_w1 = 116, orig_type = STRONG_R}, next_for_ws = {bytepos = 2147483648040, charpos = 
    1, type = 15997632, type_after_w1 = UNKNOWN_BT, orig_type = STRONG_R}, next_en_pos = 13215010, 
            next_en_type = 13366480, ignore_bn_limit = 13215010, sor = (unknown: 4294942544), scan_dir = 
    32767, disp_pos = 6774651, disp_prop = 0, stack_idx = 0, level_stack = {{level = 15997632, override = 
    NEUTRAL_DIR}, {level = 0, override = NEUTRAL_DIR}, {level = 1777371136, override = 
    (L2R | unknown: 1286233996)}, {level = -24736, override = (L2R | R2L | unknown: 32764)}, {level = 
    6769234, override = NEUTRAL_DIR}, {level = 8, override = NEUTRAL_DIR}, {level = -24696, override = 
    (L2R | R2L | unknown: 32764)}, {level = -24696, override = (L2R | R2L | unknown: 32764)}, {level = 
    15997637, override = NEUTRAL_DIR}, {level = 2, override = NEUTRAL_DIR}, {level = 0, override = 
    NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = 26938800, override = NEUTRAL_DIR}, {level = 
    0, override = NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {level = 0, 
                override = NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {
                level = -24544, override = (L2R | R2L | unknown: 32764)}, {level = 4433106, override = 
    NEUTRAL_DIR}, {level = -24640, override = (L2R | R2L | unknown: 32764)}, {level = -24144, override = 
    (L2R | R2L | unknown: 32764)}, {level = -24640, override = (L2R | R2L | unknown: 32764)}, {level = 4, 
                override = NEUTRAL_DIR}, {level = 15997637, override = NEUTRAL_DIR}, {level = 404, 
                override = NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 26938800, override = NEUTRAL_DIR}, {level = 2, override = NEUTRAL_DIR}, {level = 
    2, override = NEUTRAL_DIR}, {level = 4459331, override = NEUTRAL_DIR}, {level = 0, override = 
    NEUTRAL_DIR}, {level = -24144, override = (L2R | R2L | unknown: 32764)}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {level = -24544, override = 
    (L2R | R2L | unknown: 32764)}, {level = 4453601, override = NEUTRAL_DIR}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 1777371136, override = (L2R | unknown: 1286233996)}, {level = 0, override = 
    NEUTRAL_DIR}, {level = 4285200, override = NEUTRAL_DIR}, {level = -24480, override = 
    (L2R | R2L | unknown: 32764)}, {level = 4432012, override = NEUTRAL_DIR}, {level = 0, override = 
    NEUTRAL_DIR}, {level = -24144, override = (L2R | R2L | unknown: 32764)}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 0, override = L2R}, {level = 9550488, override = NEUTRAL_DIR}, {level = 
    1777371136, override = (L2R | unknown: 1286233996)}, {level = -24416, override = 
    (L2R | R2L | unknown: 32764)}, {level = 4466422, override = NEUTRAL_DIR}, {level = -21672, override = 
    L2R}, {level = 1, override = NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = -24144, 
                override = (L2R | R2L | unknown: 32764)}, {level = 1, override = NEUTRAL_DIR}, {level = 
    1777371136, override = (L2R | unknown: 1286233996)}, {level = -24304, override = 
    (L2R | R2L | unknown: 32764)}, {level = 4428182, override = NEUTRAL_DIR}, {level = 1, override = 
    NEUTRAL_DIR}, {level = 27044544, override = NEUTRAL_DIR}, {level = 1, override = NEUTRAL_DIR}, {level = 
    1, override = NEUTRAL_DIR}, {level = 18955336, override = NEUTRAL_DIR}}, string = {lstring = 
    140737488331184, s = 0x1 <Address 0x1 out of bounds>, schars = -1, bufpos = 15997632, from_disp_str = 0, 
              unibyte = 0}, paragraph_dir = (unknown: 15997632), separator_limit = 128, prev_was_pdf = 0, 
            first_elt = 0, new_paragraph = 0, frame_window_p = 0}, paragraph_embedding = (unknown: 4428560)}
        current_matrix_up_to_date_p = 0
        used_current_matrix_p = 0
        buffer_unchanged_p = 0
        temp_scroll_step = 0
        count = 4
        rc = 4697757
        centering_position = -1
        last_line_misfit = 0
        beg_unchanged = 190
        end_unchanged = 0
#17 0x0000000000456696 in redisplay_window_0 (window=18954877) at xdisp.c:13691
No locals.
#18 0x00000000005fe97c in internal_condition_case_1 (bfun=0x456645 <redisplay_window_0>, arg=18954877, 
    handlers=13412822, hfun=0x4565ed <redisplay_window_error>) at eval.c:1231
        val = 6174234
        c = {tag = 13215010, val = 13215010, next = 0x7fffffffc090, gcpro = 0x0, jmp = {{__jmpbuf = {128, 
    -1790642741867911622, 4285200, 140737488340384, 0, 0, -1790642741683362246, 1790643374399874618}, 
              __mask_was_saved = 0, __saved_mask = {__val = {13215010, 13215010, 18955336, 13283858, 
    3200000, 0, 0, 15997637, 5524332953895733248, 140737488334800, 4514971, 140737488334816, 18955336, 
    13126224, 0, 4}}}}, backlist = 0x7fffffffb120, handlerlist = 0x7fffffffc060, lisp_eval_depth = 0, 
          pdlcount = 4, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0}
        h = {handler = 13412822, var = 13215010, chosen_clause = 13215010, tag = 0x7fffffffaee0, next = 
    0x7fffffffc060}
#19 0x00000000004565ba in redisplay_windows (window=18954877) at xdisp.c:13671
        w = 0x1213a78
#20 0x00000000004555b6 in redisplay_internal () at xdisp.c:13277
        f = 0x1212a68
        w = 0x1213a78
        sw = 0x1213a78
        fr = 0x1212a68
        pending = 0
        must_finish = 1
        tlbufpos = {charpos = 0, bytepos = 1}
        tlendpos = {charpos = 0, bytepos = 0}
        number_of_visible_frames = 1
        count = 2
        count1 = 4
        sf = 0x1212a68
        polling_stopped_here = 0
        tail = 17011814
        frame = 18950765
        backtrace = {next = 0x0, function = 13452370, args = 0xc8aa28 <Qnil>, nargs = 0, debug_on_exit = 0}
        consider_all_windows_p = 1
        update_miniwindow_p = 1
#21 0x000000000044e699 in resize_echo_area_exactly () at xdisp.c:10222
        w = 0x1213c48
        resized_p = 1
        resize_exactly = 13215058
#22 0x0000000000555bf3 in command_loop_1 () at keyboard.c:1605
        cmd = 16898482
        keybuf = {536871144, 6176864, 13215010, 13338818, 13215010, 13338816, 0, 17284114, 13051424, 
    5524332953895733248, 140737488338912, 6304357, 16527382, 2, 140737488338912, 13215010, 13215010, 
    13338818, 13338818, 13215010, 0, 0, 0, 5524332953895733248, 140737488338960, 6291734, 13215010, 
    13398646, 2, 5524332953895733248}
        i = 1
        prev_modiff = 10
        prev_buffer = 0xca0dd0
        already_adjusted = false
#23 0x00000000005fe7d8 in internal_condition_case (bfun=0x5552c9 <command_loop_1>, handlers=13266322, hfun=
    0x554a1a <cmd_error>) at eval.c:1193
        val = 5590759
        c = {tag = 13215010, val = 13215010, next = 0x7fffffffc220, gcpro = 0x0, jmp = {{__jmpbuf = {0, 
    -1790642744604694982, 4285200, 140737488340384, 0, 0, -1790642744554363334, 1790643374592026170}, 
              __mask_was_saved = 0, __saved_mask = {__val = {1790643374592026170, 140733193388032, 
    140737354129776, 0, 12, 17356977, 5524332953895733248, 140737488339312, 9540272, 0, 140737488340384, 0, 
    0, 140737488339776, 140737351945637, 1}}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, 
          pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0}
        h = {handler = 13266322, var = 13215010, chosen_clause = 13266322, tag = 0x7fffffffc090, next = 0x0}
#24 0x0000000000554eb6 in command_loop_2 (ignore=13215010) at keyboard.c:1173
        val = 0
#25 0x00000000005fe0d5 in internal_catch (tag=13262002, func=0x554e81 <command_loop_2>, arg=13215010)
    at eval.c:964
        c = {tag = 13262002, val = 13215010, next = 0x0, gcpro = 0x0, jmp = {{__jmpbuf = {0, 
    -1790642744510323142, 4285200, 140737488340384, 0, 0, -1790642744485157318, 1790643374662411834}, 
              __mask_was_saved = 0, __saved_mask = {__val = {5524332953895733248, 2, 0, 140737488339728, 
    6175701, 4294967440, 13215010, 13215010, 13452322, 140737488339728, 6174045, 13452320, 13452322, 
    17248097, 13241808, 12669344}}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, 
          poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0}
#26 0x0000000000554e52 in command_loop () at keyboard.c:1152
No locals.
#27 0x0000000000554436 in recursive_edit_1 () at keyboard.c:785
        count = 1
        val = 0
#28 0x0000000000554623 in Frecursive_edit () at keyboard.c:849
        count = 0
        buffer = 13215010
#29 0x0000000000551f0d in main (argc=2, argv=0x7fffffffc5a8) at emacs.c:1530
        dummy = 4131212846
        stack_bottom_variable = -64 '\300'
        do_initial_setlocale = true
        dumping = false
        skip_args = 0
        rlim = {rlim_cur = 8720000, rlim_max = 18446744073709551615}
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x40b3d1 "__libc_start_main"
Jason S
Posts: 103
Joined: 2010-12-14T19:42:12-07:00
Authentication code: 8675308

Re: segfault when inserting transparent PNGs in emacs

Post by Jason S »

The image you linked to has no transparency. The one with transparency is http://en.wikipedia.org/wiki/File:PNG_t ... tion_1.png
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: segfault when inserting transparent PNGs in emacs

Post by glennrp »

Jason S wrote:The image you linked to has no transparency. The one with transparency is http://en.wikipedia.org/wiki/File:PNG_t ... tion_1.png
I don't see anything unusual about that image. It has only three chunks: IHDR, IDAT, and IEND. It is depth=8, colortype=6 (RGBA), not interlaced. The other (...demonstration_2.png) has the same
three chunks, except that the colortype is 2 (RGB).
nicolasavru
Posts: 2
Joined: 2013-03-15T03:41:38-07:00
Authentication code: 6789

Re: segfault when inserting transparent PNGs in emacs

Post by nicolasavru »

Jason S wrote:The image you linked to has no transparency. The one with transparency is http://en.wikipedia.org/wiki/File:PNG_t ... tion_1.png
I believe it does have transparency, but the tRNS kind rather than an alpha channel.

In any case, I was wrong on several debugging points, but I also found the bug. First, I mixed up the version numbers. The problem was introduced in 6.8.2.3, not 6.8.2.0. Second, the problem was not, as I suspected, in png.c. Instead, it was in resource.c.

Specifically, line 113/114 (depending on the commit) (the second to last MagickULLConstant line) should be "MagickULLConstant(1),", not "MagickULLConstant(0),". That line initializes resource_info.thread_limit, and it should be initialized to 1, not 0. Changing it to 1 does indeed fix the problem and eliminates the segfault. If it is initialized to 0, then AcquireQuantumPixels sets quantum_info->number_threads to 0 and promptly calls AcquireQuantumMemory to ask for 0*foo bytes of memory (quantum.c:169-173). Because AcquireQuantumMemory returns 0 (as requested), AcquireQuantumPixels returns MagickFalse and AcquireQuantumInfo segfaults at quantum.c:129-132::

Code: Select all

status=SetQuantumDepth(image,quantum_info,image->depth);
if (status == MagickFalse)
  quantum_info=DestroyQuantumInfo(quantum_info);
quantum_info->endian=image->endian;
That should probably be handled more nicely. Is there a return(quantum_info) missing after the DestroyQuantumInfo call?


The change was introduced in commit 10876 on the ImageMagick-6 branch. I am not exactly sure what is going on there because that commit has the following lines as lines 113-116:

Code: Select all

MagickULLConstant(768),
MagickULLConstant(0),
MagickULLConstant(1),
MagickResourceInfinity
while commit 10777-HEAD of trunk has

Code: Select all

MagickULLConstant(768),
MagickULLConstant(1),
MagickULLConstant(0),
MagickResourceInfinity
Based on the above, it looks like it was fixed in trunk (Imagemagick-7), but it would be nice to have a fix in the Imagemagick-6 branch. Perhaps also comment which variable each of those initializer lines corresponds to. Clearly, it is very easy to make a copy/paste error there.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: segfault when inserting transparent PNGs in emacs

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.3-10 Beta available by sometime tomorrow. Thanks.
Post Reply