all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liam Quinlan <liamkquinlan@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: --with-cairo Emacs server crash and fix
Date: Mon, 12 Aug 2019 22:52:31 -0400	[thread overview]
Message-ID: <CAAQqQ-3exH=be2dpGi2Gy5azw_N3+hrW+8Emk1GydrpS-dXKeQ@mail.gmail.com> (raw)
In-Reply-To: <83v9v2s4kf.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Update: i think I've found the actual proper solution.  Alternative patch
on offer below; this time by checking for dynamic bitmaps already in place
after finishing the static ones in x_cr_init_fringe.  Note that that
function also defines w32_init_fringe if HAVE_NTGUI, so windows is covered.

Trying to be minimal so this example doesn't iterate to over fringe_bitmaps
looking for sparse elements, just begin checking fringe_bitmaps for
existing elements at the index following the standard bitmaps leaves off
and continue until the first null.  I'm not sure if it's too bold to trust
that holes haven't had a chance to arise though. (perhaps if the server is
initially used in console mode and packages get unloaded before a gui
client connects...?).



diff --git a/.gitignore b/.gitignore
index e75df8b8b6..8711a2759b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -290,3 +290,4 @@ nt/emacs.rc
 nt/emacsclient.rc
 src/gdb.ini
 /var/
+build/
diff --git a/src/fringe.c b/src/fringe.c
index d0d599223d..82f2ad5d55 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1774,16 +1774,19 @@ w32_init_fringe (struct redisplay_interface *rif)
 x_cr_init_fringe (struct redisplay_interface *rif)
 #endif
 {
-  int bt;
-
   if (!rif)
     return;

+  int bt;
+  struct fringe_bitmap *fb;
+
   for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
     {
-      struct fringe_bitmap *fb = &standard_bitmaps[bt];
+      fb = &standard_bitmaps[bt];
       rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
     }
+  while ((fb = fringe_bitmaps[bt]))
+      rif->define_fringe_bitmap (bt++, fb->bits, fb->height, fb->width);
 }
 #endif


On Mon, Aug 12, 2019, 12:59 Eli Zaretskii, <eliz@gnu.org> wrote:

> > From: Liam Quinlan <liamkquinlan@gmail.com>
> > Date: Mon, 12 Aug 2019 06:48:25 -0400
> > Cc: emacs-devel@gnu.org
> >
> > ... Whoops, I guess gdb doesn't log !cmd output.  Here's what should be
> in that awkward empty spot.
>
> Thanks.  This and the GDB session adds some important info, but
> there's still a gap in my understanding of the problem.  To close that
> gap, please show the C and Lisp backtrace from the breakpoint at
> fringe.c:1487 which prints "rif: unavailable".  That will allow me to
> understand which Lisp code tried to define fringe bitmaps when no GUI
> frame is available.
>

[-- Attachment #2: Type: text/html, Size: 3811 bytes --]

  parent reply	other threads:[~2019-08-13  2:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 15:40 --with-cairo Emacs server crash and fix Liam Quinlan
2019-08-10  9:39 ` Eli Zaretskii
2019-08-12 10:42   ` Liam Quinlan
2019-08-12 10:48   ` Liam Quinlan
2019-08-12 16:59     ` Eli Zaretskii
2019-08-12 20:00       ` Liam Quinlan
2019-08-13  2:52       ` Liam Quinlan [this message]
2019-08-13 15:00         ` Eli Zaretskii
2019-08-13 17:36           ` Liam Quinlan
  -- strict thread matches above, loose matches on Subject: below --
2019-08-08  7:01 Liam Quinlan
2019-08-09  7:11 ` 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

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

  git send-email \
    --in-reply-to='CAAQqQ-3exH=be2dpGi2Gy5azw_N3+hrW+8Emk1GydrpS-dXKeQ@mail.gmail.com' \
    --to=liamkquinlan@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.