Subject: bug#33294: xwidget-insert crashes Emacs

From: Evgeny Zajcev <[email-masked]>
Date: Mon, 12 Nov 2018 17:44:22 +0300

пт, 9 нояб. 2018 г. в 17:57, Eli Zaretskii <[email-masked]>:

> [...]
>
> > diff --git a/src/data.c b/src/data.c
> > index 8d58cbd941..eea9ccedbb 100644
> > --- a/src/data.c
> > +++ b/src/data.c
> > @@ -276,10 +276,12 @@ for example, (type-of 1) returns `integer'.  */)
> >            }
> >          case PVEC_MODULE_FUNCTION:
> >            return Qmodule_function;
> > -        /* "Impossible" cases.  */
> >          case PVEC_XWIDGET:
> > -        case PVEC_OTHER:
> > +          return Qxwidget;
> >          case PVEC_XWIDGET_VIEW:
> > +          return Qxwidget_view;
> > +        /* "Impossible" cases.  */
> > +        case PVEC_OTHER:
> >          case PVEC_SUB_CHAR_TABLE:
> >          case PVEC_FREE: ;
> >          }
> > @@ -3756,6 +3758,8 @@ syms_of_data (void)
> >    DEFSYM (Qfont_entity, "font-entity");
> >    DEFSYM (Qfont_object, "font-object");
> >    DEFSYM (Qterminal, "terminal");
> > +  DEFSYM (Qxwidget, "xwidget");
> > +  DEFSYM (Qxwidget_view, "xwidget-view");
> >
> >    DEFSYM (Qdefun, "defun");
>
> Evgeny, does this patch solve your original problem?
>

Fixes perfectly the crash, thanks!

However, I noticed that Emacs without GUI (-nw -Q) continues to crash in
different place:

(gdb) bt
#0  0x00007ffff6c55db9 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#1  0x00007ffff6b047c8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#2  0x00007ffff6b18413 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#3  0x00007ffff6b05b1c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#4  0x00007ffff6b18309 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#5  0x00007ffff6b183a4 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#6  0x00007ffff6b06692 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#7  0x00007ffff5996317 in g_type_create_instance () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007ffff597831b in ?? () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff5979c01 in g_object_newv () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff597a534 in g_object_new () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff6b2042a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#12 0x00007ffff6ce97cc in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff5996317 in g_type_create_instance () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff597831b in ?? () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff5979c01 in g_object_newv () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff597a534 in g_object_new () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00000000005ccc74 in Fmake_xwidget (type=..., title=..., width=...,
height=..., arguments=..., buffer=...) at xwidget.c:102
#18 0x000000000056cb1b in funcall_subr (subr=0xb80ca0 <Smake_xwidget>,
numargs=numargs@entry=5, args=args@entry=0x7fffffffc450) at eval.c:2867
#19 0x000000000056bb76 in Ffuncall (nargs=<optimized out>,
args=args@entry=0x7fffffffc448)
at eval.c:2776
#20 0x00000000005a4ee8 in exec_byte_code (bytestr=..., vector=...,
maxdepth=..., args_template=..., args_template@entry=..., nargs=nargs@entry
=5,
    args=<optimized out>, args@entry=0x7fffffffc610) at bytecode.c:630
#21 0x000000000056b82f in funcall_lambda (fun=..., fun@entry=...,
nargs=nargs@entry=5, arg_vector=arg_vector@entry=0x7fffffffc610) at
eval.c:2977
....

-- 
lg