GNU bug report logs - #52941
29.0.50; pgtk: characters typed into minibuffers inserted multiple times

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sat, 1 Jan 2022 23:15:02 UTC

Severity: normal

Found in version 29.0.50

Done: Yuuki Harano <masm+emacs <at> masm11.me>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52941 in the body.
You can then email your comments to 52941 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Sat, 01 Jan 2022 23:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 01 Jan 2022 23:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; fido-mode: characters typed into minibuffers inserted
 multiple times
Date: Sat, 01 Jan 2022 16:14:17 -0700
Hello,

If the system is under heavy load, and/or Emacs is compiled with debug
options which substantially slow it down, and fido-mode is enabled, then
typing quickly into the minibuffer can result in typed characters
inserted more than once.  Here is how I can reproduce it:

    emacs -Q
    M-x fido-mode RET
    C-h v

and quickly try to type "font-weight-table".  This is what I get in the
minibuffer:

    font-weweweweweweweight-tatabe

Although I made at least one typo (I didn't type the 'l'), I definitely
did not type 'we' and 'ta' that many times.

I haven't been able to reproduce with icomplete-mode, but as the problem
does not occur consistently, I am not confident it does not occur with
icomplete-mode.

-- 
Sean Whitton




Changed bug title to '29.0.50; pgtk: characters typed into minibuffers inserted multiple times' from '29.0.50; fido-mode: characters typed into minibuffers inserted multiple times' Request was from Sean Whitton <spwhitton <at> spwhitton.name> to control <at> debbugs.gnu.org. (Tue, 11 Jan 2022 00:11:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Tue, 11 Jan 2022 00:12:01 GMT) Full text and rfc822 format available.

Message #10 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: 52941 <at> debbugs.gnu.org
Cc: Po Lu <luangruo <at> yahoo.com>, Yuuki Harano <masm+emacs <at> masm11.me>,
 João Távora <joaotavora <at> gmail.com>
Subject: 29.0.50; pgtk: characters typed into minibuffers inserted multiple
 times
Date: Mon, 10 Jan 2022 17:11:13 -0700
Hello,

On Sat 01 Jan 2022 at 04:14PM -07, Sean Whitton wrote:

> If the system is under heavy load, and/or Emacs is compiled with debug
> options which substantially slow it down, and fido-mode is enabled, then
> typing quickly into the minibuffer can result in typed characters
> inserted more than once.  Here is how I can reproduce it:
>
>     emacs -Q
>     M-x fido-mode RET
>     C-h v
>
> and quickly try to type "font-weight-table".  This is what I get in the
> minibuffer:
>
>     font-weweweweweweweight-tatabe
>
> Although I made at least one typo (I didn't type the 'l'), I definitely
> did not type 'we' and 'ta' that many times.
>
> I haven't been able to reproduce with icomplete-mode, but as the problem
> does not occur consistently, I am not confident it does not occur with
> icomplete-mode.

It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
Sure enough, I cannot reproduce the bug.  So I think the problem is
something about how pgtk receives and processes keyboard input.

In summary: I can reproduce with pgtk running as a native Wayland
application, and I cannot reproduce with the Lucid build running under
Xwayland.  In both cases, swaywm.  I have retitled the bug.

Thanks.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Tue, 11 Jan 2022 09:45:02 GMT) Full text and rfc822 format available.

Message #13 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Po Lu <luangruo <at> yahoo.com>, Yuuki Harano <masm+emacs <at> masm11.me>,
 52941 <at> debbugs.gnu.org
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Tue, 11 Jan 2022 09:44:18 +0000
[Message part 1 (text/plain, inline)]
Thanks, Sean, that's very good investigation and I'll admit induces
a "phew" on my part ;-)

And yes, I'm pretty sure this will happen with icomplete-mode as
well.

João

On Tue, Jan 11, 2022 at 12:11 AM Sean Whitton <spwhitton <at> spwhitton.name>
wrote:

