Summary: | Crash when expanding project folder in Projects tab | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Alexander <ashaduri> |
Component: | UI: all modes | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED WAITINGFORINFO | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.0.0 | |
Sentry Crash Report: |
Description
Alexander
2015-11-09 18:01:00 UTC
do you only get that crash for svn projects? what icon theme are you running? are you using gnome, kde, or any other DE? do you see warnings on the console regarding icons? could you temporarily rename ~/.cache/icon-cache.kcache and see if that "fixes" the issue? If so, then it clearly is something bogus within the icon cache and we'd have to investigate that cache file somehow. Hi,
Renaming ~/.cache/icon-cache.kcache didn't help.
Checked with a newly created project with no version control, didn't crash. So it seems to be related to SVN somehow.
I'm running KDE Plasma 5.
I forgot to mention that this is a hidpi screen (3200x1800 on a 13.3" laptop) so I have UI scaling set to 2.5 in Display settings. The icon sizes are the defaults (I clicked the "Defaults" button in the icon size dialog of KDE configuration, just in case).
The icon theme is Breeze (the default openSUSE one). Changed it to Oxygen, still crashes.
This is the full output of KDevelop:
> kdevelop
Ninja plugin installed but ninja is not installed.
Could not load plugin "KDevNinjaBuilder" , it reported the error: "" Disabling the plugin now.
Ninja plugin installed but ninja is not installed.
Could not load plugin "KDevNinjaBuilder" , it reported the error: "" Disabling the plugin now.
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
job started 0x3b86c50
job done SvnInternalInfoJob(0x3b86c50)
Segmentation fault
Super odd :( When you comment out the painting of the icon in ProjectModelItemDelegate::paint, does it suddenly work for you then or do you get crashes elsewhere? Or could you add a bit of debug info around there to see what's going on with the icon? Without a way for us to reproduce it, I'm hard pressed at finding a solution for your issue... sorry! OK, did some print-based debugging today. In ProjectModelItemDelegate::paint(): Every call (both crashing and non-crashing) goes inside both if() conditions in the beginning. The crash happens here, near the end: icon.paint(painter, decorationRect, opt.decorationAlignment, mode, state ); If I comment it out, the crash happens here instead: drawDisplay(painter, opt, displayRect, displayData); If I comment that one out as well, there's no crash, but obviously I don't get the icons or the folder names at all. The executed lines for non-crashing and crashing calls are the same. When expanding the tree, right after executing this line: QString branchNameData = index.data(VcsOverlayProxyModel::VcsStatusRole).toString(); the following is printed to console (before the next line is executed): job started 0x2849aa0 job done SvnInternalInfoJob(0x2849aa0) Non-crashing values of rectangles (XxY, WxH): before doLayout() call: displayRect: 19x0, size: 32x23 decorationRect: 0x0, size: 20x20 after doLayout() call: displayRect: 36x0, size: 253x23 decorationRect: 13x1, size: 20x20 Crashing values of rectangles: before doLayout() call: displayRect: 19x0, size: 36x23 decorationRect: 0x0, size: 20x20 after doLayout() call: displayRect: 46x23, size: 226x23 decorationRect: 23x24, size: 20x20 That's all I can think of right now, please tell me if there's anything else you want to know. Thanks Can you run it through valgrind and see what you get reported? The stuff above doesn't look suspicious to me... valgrind --track-origins=yes --smc-check=all-non-file kdevelop -s ... And is the project you are working on FOSS, i.e. can I check it out via svn and try to reproduce it locally? Hi,
The project I was testing it with is not FOSS, but I re-ran kdevelop with an open source one and still got a crash. Here's the checkout URL for easy testing:
svn checkout svn://svn.code.sf.net/p/gsmartcontrol/code/trunk gsmartcontrol
This is the valgrind output (there are no warnings except that IOCTL one until I expand the project tree).
> valgrind --track-origins=yes --smc-check=all-non-file kdevelop
==30551== Memcheck, a memory error detector
==30551== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==30551== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==30551== Command: kdevelop
==30551==
Ninja plugin installed but ninja is not installed.
Could not load plugin "KDevNinjaBuilder" , it reported the error: "" Disabling the plugin now.
Ninja plugin installed but ninja is not installed.
Could not load plugin "KDevNinjaBuilder" , it reported the error: "" Disabling the plugin now.
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
The font for use in the terminal has not been matched exactly. Perhaps it has not been found properly.
==30551== Warning: noted but unhandled ioctl 0x6458 with no size/direction hints.
==30551== This could cause spurious value errors to appear.
==30551== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
settingsFile: "/home/alex"
settingsFile: "/home/alex"
settingsFile: "/home/alex"
settingsFile: "/home/alex"
==30551== Thread 11 Queue(0x292381e0)[06]:
==30551== Invalid read of size 8
==30551== at 0x355C3420: svn_utf__cstring_is_valid (in /usr/lib64/libsvn_subr-1.so.0.0.0)
==30551== by 0x355C2580: ??? (in /usr/lib64/libsvn_subr-1.so.0.0.0)
==30551== by 0x355C2B0B: svn_utf_cstring_from_utf8 (in /usr/lib64/libsvn_subr-1.so.0.0.0)
==30551== by 0x355AF795: svn_path_cstring_from_utf8 (in /usr/lib64/libsvn_subr-1.so.0.0.0)
==30551== by 0x3559C42F: svn_dirent_get_absolute (in /usr/lib64/libsvn_subr-1.so.0.0.0)
==30551== by 0x34EF13F4: svn_client_info2 (in /usr/lib64/libsvn_client-1.so.0.0.0)
==30551== by 0x34EF1442: svn_client_info (in /usr/lib64/libsvn_client-1.so.0.0.0)
==30551== by 0x34C8A6C3: svn::Client::info(svn::Path const&, bool, svn::Revision const&, svn::Revision const&) (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevsubversion.so)
==30551== by 0x34C6DF5E: SvnInternalInfoJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevsubversion.so)
==30551== by 0x10621B9F: ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== by 0x1062092F: ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== by 0x1061FF39: ThreadWeaver::Thread::run() (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== Address 0x29765e50 is 80 bytes inside a block of size 86 alloc'd
==30551== at 0x4C29670: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==30551== by 0xC199918: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.21)
==30551== by 0xC199BEA: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib64/libstdc++.so.6.0.21)
==30551== by 0xC19A20D: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.21)
==30551== by 0x34C9048A: svn::Path::init(char const*) (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevsubversion.so)
==30551== by 0x34C9032F: svn::Path::Path(char const*) (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevsubversion.so)
==30551== by 0x34C6DF28: SvnInternalInfoJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevsubversion.so)
==30551== by 0x10621B9F: ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== by 0x1062092F: ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== by 0x1061FF39: ThreadWeaver::Thread::run() (in /usr/lib64/libKF5ThreadWeaver.so.5.15.0)
==30551== by 0xBA9755E: QThreadPrivate::start(void*) (qthread_unix.cpp:331)
==30551== by 0x12FF10A3: start_thread (in /lib64/libpthread-2.19.so)
==30551==
job started 0x41decc40
job done SvnInternalInfoJob(0x41decc40)
==30551== Thread 1:
==30551== Invalid read of size 2
==30551== at 0xB2EBB30: QTransform::type() const (in /usr/lib64/libQt5Gui.so.5.5.0)
==30551== by 0xB27C3A9: ??? (in /usr/lib64/libQt5Gui.so.5.5.0)
==30551== by 0xB284137: QRasterPaintEngine::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (in /usr/lib64/libQt5Gui.so.5.5.0)
==30551== by 0xB29C682: QPainter::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) (in /usr/lib64/libQt5Gui.so.5.5.0)
==30551== by 0x82C79B7: KIconEngine::paint(QPainter*, QRect const&, QIcon::Mode, QIcon::State) (in /usr/lib64/libKF5IconThemes.so.5.15.0)
==30551== by 0xB0E6142: QIcon::paint(QPainter*, QRect const&, QFlags<Qt::AlignmentFlag>, QIcon::Mode, QIcon::State) const (in /usr/lib64/libQt5Gui.so.5.5.0)
==30551== by 0x3C609DF9: ProjectModelItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (in /opt/local/kdevelop/lib64/plugins/kdevplatform/24/kdevprojectmanagerview.so)
==30551== by 0xAAD45CE: QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (in /usr/lib64/libQt5Widgets.so.5.5.0)
==30551== by 0xAAD8111: QTreeView::drawTree(QPainter*, QRegion const&) const (in /usr/lib64/libQt5Widgets.so.5.5.0)
==30551== by 0xAADE67F: QTreeView::paintEvent(QPaintEvent*) (in /usr/lib64/libQt5Widgets.so.5.5.0)
==30551== by 0xA88D43A: QWidget::event(QEvent*) (in /usr/lib64/libQt5Widgets.so.5.5.0)
==30551== by 0xA9874DD: QFrame::event(QEvent*) (in /usr/lib64/libQt5Widgets.so.5.5.0)
==30551== Address 0x118 is not stack'd, malloc'd or (recently) free'd
==30551==
==30551==
==30551== HEAP SUMMARY:
==30551== in use at exit: 102,896,036 bytes in 254,464 blocks
==30551== total heap usage: 2,050,937 allocs, 1,796,473 frees, 516,220,491 bytes allocated
==30551==
==30551== LEAK SUMMARY:
==30551== definitely lost: 13,807,408 bytes in 396 blocks
==30551== indirectly lost: 25,239 bytes in 467 blocks
==30551== possibly lost: 45,555,749 bytes in 20,069 blocks
==30551== still reachable: 43,507,640 bytes in 233,532 blocks
==30551== suppressed: 0 bytes in 0 blocks
==30551== Rerun with --leak-check=full to see details of leaked memory
==30551==
==30551== For counts of detected and suppressed errors, rerun with: -v
==30551== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 1 from 1)
I don't think this is something we can fix, there are numerous reports with similar backtraces on either BKO or Qt JIRA (just google for "QRasterPaintEngine::drawPixmap crash qtransform type"). with a reproducible test case, we might be able to fix it in qt upstream ;-) I'll try to reproduce this bug hopefully tomorrow, if time permits I guess the easiest way to reproduce this would be to install a clean OpenSUSE Leap 42.1 in VirtualBox. KDevelop git master was basically the first thing I compiled/installed right after installing OpenSUSE and KDevelop's required and optional dependencies. I have strange painting issues with the gsmartcontrol project, i.e. expanding a folder does not update the tree immediately. But no crash and valgrind is also not reporting anything about a broken QTransform :( So I'm out of luck in fixing it myself. @Alexander: Any chance you could compile Qt from sources in debug mode and retrigger this issue? Then the backtrace would show us more details (i.e. file + line into Qt sources). One more idea: what happens when you move the following line down to where it is being used: QString branchNameData = index.data(VcsOverlayProxyModel::VcsStatusRole).toString(); and/or what happens if you replace it by QString branchNameData; // = index.data(VcsOverlayProxyModel::VcsStatusRole).toString(); I ask b/c this potentially spins up a nested eventloop leading to all kinds of funny issues... If this "fixes" the issue, then we at least know where to look for a fix. Moving the line helped, no crash and so far it looks like everything is OK! Must be the event loop then... Commenting it out also helps (obviously). Finally, I can use KDevelop 5 properly, thanks! OK, ouch... I'll commit this as a hotfix and will think of a way to solve it for real. Thanks for the tests! Git commit 7b0b2ae069377585e3416c7d8431a1a11520e0a9 by Milian Wolff. Committed on 07/12/2015 at 23:24. Pushed by mwolff into branch '5.0'. Workaround crash when expanding project folder. Nested eventloops are evil, and the querying of the branch name apparently can trigger a nested eventloop in SVN projects that can trigger all kinds of havoc. Moving the line down seems to reduce the crashiness of this code. A proper solution is still required. M +4 -1 plugins/projectmanagerview/projectmodelitemdelegate.cpp http://commits.kde.org/kdevplatform/7b0b2ae069377585e3416c7d8431a1a11520e0a9 @op: Do you still get this crash? No, no crashes after Milian's commit. Thanks! |