unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: 34256@debbugs.gnu.org
Subject: bug#34256: 27.0.50; Crash on draw_glyphs()
Date: Thu, 31 Jan 2019 22:26:21 +0200	[thread overview]
Message-ID: <83ef8szi8i.fsf@gnu.org> (raw)
In-Reply-To: <CAFyQvY3=mFbHOanuXPLLBRBZmjvdhgzWT64sy+w9m4OpmwOFXQ@mail.gmail.com> (message from Kaushal Modi on Thu, 31 Jan 2019 12:02:40 -0500)

> From: Kaushal Modi <kaushal.modi@gmail.com>
> 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.





  parent reply	other threads:[~2019-01-31 20:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 14:30 bug#34256: 27.0.50; Crash on draw_glyphs() Kaushal Modi
2019-01-30 16:16 ` Eli Zaretskii
2019-01-30 16:35   ` Kaushal Modi
2019-01-30 16:51     ` Eli Zaretskii
2019-01-30 18:22       ` Kaushal Modi
2019-01-30 18:55         ` Eli Zaretskii
2019-01-30 20:54           ` Kaushal Modi
2019-01-31 14:02             ` Eli Zaretskii
2019-01-31 15:50               ` Kaushal Modi
2019-01-31 16:52                 ` Eli Zaretskii
2019-01-31 17:02                   ` Kaushal Modi
2019-01-31 17:05                     ` Kaushal Modi
2019-01-31 20:26                     ` Eli Zaretskii [this message]
2019-02-01  3:15                       ` Kaushal Modi
2019-02-01  3:25                         ` Kaushal Modi
2019-02-01  8:41                           ` Eli Zaretskii
2019-02-04 16:03                             ` Kaushal Modi
2019-02-04 17:50                               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ef8szi8i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34256@debbugs.gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).