emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --with-cairo Emacs server crash and fix


From: Liam Quinlan
Subject: Re: --with-cairo Emacs server crash and fix
Date: Mon, 12 Aug 2019 22:52:31 -0400

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, <address@hidden> wrote:
> From: Liam Quinlan <address@hidden>
> Date: Mon, 12 Aug 2019 06:48:25 -0400
> Cc: address@hidden
>
> ... 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]