Bug 383876 - Parser stops work when I have opened several files
Summary: Parser stops work when I have opened several files
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 23:23 UTC by Piotr Mierzwinski
Modified: 2022-11-30 17:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2017-08-22 23:23:08 UTC
During work I opened many files. KDevelop takes 1.6GB ram. Still I have opened 15 files. In one of them (header) I comment some member, which is used in cpp file. I switch to cpp and I wait till every usage this member will be underlined as error. I wait, wait and wait. Couple minutes passed. Usage of member is still not underlined. I refreshed file (F5) and member is underlined.
After that I uncomment the same member in header file. I switched to cpp and see like usage is underlined. Again it takes several minutes and nothing happen.
For sure refresh is required.
I'm not sure what it depends on. I doesn't observe this is I have opened only couple files.
Editor view is split in vertical, so I have 2 editors.
Comment 1 Ian H 2017-08-23 18:51:57 UTC
I have seen this issue. the immediate fix (assuming your parser isnt stuck, which happens sometimes) is to reload the file.
Comment 2 Piotr Mierzwinski 2017-11-22 21:53:46 UTC
I think no one fixed this till now.

I experienced this issue after opening in my project only 3 not so big files.

Weight of first:  ~5kb  (declaration of class A), 
Weight of second: ~33kb (definition of class A), 
Weight of third: ~161kb (definition of some different class).

I inserted some new function (39 lines) in second one and started update missing declarations used in this function - it was QToolButton, and included was QMenuBar, so has been found. After that I switched to cpp, unfortunately after several seconds variable was still underlined as not defined. OK. I saved both files and refreshed definition file only, because I don't want to wait do not know how much time till parser decide to run (or never did it) and update highlighting of code :/. Of course this fixed issue.
OK. I updated next declaration of variable used in the same new function - this time it was QPushButton (of course proper include was present). After switching to cpp file I met again the same situation. After couple minutes code was still marked as wrong :(. F5 helped, but this is not solution. In my opinion issue is very annoying, why I need to run manually refresh and parser can't do it?

I don't understand why parser is not run or run properly to update code highlighting. Is it caching or what? What has been broke in code. I don't remember such issue that happened several months ago.
Comment 3 Sven Brauch 2017-11-23 12:45:04 UTC
Hm, so by "stops work" you mean "it doesn't update dependent files"?
Comment 4 Piotr Mierzwinski 2017-11-23 18:39:44 UTC
> Hm, so by "stops work" you mean "it doesn't update dependent files"?

Yes, If you understand header and cpp file (describing the same class) as dependent.
I copied and pasted some function (its definition) from different editor to mentioned file (in KDevelop). After that I started update declaration file. And in cpp file happened nothing when I added missing global variables. I expected that after I add declaration it will not be underlined like undeclared (in cpp file). It looked like parser didn't notice any changes.

Of course firstly I added declaration (in header file) of function which I inserted in cpp. As I said I needed invoke parser manually by pressing F5.
Comment 5 Justin Zobel 2022-11-10 22:32:26 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2022-11-25 05:17:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Piotr Mierzwinski 2022-11-30 16:17:37 UTC
Seems issue fixed. 
I opened 20 files, made couple tests and I don't observe the issue.
Comment 8 Piotr Mierzwinski 2022-11-30 17:41:36 UTC
(In reply to Piotr Mierzwinski from comment #7)
> Seems issue fixed. 
> I opened 20 files, made couple tests and I don't observe the issue.

Tested with:
KDevelop version 5.9.221170 (22.11.70)

$ apt show kdevelop
Package: kdevelop
Version: 4:22.08.1+p22.04+tunstable+git20221012.0016-0

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa Intel® Xe Graphics