Subject: bug#60556: 29.0.60; Fatal error accurred when editing init.el with flymake enabled on Windows 10

From: Eason Huang <[email-masked]>
Date: Sun, 22 Jan 2023 14:34:23 +0800

Eason Huang <[email-masked]> writes:

> Eason Huang <[email-masked]> writes:
>
>> Hi emacs,
>>
>> When I editing my ~/.config/emacs/init.el file, Emacs will raise a fatal
>> error frequenly when flymake-mode enabled.
>>
>> With a few hours debug, I found that it's related to flymake-mode and
>> Borg( A package manager writed by Jonas Bernoulli).
>>
>> Borg repos: https://github.com/emacscollective/borg
>>
>>
>> This issue can be fixed by disable flymake-mode or without Borg, just
>> use package.el to install packages.
>>
>> It would be nice if I can use Borg with flymake-mode. I am not sure this
>> bug if from Borg or flymake-mode or Emacs itself, so I report it here.
>>
>
> I also reported an issue to Borg. See more infomation by the link bellow:
> https://github.com/emacscollective/borg/issues/140
>
> I guess the issue is cause by the implementation of UI displaying on
> MS-Windows.
>
> JoJoão and Eli, do you have any advice on how to debug with this issue?
>
> Thanks in advance.

Now I can reproduce the issue with `emacs -Q`. So now I can confirm that
the isse is not related to Borg.

We need to use a larger buffer for reproduce.
for example, I use the flmake.el instead of a simple test file.

Steps to reproduce:

1. Start Emacs 29 with emacs -Q
2. C-c C-f ~/test.el to open a test buffer.
3. Copy all the content of flymake.el to ~/test.el
4. Enable flymake-mode with M-x flymake-mode
5. Try to add some blank lines and then C-x C-s to save buffer
6. Repeat step 5 many times, you will get the fatal error pos up.

See the picture by this link:
https://github.com/emacscollective/borg/issues/140#issuecomment-1399414074

-- 
Eason Huang