Subject: bug#11749: Acknowledgement (24.1; C-mode indentation gives wrong-type-argument error.)

From: Stefan Monnier <[email-masked]>
Date: Fri, 07 Sep 2012 10:53:38 -0400

>>> > Yes. It looks like the "state cache" (a cache of certain brace, paren 
>>> > and bracket positions) has got corrupted.
>>> > This is difficult to make repeatable, and is very dependent upon the 
>>> > exact navigation taken around the C buffer.
>>> Well - my navigation triggers that bug a lot.
>> It's strange that it doesn't seem to be happening much to other people.
> It happens to me irregularly.  There is generally no way to re-create
> it, so I've stopped reporting these.  I wish there were some way to
> record all actions in c-mode buffers such that they could be saved and
> re-played when this type of problem happens.  If there were some sort of
> debug flag I could turn on, I would turn it on by default and hopefully
> be able to catch some useful information.

If the problem happens while browsing a file (i.e. without any
intervening buffer modifications), then a trace of calls to
font-lock-default-fontify-region (but only those in the affected buffer)
might do the trick.

This said, I'm wondering why cc-mode's cache of parsing state is
so fragile.

        Stefan