From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34256: 27.0.50; Crash on draw_glyphs() Date: Thu, 31 Jan 2019 22:26:21 +0200 Message-ID: <83ef8szi8i.fsf@gnu.org> References: <83pnse15pb.fsf@gnu.org> <83k1im142z.fsf@gnu.org> <83bm3y0ycm.fsf@gnu.org> <834l9o2acz.fsf@gnu.org> <83lg30zs5d.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262072"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34256@debbugs.gnu.org To: Kaushal Modi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 31 21:27:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpIvf-00164t-8m for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jan 2019 21:27:19 +0100 Original-Received: from localhost ([127.0.0.1]:60425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpIve-0002nb-4b for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jan 2019 15:27:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpIvQ-0002lq-NC for bug-gnu-emacs@gnu.org; Thu, 31 Jan 2019 15:27:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpIvO-0008J3-H4 for bug-gnu-emacs@gnu.org; Thu, 31 Jan 2019 15:27:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpIvO-0008Iz-Dp for bug-gnu-emacs@gnu.org; Thu, 31 Jan 2019 15:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gpIvO-0004sp-2W for bug-gnu-emacs@gnu.org; Thu, 31 Jan 2019 15:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Jan 2019 20:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34256 X-GNU-PR-Package: emacs Original-Received: via spool by 34256-submit@debbugs.gnu.org id=B34256.154896640018731 (code B ref 34256); Thu, 31 Jan 2019 20:27:02 +0000 Original-Received: (at 34256) by debbugs.gnu.org; 31 Jan 2019 20:26:40 +0000 Original-Received: from localhost ([127.0.0.1]:53394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpIv2-0004s2-Ek for submit@debbugs.gnu.org; Thu, 31 Jan 2019 15:26:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpIv1-0004rl-KS for 34256@debbugs.gnu.org; Thu, 31 Jan 2019 15:26:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpIus-00089J-FO; Thu, 31 Jan 2019 15:26:32 -0500 Original-Received: from [176.228.60.248] (port=2520 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gpIuo-0005Lo-19; Thu, 31 Jan 2019 15:26:28 -0500 In-reply-to: (message from Kaushal Modi on Thu, 31 Jan 2019 12:02:40 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154941 Archived-At: > From: Kaushal Modi > Date: Thu, 31 Jan 2019 12:02:40 -0500 > Cc: 34256@debbugs.gnu.org > > Here's my entire desktop setup: https://ptpb.pw/Z8TC/elisp > > - The "(setq desktop-restore-frames nil)" bit doesn't get evaluated as emacs version is >= 25.0. > - The only other desktop/frame related setup that I have is "(setq desktop-restore-forces-onscreen nil)" > (changing from the default t to nil). > > And then I basically call this 1 second after my init.el finishes loading: > > (desktop-save-mode 1) > (desktop-read) > > > (gdb) p FRAME_IMAGE_CACHE (s->f)->used > > (gdb) p FRAME_IMAGE_CACHE (s->f)->images[0] > > > > (gdb) p FRAME_IMAGE_CACHE (s->f)->used > > $2 = 2 > > (gdb) p FRAME_IMAGE_CACHE (s->f)->images[0] > > $3 = (struct image *) 0x0 > > OK, so something sets the image in the cache to NULL. When you > reproduce this, is there just one frame, or more than one? > > There's always one frame only. I never work with multiple frames. You can see the saved frame info in my > earlier message in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34256#17. OK, so here's a way that could potentially find the culprit: $ cd /path/to/emacs/src $ gdb ./emacs ... (gdb) source ./.gdbinit (gdb) break fill_image_glyph_string (gdb) run When this breakpoint breaks, type: (gdb) disable (gdb) print s->f->terminal->image_cache->images[0] (gdb) watch -l s->f->terminal->image_cache->images[0] if s->f->terminal->image_cache->images[0] == 0 (gdb) continue Then invoke the rest of your recipe. (It could be that the breakpoint breaks only after you invoke the last two lines of the recipe.) Each time the watchpoint breaks, type (gdb) bt The result should include the Lisp backtrace as well. If the "print" command above shows that images[0] is already NULL, type "bt" right there and then, before continuing with the rest. Each time the watchpoint breaks, type "continue" until the program segfaults, I want to see all the cases where the image in the cache gets nullified. I hope this will allow us to find which code causes this trouble. Thanks.