Summary: | KCacheGrind crashed after setting additional source folder | ||
---|---|---|---|
Product: | [Developer tools] kcachegrind | Reporter: | Gennady <gennady> |
Component: | general | Assignee: | Josef Weidendorfer <josef.weidendorfer> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
cachegrind file
PHP source Fix |
Description
Gennady
2011-08-29 01:54:17 UTC
Oh, wow.
According to the back trace, the crash is triggered by a timer resulting in a geometry change of some cell in the list used by the source annotation view, which itself results in a repainting of part of the list, and it finally
crashes in redrawing a complex widget part using the Oxygen style, deeply
in X11 libraries.
I can not see any relation of this crash to your description of how to
reproduce the bug:
> The application crashes when loading a cachegrind file from the same
> directory as an additional source folder, with the cachegrind containing
> a file from that same source folder (in the root).
Does the crash really disappear when you remove the additional source folder?
Of course, the source file still needs to be found to get the redrawing
in the source annotation which triggers the bug. To ensure that, you could
check that the source file path in the loaded callgrind.out file points to
the correct absolute path where the source is found (just open the file with
any text editor, search for the file name, and change the path).
I assume it to be highly likely that the crash is fixed by upgrading to a
newer version of KDE, Qt and/or X11 libs, as the back trace does not include any
function from KCachegrind sources.
Can you check if the crash goes away when switching to a style other than
Oxygen? As KCachegrind's source view still uses some Qt3 compatibility widgets,
it may be that an Oxygen bug with Qt3 compat widgets was not fixed yet for the
KDE version you are using.
I'll keep the bug report open anyway as reminder to port all widgets still
using Qt3 compat widgets to Qt4 widgets (this is needed anyway for Qt5 in the
not-too-distant future).
Created attachment 63286 [details]
cachegrind file
Created attachment 63287 [details]
PHP source
Josef, Thank you for your reply. The crash does disappear, but the source file is not loaded, obviously. I'm loading a cachegrind, it's loads up, I can click the functions, click the Types, Callers, All Callers, Callee Map tabs no problem,however as soon as I click on the Source tab KCachegrind freezes for about 5 minutes and then crashes. I have however managed to look at the source code by clicking a function other than {main}. I can view the source code, however as soon as click {main} it freezes and crashes. The source file inside the cachegrind was in a different path, and I do not wish to reconstruct the path on another machine, so I figured that I could supply a path of my own and KCachegrind would grab a matching filename, no? I am really sorry, but I have no idea how to switch styles for KCachegrind. I'm using a GNOME desktop, though. I'm attaching both the cachegrind and the source file. I'm placing both files into /tmp/cachegrinds/ and adding that directory to the source directories in KCachegrind. Hope my info helps. Let me know if you need any additional information. Regards, Gennady. One other thing... I just redone my test and the filepath points to an existing file on the system, same source, removed source from directories in KCachegrind. Same problem. Freezes up. Thanks. I am able to reproduce the problem. It is because the following lines in the dump file: ... fl=...index.php fn={main} ... 172878212 113 The last line is problematic. I have no idea why xdebug writes it, but this is definitely buggy. It says that in line number 172878212 of file index.php there is a cost of 113. You should send this as bug report to xdebug. On the other hand, KCachegrind should gracefully handle such invalid input. Created attachment 63290 [details]
Fix
Proposed bug fix. Does this help?
Josef, Applied the patch to the source files and recompiled and it did indeed help. I'm able to view source with {main} selected, and all the other stuff. Thank you very much. I have filed a bug report with XDebug and provided a link to this report as well, so that they can see if there are problems with how XDebug constructs its dump. Do let me know if you need additional information. Thanks again for your quick response, patch and an awesome piece of software. Best of luck, Gennady. Cool, thanks. Fixed in r1250797. Closing. |