X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE87B3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MCxe34Hhnia0cjV9AF26LqCWX5io+d/IxIjqmGg57uI=; b=N9wzI5jHTZ3lQgEj8qDKC/tiVAM+BpaFDETHCKDgMgm6JqTlzdDsctjB/HJdye5OFI sLPpKKG9BGFvD2pC7mpX8PFnsCfOJv/m8AQDZ2cYzt+u0Wn3eBPHSx34SMTLXcWJpnOD 4LUNU0YIK4u2gFa8iewQkBRFLM+hEzj9tF7gSk5vcpXYJzlv0MPUNw6zosjtR+DpPJ50 u1OuN2TnFi8OWW0QAC55CqAsBzW9R36RQjL7IgLgarzCk+op7w/Fxxjn/QNHSxkGAPDo Sxvb1iGvqHXZVGFLjq8zey7K0mi2yKheP51qWkNzkJ8g0YraF7gIJIyT7z9Tj/XDXjsY fY8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MCxe34Hhnia0cjV9AF26LqCWX5io+d/IxIjqmGg57uI=; b=lFZ+O6ZjGDC/thBEEJ1DFyZdcigyTJIIvRIfh4bKXmqa4sMMkWZq/5lVBjuRIpDzrf ygsBQG2zykx7RcLtEDiE3lU13S8+808oibE2h7CC2ZLsYv75FdQQ0+oHLSznhplztuGd LOEPGAFWSN7kLFzWnrcsTgXIp+JDCmW0Vyk3ckhgc9x4xHORmhZGnekLJXvhrkm+q1bK wQAk5DChkFO7Mb6FbRUt9YBk1FzN0Mke2FMQHlUmz6kGLS2KZyDL/5fwjnGQYCHZheOx hoEx7PQYgOV2QqEiYJrgxOdUt4bqQ4Hp03X0x9FrMti23cBgaZLvMSzE+Q3g8yAIOeoc /D7Q== X-Gm-Message-State: AOAM531AIZ8bJuwge98kg1QdfJD0XyPOTCjnxtRpuiReQ/6EhT63PBnA +udLhT+oUbN08PjZjAw4TZXZh7yImDgim0e6YQ4= X-Google-Smtp-Source: ABdhPJzJ5FthtC7RlkjTU0dUo2rh+FCTRD0oioVMsohgA2fdNlXh+RtvvDak6fAFRkeQ1Hh3mXgmlHMxyVAqREU6u5w= X-Received: by 2002:a05:6602:160a:b0:648:cf59:3613 with SMTP id x10-20020a056602160a00b00648cf593613mr4178500iow.163.1647608682881; Fri, 18 Mar 2022 06:04:42 -0700 (PDT) MIME-Version: 1.0 References: <20220227235303 DOT 5d6239724ed83b145772134b AT nifty DOT ne DOT jp> <20220302081259 DOT 2a7e522ef1a9e3e6da0aa259 AT nifty DOT ne DOT jp> <20220303090208 DOT 4a04e35756b7868fe9b4701d AT nifty DOT ne DOT jp> <20220312063625 DOT 9ca3d42d4e2e941a13fa7909 AT nifty DOT ne DOT jp> <20220318132335 DOT d5635fe9fc782ed53bddf7bc AT nifty DOT ne DOT jp> <20220318142243 DOT 1751c742ebaae47e8fba9b47 AT nifty DOT ne DOT jp> <20220318153058 DOT 22d217eea1bb746e709da555 AT nifty DOT ne DOT jp> <20220318211522 DOT 936158f91219816ca5c707e7 AT nifty DOT ne DOT jp> In-Reply-To: <20220318211522.936158f91219816ca5c707e7@nifty.ne.jp> From: Orgad Shaneh Date: Fri, 18 Mar 2022 15:04:31 +0200 Message-ID: Subject: Re: Typed characters are mis-ordered when CPU usage is high To: Takashi Yano X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano wrote: > > On Fri, 18 Mar 2022 13:21:00 +0200 > Orgad Shaneh wrote: > > > Git for Windows > > > > Were you able to reproduce? > > > > I found an easier way to reproduce, which works almost every time. > > > > It still happens only on Git Bash, and not on MSYS2 MINGW64, although > > I use the same dll in both. I have no idea why there's a difference. > > :/ > > > > I run Windows Terminal, but it reproduces also in cmd, as you tried. > > > > 1. In Control Panel -> Keyboard, set Repeat delay to shortest and > > Repeat rate to fastest. > > 2. In msys2-runtime run git fetch > > 3. Type git and press and hold q > > Thanks. I can reproduce the issue. I think I found the cause. > The two unexpected things happen. > > (1) wVirtualKeyCode and wVirtualScanCode of readback key event may > be null'ed even if they are not zero on WriteConsoleInputW(). > Therefore, memcmp() report the event is not equal. > (2) WriteConsoleInputW() may not be atomic. The event sequence which > is written by WriteConsoleInputW() may be inserted by key input > in the middle of the sequence. > > A patch for these issues is attached. Could you please test? > > -- > Takashi Yano Awesome, looks good now. Thank you very much! Hope this is the last bit :) - Orgad -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple