Bug 297644 - Crash on failed build: Qt Assertion triggered in QAbstractItemModel::beginInsertRows by MakeOutputModel::addLineBatch when 0 lines are added
Summary: Crash on failed build: Qt Assertion triggered in QAbstractItemModel::beginIns...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Output Views (show other bugs)
Version: git master
Platform: Debian unstable Linux
: NOR major
Target Milestone: 4.3.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 298823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-07 11:12 UTC by emw-kdebugs
Modified: 2012-05-01 22:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8a0b638c58dcfe261ce789963be2413300a65fc6


Attachments
Proposed bugfix/patch (1.35 KB, patch)
2012-04-07 11:12 UTC, emw-kdebugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emw-kdebugs 2012-04-07 11:12:50 UTC
Created attachment 70207 [details]
Proposed bugfix/patch

Dear KDevelop team,

with a fresh compile of current git/master (git pull a few minutes ago), my KDevelop crashes if a C++/make based build fails.
My KDE compilation is as follows:

    base system: debian/sid, amd64
    Qt/KDE/KDevelop compiled with kdesrc-build, CMAKE_BUILD_TYPE=Release
    Qt:  4.8.1 (from git/4.8 branch)
    KDE: 4.8.2 (git/4.8 branch)
    KDevelop: git/master

The relevant stack trace is:

#11 0x00007f36201d8b58 in qt_assert (assertion=0x7f3620417e13 "last >= first", file=0x7f3620417b80 ".../kde/kde-4.8/src/qt/src/corelib/kernel/qabstractitemmodel.cpp", line=2413) at /home/data/others/install/kde/kde-4.8/src/qt/src/corelib/global/qglobal.cpp:1999
#12 0x00007f362030c944 in QAbstractItemModel::beginInsertRows (this=0x630a4f0, parent=..., first=166, last=165) at .../kde/kde-4.8/src/qt/src/corelib/kernel/qabstractitemmodel.cpp:2413
#13 0x00007f35ed92665a in MakeOutputModel::addLineBatch() () from .../kde-4.8/install/lib/kde4/kdevmakebuilder.so
#14 0x00007f3620330357 in QMetaCallEvent::placeMetaCall (this=0x630e120, object=0x630a4f0) at .../kde/kde-4.8/src/qt/src/corelib/kernel/qobject.cpp:525
#15 0x00007f36203315dd in QObject::event (this=0x630a4f0, e=0x630e120) at .../kde/kde-4.8/src/qt/src/corelib/kernel/qobject.cpp:1195
#16 0x00007f361f151a4e in QApplicationPrivate::notify_helper (this=0x1470860, receiver=0x630a4f0, e=0x630e120) at .../kde/kde-4.8/src/qt/src/gui/kernel/qapplication.cpp:4554

Obviously, first > last for "first=166, last=165" in #12. This happens, if MakeOutputModel::addLineBatch is called with 0 lines added.

With the attached git-formatted patch for MakeOutputModel::addLineBatch, the problem "disappears" for me - I can continue to work properly with kdevelop. I'm not sure if it is only a fix of the "effect" or the "source", thus feel free to just ignore the attached patch if it is not appropriate or if you committed a bugfix while I was typing  this bug report ;-) If you need further information, please let me know.

With best regards, 

   Martin
Comment 1 emw-kdebugs 2012-05-01 10:11:25 UTC
Hi all,

I just noted that this bug has been fixed with git commit "8a0b638c58dcfe261ce789963be2413300a65fc6" in branch 4.3 (seems to originate from merge with master).

Should we close this bug then? 

Furthermore, I noticed that Bug 298823 (https://bugs.kde.org/show_bug.cgi?id=297644) might be a duplicate of this bug.

Best regards, 
   Martin
Comment 2 Milian Wolff 2012-05-01 22:06:56 UTC
*** Bug 298823 has been marked as a duplicate of this bug. ***