> Hello,
>
> On Sat 01 Jan 2022 at 04:14PM -07, Sean Whitton wrote:
>
> > If the system is under heavy load, and/or Emacs is compiled with debug
> > options which substantially slow it down, and fido-mode is enabled, then
> > typing quickly into the minibuffer can result in typed characters
> > inserted more than once.  Here is how I can reproduce it:
> >
> >     emacs -Q
> >     M-x fido-mode RET
> >     C-h v
> >
> > and quickly try to type "font-weight-table".  This is what I get in the
> > minibuffer:
> >
> >     font-weweweweweweweight-tatabe
> >
> > Although I made at least one typo (I didn't type the 'l'), I definitely
> > did not type 'we' and 'ta' that many times.
> >
> > I haven't been able to reproduce with icomplete-mode, but as the problem
> > does not occur consistently, I am not confident it does not occur with
> > icomplete-mode.
>
> It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
> Sure enough, I cannot reproduce the bug.  So I think the problem is
> something about how pgtk receives and processes keyboard input.
>
> In summary: I can reproduce with pgtk running as a native Wayland
> application, and I cannot reproduce with the Lucid build running under
> Xwayland.  In both cases, swaywm.  I have retitled the bug.
>
> Thanks.
>
> --
> Sean Whitton
>


-- 
João Távora
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Tue, 11 Jan 2022 10:22:02 GMT) Full text and rfc822 format available.

Message #16 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Yuuki Harano <masm+emacs <at> masm11.me>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Tue, 11 Jan 2022 18:21:34 +0800
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
> Sure enough, I cannot reproduce the bug.  So I think the problem is
> something about how pgtk receives and processes keyboard input.

> In summary: I can reproduce with pgtk running as a native Wayland
> application, and I cannot reproduce with the Lucid build running under
> Xwayland.  In both cases, swaywm.  I have retitled the bug.

You forgot to test the following combinations:

  --with-x-toolkit=gtk3, x-gtk-use-native-input set to nil
  --with-x-toolkit=gtk3, x-gtk-use-native-input set to t
  --with-pgtk, GDK_BACKEND=x11

Could you please try all three setups and see which of those the
problem exists in?

Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Thu, 13 Jan 2022 17:00:02 GMT) Full text and rfc822 format available.

Message #19 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Yuuki Harano <masm+emacs <at> masm11.me>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Thu, 13 Jan 2022 09:58:50 -0700
Hello Po,

On Tue 11 Jan 2022 at 06:21PM +08, Po Lu wrote:

> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>
>> It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
>> Sure enough, I cannot reproduce the bug.  So I think the problem is
>> something about how pgtk receives and processes keyboard input.
>
>> In summary: I can reproduce with pgtk running as a native Wayland
>> application, and I cannot reproduce with the Lucid build running under
>> Xwayland.  In both cases, swaywm.  I have retitled the bug.
>
> You forgot to test the following combinations:
>
>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to nil
>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to t

Cannot reproduce.  I did try both, but I can't find any mention of
x-gtk-use-native-input in the Emacs source code -- is it possible you
meant a similarly-named variable?

>   --with-pgtk, GDK_BACKEND=x11

Can reproduce, but it happens less often, i.e., you have to load up the
system further and type faster to reproduce :)

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Fri, 14 Jan 2022 00:41:02 GMT) Full text and rfc822 format available.

Message #22 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Yuuki Harano <masm+emacs <at> masm11.me>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Fri, 14 Jan 2022 08:39:49 +0800
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello Po,
>
> On Tue 11 Jan 2022 at 06:21PM +08, Po Lu wrote:
>
>> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>>
>>> It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
>>> Sure enough, I cannot reproduce the bug.  So I think the problem is
>>> something about how pgtk receives and processes keyboard input.
>>
>>> In summary: I can reproduce with pgtk running as a native Wayland
>>> application, and I cannot reproduce with the Lucid build running under
>>> Xwayland.  In both cases, swaywm.  I have retitled the bug.
>>
>> You forgot to test the following combinations:
>>
>>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to nil
>>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to t
>
> Cannot reproduce.  I did try both, but I can't find any mention of
> x-gtk-use-native-input in the Emacs source code -- is it possible you
> meant a similarly-named variable?

It's a relatively new feature, you should update from master and test
again.

> Can reproduce, but it happens less often, i.e., you have to load up the
> system further and type faster to reproduce :)

Thanks, I will look into this, but please also update and test native
input.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Fri, 14 Jan 2022 21:32:02 GMT) Full text and rfc822 format available.

Message #25 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Yuuki Harano <masm+emacs <at> masm11.me>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Fri, 14 Jan 2022 14:30:54 -0700
Hello,

On Fri 14 Jan 2022 at 08:39AM +08, Po Lu wrote:

> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>
>> Hello Po,
>>
>> On Tue 11 Jan 2022 at 06:21PM +08, Po Lu wrote:
>>
>>> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>>>
>>>> It occurred to me to try --with-x-toolkit=lucid instead of --with-pgtk.
>>>> Sure enough, I cannot reproduce the bug.  So I think the problem is
>>>> something about how pgtk receives and processes keyboard input.
>>>
>>>> In summary: I can reproduce with pgtk running as a native Wayland
>>>> application, and I cannot reproduce with the Lucid build running under
>>>> Xwayland.  In both cases, swaywm.  I have retitled the bug.
>>>
>>> You forgot to test the following combinations:
>>>
>>>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to nil
>>>   --with-x-toolkit=gtk3, x-gtk-use-native-input set to t
>>
>> Cannot reproduce.  I did try both, but I can't find any mention of
>> x-gtk-use-native-input in the Emacs source code -- is it possible you
>> meant a similarly-named variable?
>
> It's a relatively new feature, you should update from master and test
> again.

Ah, sorry.  Now done.  Cannot reproduce in either case.

In the latter case I had to kill fcitx5 before I could type into Emacs.
So I thought I'd also test pgtk with and without GDK_BACKEND=x11 without
fcitx5 running.  I could reproduce in both cases.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Sat, 15 Jan 2022 00:50:02 GMT) Full text and rfc822 format available.

Message #28 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Yuuki Harano <masm+emacs <at> masm11.me>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Sat, 15 Jan 2022 08:49:05 +0800
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Ah, sorry.  Now done.  Cannot reproduce in either case.
>
> In the latter case I had to kill fcitx5 before I could type into Emacs.
> So I thought I'd also test pgtk with and without GDK_BACKEND=x11 without
> fcitx5 running.  I could reproduce in both cases.

Thanks for testing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Sat, 15 Jan 2022 15:09:02 GMT) Full text and rfc822 format available.

Message #31 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Yuuki Harano <masm+emacs <at> masm11.me>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Po Lu <luangruo <at> yahoo.com>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50;
 pgtk: characters typed into minibuffers inserted multiple times
Date: Sun, 16 Jan 2022 00:08:12 +0900
[Message part 1 (text/plain, inline)]
On Tue, 11 Jan 2022 09:11:13 +0900,
Sean Whitton wrote:
> > If the system is under heavy load, and/or Emacs is compiled with debug
> > options which substantially slow it down, and fido-mode is enabled, then
> > typing quickly into the minibuffer can result in typed characters
> > inserted more than once.

Thanks for the report.
Please try the attached patch, which should solve the issue.

-- 
Yuuki Harano

[events-processed-twice.diff (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52941; Package emacs. (Sat, 15 Jan 2022 21:11:01 GMT) Full text and rfc822 format available.

Message #34 received at 52941 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Yuuki Harano <masm+emacs <at> masm11.me>
Cc: Po Lu <luangruo <at> yahoo.com>, 52941 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50; pgtk: characters typed into minibuffers inserted
 multiple times
Date: Sat, 15 Jan 2022 14:10:17 -0700
Hello,

On Sun 16 Jan 2022 at 12:08AM +09, Yuuki Harano wrote:

> On Tue, 11 Jan 2022 09:11:13 +0900,
> Sean Whitton wrote:
>> > If the system is under heavy load, and/or Emacs is compiled with debug
>> > options which substantially slow it down, and fido-mode is enabled, then
>> > typing quickly into the minibuffer can result in typed characters
>> > inserted more than once.
>
> Thanks for the report.
> Please try the attached patch, which should solve the issue.

Looks like it does -- thanks!

-- 
Sean Whitton




Reply sent to Yuuki Harano <masm+emacs <at> masm11.me>:
You have taken responsibility. (Sun, 16 Jan 2022 08:46:02 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Sun, 16 Jan 2022 08:46:02 GMT) Full text and rfc822 format available.

Message #39 received at 52941-done <at> debbugs.gnu.org (full text, mbox):

From: Yuuki Harano <masm+emacs <at> masm11.me>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Po Lu <luangruo <at> yahoo.com>, 52941-done <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: 29.0.50;
 pgtk: characters typed into minibuffers inserted multiple times
Date: Sun, 16 Jan 2022 17:45:02 +0900
On Sun, 16 Jan 2022 06:10:17 +0900,
Sean Whitton wrote:
> > Please try the attached patch, which should solve the issue.
> 
> Looks like it does -- thanks!

Applied.  Thanks for the confirmation.

-- 
Yuuki Harano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 Feb 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.