https://bugs.kde.org/show_bug.cgi?id=334487

--- Comment #31 from Piotr Mierzwinski <piotr.mierzwin...@gmail.com> ---
Hmm. I think you told me that in KDevelop 5 there is pretty new parser based on
clang, so I thought this is new code. Never mind. Maybe not all is new.
What do you mean saying "another oldcpp bug"?
Here, in Mageia 5, I have installed "libstdc++6-4.9.2-4.1.mga5" is this
"oldcpp"? Or you mean oldcpp plugin in KDevelop?

Back to test.
OK. I tried to reproduce it again using this time test case from Bug 353905
(marked as duplicate) with KDevelop-4.7.2 on Mageia 5 (on real machine, but it
happen also in VirtualBox 5).

I will say at the outset that my KDevelop cache is placed on the ram disk, so I
have linked "~/.cache/kdevduchain" to /tmp/piotr-kdevduchain. I'm not sure if
this is important, but maybe will help.

Going further.
Before running the test I removed kdevduchain cache (of course KDevelop wasn't
running in this moment) - it was session directory calling:
"kdevelop-{e4d7275a-9f43-4eb0-a9cb-f5cb819a0df5}".
Time for the steps (a bit improved comparing mentioned bug report):

1. Run KDevelop with my project (qtcmd2) and only opened src/filelistview.cpp
2. When cache has been generated. Find (using shortcut Ctrl+Alt+N) following
method: slotOpenSelected
3. Find following line: "m_sLastSelectedItemName = currentFileName();" (the way
of looking doesn't matter)
    Note, In this function there are two occurrences such assignment and in my
test I used second one, which is placed couple of lines below first one.
4. Move cursor on the "currentFileName()" (second occurrence)
5. Invoke "Show uses"

KDevelop doesn't crash, but parser does something through for a while and stops
on 25% (see attachment) or 0% (happened when I repeat test). Anyway I was
waiting till finished about 10-15 min. and nothing changed. So I started to
invoked other "Find uses" on other functions located in slotOpenSelected, for
example: "slotBreakCurrentOperation" - no result, "openSelectedItemsWith" - no
result, "numberOfSelectedItems" - no result. Code browser still empty. Only I
can see that KDevelop uses a lot of CPU:

 PID   USER      PRI  NI  VIRT    RES     SHR     S CPU% MEM%   TIME+    
Command
 1076 piotr      20   0   1476M 1076M 77624 S 69.3    6.7         12:58.44 
/usr/bin/kdevelop
 1188 piotr      20   0   1476M 1076M 77624 S 16.4    6.7           4:04.99 
/usr/bin/kdevelop
 1097 piotr      20   0   1476M 1076M 77624 S 11.6    6.7           3:54.56 
/usr/bin/kdevelop
 1182 piotr      20   0   1476M 1076M 77624 R 40.7    6.7           3:53.70 
/usr/bin/kdevelop

And still allocates more and more memory. Please take a look at the screen
shots. Second one I made several dozen after first one. I have now 16GB ram and
swap, so I will wait a while till free memory finished and then probably
KDevelop crashed. In a moment of original test I had only 4GB, so it happened a
bit faster.
Anyway when I closed KDevelop then I get "KDevelop crash window" - using to
send crash report. I didn't attach report, because it told me that I have not
enough information for programmers (despite I have installed debug packages). I
know that I should to run KDevelop in gdb If I want to get the backtrace from
the crash.

I think it should finish ("Find uses" operation) really quickly, because I have
now quite strong hardware (Core i7-6700 Skylake + 16GB ram). Before (in a
moment of original test) I had AMD Phenom II X4 955 + 4GB and happened the
same. OK. Sometime KDevelop crashed faster.

When I was using 4.7.1 version I didn't observe such behavior. KDevelop either
worked (all were found) or crashed, but didn't parser stop like this and
allocated memory without end.

Because this test based on my project I remind its location:
git://git.qtcmd.org/qtcmd2.git
Sorry, my test is not some simply one-file project. I didn't test this with
other project.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to