Subject: bug#21313: 25.0.50; Strange errors from dbus-handle-event

From: Eli Zaretskii <[email-masked]>
Date: Fri, 02 Oct 2015 22:05:14 +0300

> From: Tassilo Horn <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 02 Oct 2015 20:36:18 +0200
> 
> apparently my commits
> 
>   bfa1aa8 * Improve last commit to process.c
>   27f8719 * Remove callback-handled channels from Available set
> 
> didn't really fix this problem.  I still occasionally get those strange
> errors, e.g.,
> 
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p CHARACTER_POSITION)
>   dbus-handle-event((dbus-event FILE_NAME CHARACTER_POSITION LINE_NUMBER COLUMN_NUMBER OWNER_OS HOST_NAME USER CLASS NAME ATOM INTEGER SAVE_TARGETS))
>   funcall-interactively(dbus-handle-event (dbus-event FILE_NAME CHARACTER_POSITION LINE_NUMBER COLUMN_NUMBER OWNER_OS HOST_NAME USER CLASS NAME ATOM INTEGER SAVE_TARGETS))
>   call-interactively(dbus-handle-event nil [(dbus-event FILE_NAME CHARACTER_POSITION LINE_NUMBER COLUMN_NUMBER OWNER_OS HOST_NAME USER CLASS NAME ATOM INTEGER SAVE_TARGETS)])
>   command-execute(dbus-handle-event nil [(dbus-event FILE_NAME CHARACTER_POSITION LINE_NUMBER COLUMN_NUMBER OWNER_OS HOST_NAME USER CLASS NAME ATOM INTEGER SAVE_TARGETS)] t)
> 
> just now when killing text in a message-mode buffer.  And I also had
> some crashes again.
> 
> Should I revert these two commits?

I understand those commits made the situation better, perhaps even
much better.  If that's correct, I see no reason to revert them, just
to continue investigating the problem.

One idea for investigation would be to write special code that would
collect data about these events, from the moment they are detected by
pselect until they wind up in the D-bus handler, and put that data
into a data structure accessible from Lisp.  Then you could examine
that data when the problem happens, and analyze it.

Thanks.