Summary: | crash when closing a document [QList<int>::operator[], KateViewDocumentProxyModel::mapFromSource, KateViewDocumentProxyModel::removeItemFromColoring] | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | simon |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | andresbajotierra, colin, dhaumann, vivo75+kde |
Priority: | VHI | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
New crash information added by DrKonqi New crash information added by DrKonqi Backtrace. |
Description
simon
2009-11-04 03:16:59 UTC
From bug 225385 (KDE SC 4.3.98): When I open several files (of various types - PHP or C/C++ files are affected) and close them (via ctrl+w), Kate will crash. This is intermittent but very easy to reproduce (closing half a dozen files fairly quickly seems to do it, but it can also be triggered when just closing one file). #0 0x00007f2d288b4955 in raise () from /lib64/libc.so.6 #1 0x00007f2d288b5f70 in abort () from /lib64/libc.so.6 #2 0x00007f2d2681f3e4 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2250 #3 0x00007f2d2681f5c2 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f2d2697ba58 "ASSERT failure in %s: \"%s\", file %s, line %d", ap= 0x7fff4e2be5e0) at global/qglobal.cpp:2296 #4 0x00007f2d2681f775 in qFatal (msg=0x5f3e <Address 0x5f3e out of bounds>) at global/qglobal.cpp:2479 #5 0x00007f2d27558a0f in QList<int>::operator[](int) const () from /usr/lib64/libkateinterfaces.so.4 #6 0x00007f2d2755397e in KateViewDocumentProxyModel::mapFromSource (this=0x35c5df0, sourceIndex=...) at /usr/src/debug/kdesdk-4.3.98/kate/app/kateviewdocumentproxymodel.cpp:331 #7 0x00007f2d27555200 in KateViewDocumentProxyModel::removeItemFromColoring (this=0x35c5df0, row=5) at /usr/src/debug/kdesdk-4.3.98/kate/app/kateviewdocumentproxymodel.cpp:518 #8 0x00007f2d275553af in KateViewDocumentProxyModel::slotRowsAboutToBeRemoved (this=<value optimized out>, parent=<value optimized out>, start=<value optimized out>, end=6) at /usr/src/debug/kdesdk-4.3.98/kate/app/kateviewdocumentproxymodel.cpp:536 ... *** Bug 225385 has been marked as a duplicate of this bug. *** Is any additional info needed on this? This bug affects me about 10-15 times a day and it's really a big problem :s A way to reproduce it would help a lot. I can open tons of files in kate and press CTRL + W as often as I like to, it still doesn't crash... Hmm, that's annoying. It seems to do it on pretty much any file I have, but it is sporadic. :s I guess I'll just have to get my hands dirty and built it myself and see if I can work it out as I doubt I can work out a sensible test case (or at least in working out said test case I'll probably be close to finding the problem anyway!) Created attachment 42430 [details]
New crash information added by DrKonqi
writing from the Crash Report Assistant, kate often crash when closing documents, it happen more when the number of opened file is >= 30.
the vast majority of files open are python scripts, with some bash or plain text
(In reply to comment #6) > Created an attachment (id=42430) [details] > New crash information added by DrKonqi > > writing from the Crash Report Assistant, kate often crash when closing > documents, it happen more when the number of opened file is >= 30. > the vast majority of files open are python scripts, with some bash or plain > text Additionally: "Sort by" of the documents panel is set to "Custom" Created attachment 43058 [details]
New crash information added by DrKonqi
How to reproduce:
- open kate
- make left panel "Documents" visible, right click on it, select "Sort By" and then "Custom"
- close kate
- open kate, using a new session
- by hitting ctrl+N open 70 new files
- reorder last 3 files created, the sequence could be 67,70,69,68
- click in visual descending order (67,70,69,68),
- when on the last document (68) start rapidly closing them by hitting Ctrl+W
- kate should crash no later than 4rd document closed
HIH
To be more precise: 1) number of documents does not matter, 2) the order matter - by hitting ctrl+N open a total of 5 new files - move "Untitled (5)" after "Untitled (2)" - move "Untitled (4)" after "Untitled (5)" - with mouse select "Untitled (3)" (the last one now) - now hit ctrl+W, kate close "Untitled (3)" - you're now positioned on "Untitled (5)" - hit ctrl+W, kate Krash Version 3.4.3 Using KDE Development Platform 4.4.3 (KDE 4.4.3) (In reply to comment #8) > Created an attachment (id=43058) [details] > New crash information added by DrKonqi > > How to reproduce: > - open kate > - make left panel "Documents" visible, right click on it, select "Sort By" and > then "Custom" > - close kate > - open kate, using a new session > - by hitting ctrl+N open 70 new files > - reorder last 3 files created, the sequence could be 67,70,69,68 > - click in visual descending order (67,70,69,68), > - when on the last document (68) start rapidly closing them by hitting Ctrl+W > - kate should crash no later than 4rd document closed > > HIH Created attachment 43352 [details] New crash information added by DrKonqi backtrace for comment #9 as said before is totally reproducible fix crash when closing a document (bug #213014) The entire code in KateViewDocumentProxyModel is crap... related: bug #187747 Fixed for KDE SC 4.5 with this commit: http://gitorious.org/kate/kate/commit/f6702b275e3f50f4cbe6dbf8755db36fef5b7319 Not sure if you want to reopen this one or for me to create a new one, but I'm still getting a problem (could be unrelated but happens when closing documents in the same way). Backtrace on it's way. Created attachment 43377 [details]
Backtrace.
This is the backtrace after opening 30 php files and closing two. Seems to be quite consistently after the second file close.
This is with the patch from above applied over 4.4.3 release (perhaps other backports are needed too?)
The backtrace you posted is the same as in bug #203774, which is yet another bug in the proxy model... So this crash is not related. Ahh thanks, /me goes and follows that bug :) |