Sometimes the highlighting of files is severely broken as shown in the attached screenshot. This may be related to: - missing translations of DUChain cursor/range locations - improper revision locking - delay between reading content from editor and actually parsing it This may be triggered by: - pasting content - switching branches In general, hard to reproduce, but when it hits you, you'll notice. F5 is the only rescue in such situations. Reproducible: Sometimes
Created attachment 96766 [details] broken highlighting
Personally, I haven't seen this issue anymore since introducing DUChain::updateReady and leveraging that in kdev-clang. I.e. Since Jan 23. Can anybody confirm? Or is this still an issue?
Still valid, I just reproduced it again.
Also broken in php and less files
Alexander, you have seen this breaking in PHP files? Can you show a screenshot please? If that is not - as I thought - a bug in kdev-clang then it would allow us to search for the culprit in the libs somewhere... Such feedback would be very welcome.
It _occasionally_ happens in other languages as well, but you need quite strange conditions to trigger that. I think the git auto-reload is a good starting point there. In clang the issue is different though, I'm certain. It somehow does not lock the correct modification revision, or doesn't do so at the right time, and if you insert a newline at exactly the right moment during the parsing run, this issue triggers. That doesn't happen in e.g. Python.
To be more correct, I have not _seen_ this happening in other languages. It is some kind of race condition; it is possible it exists in the other languages as well, but only triggers that often for clang because its parse job spends more time in a certain section.
FYI: Related reviews/commits: https://git.reviewboard.kde.org/r/128480/ http://commits.kde.org/kdevelop/5d076e29438261f3b70b633fd79551a50f0e9ef6 http://commits.kde.org/kdevplatform/c9265847835d8d534906ae7ec42aa3784c54d0df
Should be fixed, it not, please reopen.