bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode

Alan Mackenzie
Hello, Konstantin.

First of all, thanks for taking the trouble to report this bug, and
thanks even more for taking the diagnosis so far.

On Fri, Feb 12, 2021 at 17:08:19 +0300, Konstantin Kharlamov wrote:
> On Wed, 2021-02-10 at 01:13 +0300, Konstantin Kharlamov wrote:
> > I just bisected it to a commit

> >     3096437593 CC Mode: introduce a new cache for brace structures.  This
> > fixes bug #45248

> > before this commit I couldn't reproduce it, and on this I reproduce it
> > immediately.

> > CCing the commit author.

> So, what's the plan here? Should I send a revert?

No, please don't do that - that was an essential fix for a performance
bug.

> CC: Alan Mackenzie (I know I already CCed, but I figured they might
> not know they were mentioned if they has mail filters for example,
> since I didn't write the name).

Sorry, I should have got back to you sooner, but I wanted to have
something to show.

I don't think the bug was introduced by the commit you cite, more likely
that commit triggered the bug which was lying in wait elsewhere.

I've been working on this bug for several hours, so far, and have found
that the "c-state-cache" (which records the positions of certain braces,
brackets and parentheses) becomes corrupt while running your `test'
function.  I'm trying to track down where and how this corruption
happens.

Also relevant is that the bug seems to be being triggered by the
apostrophe in

    bar("Couldn't open %s", to);
               ^

..  At least, if I take that apostrophe away, I don't see the bug
symptoms any more.

So, please bear with me some while longer.  I am working on the bug.

--
Alan Mackenzie (Nuremberg, Germany).



Reply | Threaded
Open this post in threaded view
|

bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode

Alan Mackenzie
Hello, Konstantin.

On Thu, Feb 18, 2021 at 00:59:08 +0300, Konstantin Kharlamov wrote:

> Hey! Sorry: I'm replying to the wrong email because it seems I stopped
> receiving notifications for the report since the last time I sent an
> email here. I didn't even know there was a discussion ongoing till I
> occasionally looked through the web interface ☺ The web-interface
> doesn't allow to reply a specific comment, so I had to reply to an
> arbitrary email, last one I got in my mailbox. Sorry. (on a side-note,
> Idk what happened to notifications. I looked through spam and other
> folders, tried using built-in search on my email-provider in case some
> filter put them into a random folder, but emails are nowhere to be
> seen. Looks like I just wasn't getting any notifications).

I kept getting rejections from you mail server (something to do with my
ISP's server not sending a STARTTLS operator), so in the end I stopped
adding your address to the To: or Cc: headers.

It might well be I messed something up when I merged this bug with the
other one.  I've not done merging of bugs very often.

Sorry you didn't get the posts from debbugs.gnu.org.

> Alan Mackenzie wrote:

> > A pleasure!  I intend to commit the patch below in a few days time,
> > if I don't hear back from anybody that it's giving trouble.  This
> > patch fixes the bug when applied to that commit from December
> > (9022df70270243f211c54ccd66800320148b8434).  It should apply cleanly
> > to master.

> Oh, this is amazing! I'll give the patch a try as well. I assume though
> there will be nothing to report (well, other than "Thank you for fixing
> the bug" 😉), but if I happen to find some other problem, I'll make
> sure to drop an email either here or to a new report :)

Thank you, indeed!  I haven't committed the patch, yet, and I'll leave
off a few days yet.  It's surprising just how often asking people to
check patches for their bugs gets a reply that things aren't properly
fixed.

--
Alan Mackenzie (Nuremberg, Germany).



Reply | Threaded
Open this post in threaded view
|

bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode

Alan Mackenzie
Hello again, Konstantin.

On Thu, Feb 18, 2021 at 11:21:50 +0000, Alan Mackenzie wrote:

> On Thu, Feb 18, 2021 at 00:59:08 +0300, Konstantin Kharlamov wrote:
> > Hey! Sorry: I'm replying to the wrong email because it seems I stopped
> > receiving notifications for the report since the last time I sent an
> > email here. I didn't even know there was a discussion ongoing till I
> > occasionally looked through the web interface ☺ The web-interface
> > doesn't allow to reply a specific comment, so I had to reply to an
> > arbitrary email, last one I got in my mailbox. Sorry. (on a side-note,
> > Idk what happened to notifications. I looked through spam and other
> > folders, tried using built-in search on my email-provider in case some
> > filter put them into a random folder, but emails are nowhere to be
> > seen. Looks like I just wasn't getting any notifications).

> I kept getting rejections from you mail server (something to do with my
> ISP's server not sending a STARTTLS operator), so in the end I stopped
> adding your address to the To: or Cc: headers.

Apologies: I got your email address confused with another one beginning
with 'k'.  Your address works just fine, and I never deliberately
omitted it from a Cc:.

> It might well be I messed something up when I merged this bug with the
> other one.  I've not done merging of bugs very often.

> Sorry you didn't get the posts from debbugs.gnu.org.

> > Alan Mackenzie wrote:

> > > A pleasure!  I intend to commit the patch below in a few days time,
> > > if I don't hear back from anybody that it's giving trouble.  This
> > > patch fixes the bug when applied to that commit from December
> > > (9022df70270243f211c54ccd66800320148b8434).  It should apply cleanly
> > > to master.

> > Oh, this is amazing! I'll give the patch a try as well. I assume though
> > there will be nothing to report (well, other than "Thank you for fixing
> > the bug" 😉), but if I happen to find some other problem, I'll make
> > sure to drop an email either here or to a new report :)

> Thank you, indeed!  I haven't committed the patch, yet, and I'll leave
> off a few days yet.  It's surprising just how often asking people to
> check patches for their bugs gets a reply that things aren't properly
> fixed.

I have now committed the patch to all relevant places, and I'm going to
close bug #45375 (which has been merged with bug #46400) next.

--
Alan Mackenzie (Nuremberg, Germany).



Reply | Threaded
Open this post in threaded view
|

bug#46400: [BISECTED] Sporadically breaking newline-indentation in c-mode

Konstantin Kharlamov
On Tue, 2021-02-23 at 11:26 +0000, Alan Mackenzie wrote:
> Hello again, Konstantin.

Hello!

> Apologies: I got your email address confused with another one beginning
> with 'k'.  Your address works just fine, and I never deliberately
> omitted it from a Cc:.
>
> > It might well be I messed something up when I merged this bug with the
> > other one.  I've not done merging of bugs very often.
>
> > Sorry you didn't get the posts from debbugs.gnu.org.

No worries!

> > > Alan Mackenzie wrote:
>
> > > > A pleasure!  I intend to commit the patch below in a few days time,
> > > > if I don't hear back from anybody that it's giving trouble.  This
> > > > patch fixes the bug when applied to that commit from December
> > > > (9022df70270243f211c54ccd66800320148b8434).  It should apply cleanly
> > > > to master.
>
> > > Oh, this is amazing! I'll give the patch a try as well. I assume though
> > > there will be nothing to report (well, other than "Thank you for fixing
> > > the bug" 😉), but if I happen to find some other problem, I'll make
> > > sure to drop an email either here or to a new report :)
>
> > Thank you, indeed!  I haven't committed the patch, yet, and I'll leave
> > off a few days yet.  It's surprising just how often asking people to
> > check patches for their bugs gets a reply that things aren't properly
> > fixed.
>
> I have now committed the patch to all relevant places, and I'm going to
> close bug #45375 (which has been merged with bug #46400) next.


Thank you! FTR, I have used your patch since my previous email, and haven't
noticed any problems. In fact, I even found one thing fixed (but I don't know if
it's relevant to the patch or was it some other change on master), which is that
if I remove a " symbol around a string, code gets re-highlighted immediately (I
seem to remember it was rehighlighted with a delay previously).

So, all in all, my experience is great so far!