Re: Strange bug in code highlighting

Matthew Woehlke <[email protected]>
Newsgroups gmane.comp.kde.users.kdevelop
Message-ID <[email protected]>
On 2018-02-27 11:12, Sven Brauch wrote:
> Yes, it's known. It is extremely difficult to trace though. [...]
> Any insights on how to reproduce the issue are very welcome.

Hmm... here's an interesting data point. I had TTBOMK no active parsing
(KDevelop sitting idle for a while). Then I switched to a different git
branch (outside of KDevelop), followed immediately by doing a pull (so,
possibly, KDevelop started parsing the pre-pull files). I then opened a
file that I did not previously have open, and am seeing this issue.

Thus, at the least, I can say with some confidence that the problem
doesn't seem to depend on editing a file *in KDevelop*. There may be an
issue with a file being changed on disk, outside of KDevelop, while it
is being parsed.

A rough guess what may be happening:

- File changes on disk ("rev A").
- KDevelop starts to re-parse file.
- File changes on disk again ("rev B").
- KDevelop finishes parsing "rev A".
- User opens file in KDevelop.
- KDevelop highlights per "rev A", but file content is "rev B".

...although I was unsuccessful at trying to reproduce that intentionally.

-- 
Matthew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.