Subject: bug#34256: closed (Re: bug#34256: 27.0.50; Crash on draw_glyphs())

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 04 Feb 2019 17:52:02 +0000

Your bug report

#34256: 27.0.50; Crash on draw_glyphs()

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
34256: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34256
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#34256: 27.0.50; Crash on draw_glyphs()
From: Eli Zaretskii <[email-masked]>
To: Kaushal Modi <[email-masked]>
Cc: [email-masked]
Date: Mon, 04 Feb 2019 19:50:50 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Kaushal Modi <[email-masked]>
> Date: Mon, 4 Feb 2019 11:03:37 -0500
> Cc: [email-masked]
> 
> Thanks for the patch!
> 
> I couldn't apply the patch, so had to apply it manually.
> 
> But it works!

Thanks, I've now pushed it to the master branch.

> I am looking forward to understand in plain terms what this fix did. 

What happened was that while the display engine was redisplaying the
buffer, font-lock was called to fontify some part of the buffer, and
that activated Org mode (because the buffer displayed diffs of an Org
file, I presume?), and Org mode explicitly clears the image cache of
the frame for some reason I couldn't fathom.  So an inline image that
was ready to be displayed got removed and freed from under the feet of
the display engine, and when the time came to actually display it,
there was nothing to display...

The fix is to inhibit clearing of a frame's image cache until after
the frame has been updated by the display engine.

Thanks for helping me track this bug.

Subject: 27.0.50; Crash on draw_glyphs()
From: Kaushal Modi <[email-masked]>
To: [email-masked]
Date: Wed, 30 Jan 2019 09:30:23 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

I was working in an Org mode buffer and I got this crash on doing C-x v u
(vc-revert).

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00000000004c6814 in x_draw_glyph_string ()
(gdb) bt
#0  0x00000000004c6814 in x_draw_glyph_string ()
#1  0x000000000045b394 in draw_glyphs ()
#2  0x0000000000460ec9 in x_write_glyphs ()
#3  0x000000000041eb02 in update_window_line ()
#4  0x0000000000420737 in update_window ()
#5  0x000000000042209a in update_window_tree ()
#6  0x00000000004220ab in update_window_tree ()
#7  0x000000000042445d in update_frame ()
#8  0x000000000045831f in redisplay_internal ()
#9  0x00000000004fc2b3 in read_char ()
#10 0x00000000004feccc in read_key_sequence ()
#11 0x000000000050168d in read_key_sequence_vs ()
#12 0x000000000056bcef in Ffuncall ()
#13 0x00000000005a4d73 in exec_byte_code ()
#14 0x000000000056bc6f in Ffuncall ()
#15 0x00000000005a4d73 in exec_byte_code ()
#16 0x000000000056bc6f in Ffuncall ()
#17 0x00000000005a4d73 in exec_byte_code ()
#18 0x000000000056bc6f in Ffuncall ()
#19 0x0000000000568700 in Ffuncall_interactively ()
#20 0x000000000056bcef in Ffuncall ()
#21 0x000000000056bf6d in Fapply ()
#22 0x0000000000569d8a in Fcall_interactively ()
#23 0x000000000056bcef in Ffuncall ()
#24 0x00000000005a4d73 in exec_byte_code ()
#25 0x000000000056bc6f in Ffuncall ()
#26 0x000000000056bdaa in call1 ()
#27 0x0000000000500630 in command_loop_1 ()
#28 0x000000000056af3e in internal_condition_case ()
#29 0x00000000004f2a1c in command_loop_2 ()
#30 0x000000000056aead in internal_catch ()
#31 0x00000000004f29c4 in command_loop ()
#32 0x00000000004f75e6 in recursive_edit_1 ()
#33 0x00000000004f7904 in Frecursive_edit ()
#34 0x00000000004f1d13 in main ()

Lisp Backtrace:
No symbol "CHECK_LISP_OBJECT_TYPE" in current context.

Note: I am using Emacs built using the harfbuzz branch but I don't know if
this is related to that.

I have the gdb session open; let me know how to get more debug info for you.

Thank you.

In GNU Emacs 27.0.50 (build 11, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2019-01-28 built on kmodi-lx01.cld.analog.com
Repository revision: 137b65a9b0a4118adda50f34375b4960701542e9
Repository branch: master
Windowing system distributor 'Open Text', version 11.0.11505
System Description: Red Hat Enterprise Linux Workstation release 6.8
(Santiago)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules
 --prefix=/home/kmodi/usr_local/apps/6/emacs/master
 '--program-transform-name=s/^ctags$/ctags_emacs/' --with-harfbuzz
 'CPPFLAGS=-I/home/kmodi/stowed/include
 -I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
 -I/usr/include' 'CFLAGS=-O2 -march=native'
 'LDFLAGS=-L/home/kmodi/stowed/lib -L/home/kmodi/stowed/lib64
 -L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64'
 PKG_CONFIG_PATH=/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_local/6/lib64/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib64/pkgconfig:/home/kmodi/stowed/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS
CANNOT_DUMP GMP

--
Kaushal Modi