From: Michael Albinus <michael.albinus@gmx.de>
To: Juri Linkov <juri@linkov.net>
Cc: 45277@debbugs.gnu.org
Subject: bug#45277: D-Bus crashes and DND errors
Date: Mon, 28 Dec 2020 18:52:33 +0100 [thread overview]
Message-ID: <87lfdhyg0u.fsf@gmx.de> (raw)
In-Reply-To: <87r1narllw.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 28 Dec 2020 19:03:47 +0200")
Juri Linkov <juri@linkov.net> writes:
Hi Juri,
> But when such error is signaled:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "Click to close tab")
> dbus-handle-event((dbus-event :help "Click to close tab"))
> funcall-interactively(dbus-handle-event (dbus-event :help "Click to close tab"))
> call-interactively(dbus-handle-event nil [(dbus-event :help "Click to close tab")])
> command-execute(dbus-handle-event nil [(dbus-event :help "Click to close tab")] t)
>
> there were no DBUS_DEBUG messages before this error comes.
> So the erroneous events are not added by dbusbind.c.
Good.
> Here's is a brief sequence of events:
>
> 1. In web browser copied a URL to the clipboard;
> 2. In Emacs this immediately causes a DBUS_EVENT event added to kbd_buffer:
>
> Thread 1 "emacs" hit Breakpoint 5, make_lispy_event (event=0x555555cb93c8 <kbd_buffer+100520>) at keyboard.c:6015
> 6015 return Fcons (Qdbus_event, event->arg);
>
> (gdb) bt
> #0 make_lispy_event (event=0x555555cb93c8 <kbd_buffer+100520>) at keyboard.c:6015
> #1 0x00005555557131b9 in kbd_buffer_get_event (kbp=0x7fffffffc668, used_mouse_menu=0x7fffffffdcb9, end_time=0x0) at keyboard.c:3978
> #2 0x000055555570ed06 in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffcab0, used_mouse_menu=0x7fffffffdcb9) at keyboard.c:2159
> #3 0x000055555570f023 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffcab0, prev_event=XIL(0), used_mouse_menu=0x7fffffffdcb9) at keyboard.c:2223
> #4 0x0000555555710857 in read_char (commandflag=1, map=XIL(0x55555a5c9943), prev_event=XIL(0), used_mouse_menu=0x7fffffffdcb9, end_time=0x0) at keyboard.c:2833
> #5 0x000055555571fab7 in read_key_sequence (keybuf=0x7fffffffdee0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9498
> #6 0x000055555570c918 in command_loop_1 () at keyboard.c:1353
> #7 0x00005555557caed4 in internal_condition_case (bfun=0x55555570c4b0 <command_loop_1>, handlers=XIL(0x90), hfun=0x55555570bbed <cmd_error>) at eval.c:1415
> #8 0x000055555570c154 in command_loop_2 (ignore=XIL(0)) at keyboard.c:1094
> #9 0x00005555557ca6d7 in internal_catch (tag=XIL(0xd800), func=0x55555570c123 <command_loop_2>, arg=XIL(0)) at eval.c:1176
> #10 0x000055555570c0ef in command_loop () at keyboard.c:1073
> #11 0x000055555570b79e in recursive_edit_1 () at keyboard.c:720
> #12 0x000055555570b929 in Frecursive_edit () at keyboard.c:789
> #13 0x00005555557080a0 in main (argc=1, argv=0x7fffffffe368) at emacs.c:2054
>
> (gdb) fr 1
> #1 0x00005555557131b9 in kbd_buffer_get_event (kbp=0x7fffffffc668, used_mouse_menu=0x7fffffffdcb9, end_time=0x0) at keyboard.c:3978
> 3978 obj = make_lispy_event (&event->ie);
>
> (gdb) p event->kind
> $1 = DBUS_EVENT
>
> (gdb) p (int)event->kind
> $2 = 27
>
> (gdb) p event->ie
> $3 = {
> kind = DBUS_EVENT,
> part = scroll_bar_nowhere,
> code = 0,
> modifiers = 0,
> x = XIL(0),
> y = XIL(0),
> timestamp = 0,
> frame_or_window = XIL(0),
> arg = XIL(0x555557db7e23)
> }
>
> (gdb) p event->ie->arg
> $4 = XIL(0x555557db7e23)
>
> (gdb) pr
> (:help "Click to close tab")
>
> (gdb) p event->sie
> $5 = {
> kind = DBUS_EVENT,
> dpyinfo = 0x0,
> requestor = 0,
> selection = 0,
> target = 0,
> property = 0,
> time = 0
> }
>
> (gdb) c
> Continuing.
>
> Thread 1 "emacs" hit Breakpoint 5, make_lispy_event (event=0x555555cbd0d0 <kbd_buffer+116144>) at keyboard.c:6015
> 6015 return Fcons (Qdbus_event, event->arg);
>
> (gdb) fr 1
> #1 0x00005555557131b9 in kbd_buffer_get_event (kbp=0x7fffffffc668, used_mouse_menu=0x7fffffffdcb9, end_time=0x0) at keyboard.c:3978
> 3978 obj = make_lispy_event (&event->ie);
>
> (gdb) p event->kind
> $6 = DBUS_EVENT
>
> (gdb) p event->ie
> $7 = {
> kind = DBUS_EVENT,
> part = scroll_bar_nowhere,
> code = 0,
> modifiers = 0,
> x = XIL(0),
> y = XIL(0),
> timestamp = 0,
> frame_or_window = XIL(0),
> arg = XIL(0x555560a70f43)
> }
>
> (gdb) p event->ie->arg
> $8 = XIL(0x555560a70f43)
>
> (gdb) pr
> #<INVALID_LISP_OBJECT 0x555560a70f43>
>
> (gdb) c
> Continuing.
>
> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> string_intervals (s=XIL(0x6c613a5b5e5b285c)) at lisp.h:3404
> 3404 return XSTRING (s)->u.s.intervals;
>
> Maybe making bootstrap after every pull from master will solve these problems?
That would be too drastic. I have the impression, that the enum
event_kind (termhooks.h) is not in sync with its usage here and
there. When this file is changed, all *.c files (or at least all *.c
files using this) shall be recompiled.
In your local git checkout, what are the timestamps of termhooks.h,
dbusbind.c and dbusbind.o?
Best regards, Michael.
next prev parent reply other threads:[~2020-12-28 17:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 20:58 bug#45277: D-Bus crashes and DND errors Juri Linkov
2020-12-17 18:38 ` Michael Albinus
2020-12-17 21:54 ` Juri Linkov
2020-12-18 10:22 ` Michael Albinus
2020-12-19 20:23 ` Juri Linkov
2020-12-20 20:01 ` Juri Linkov
2020-12-20 20:21 ` Michael Albinus
2020-12-28 17:03 ` Juri Linkov
2020-12-28 17:52 ` Michael Albinus [this message]
2020-12-28 18:19 ` Juri Linkov
2020-12-29 8:27 ` Michael Albinus
2020-12-29 9:31 ` Juri Linkov
2020-12-29 10:59 ` Michael Albinus
2020-12-29 15:16 ` Eli Zaretskii
2020-12-29 19:28 ` Juri Linkov
2020-12-30 10:21 ` Michael Albinus
2021-01-06 17:37 ` bug#45277: SELECTION_CLEAR_EVENT crashes Juri Linkov
2021-05-16 15:52 ` Lars Ingebrigtsen
2021-05-16 17:57 ` Juri Linkov
2021-05-17 14:03 ` Lars Ingebrigtsen
2021-07-13 20:49 ` Juri Linkov
2021-07-13 22:28 ` Juri Linkov
2021-07-13 22:34 ` Lars Ingebrigtsen
2020-12-21 8:59 ` bug#45277: DND errors Juri Linkov
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=87lfdhyg0u.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=45277@debbugs.gnu.org \
--cc=juri@linkov.net \
/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).