Bug 204383 (sublime_doc_crash) - crashes due to messed up document list housekeeping
Summary: crashes due to messed up document list housekeeping
Status: RESOLVED FIXED
Alias: sublime_doc_crash
Product: kdevplatform
Classification: Developer tools
Component: sublime (show other bugs)
Version: git master
Platform: Unlisted Binaries Linux
: VHI crash
Target Milestone: 1.0.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 187607 195047 200054 204169 204222 206743 208735 210723 211542 213881 213924 214174 214705 215963 217329 219225 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-19 10:55 UTC by Fabian
Modified: 2020-08-07 09:20 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Ensure documentList is duplicate-free (1.22 KB, patch)
2009-09-09 14:31 UTC, Andrei Benea
Details
debug output (17.06 KB, application/octet-stream)
2009-09-09 22:21 UTC, Andrei Benea
Details
debug output 2 (18.64 KB, application/octet-stream)
2009-09-09 23:10 UTC, Andrei Benea
Details
New crash information added by DrKonqi (16.50 KB, text/plain)
2010-01-12 19:44 UTC, Bernhard Friedreich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian 2009-08-19 10:55:27 UTC
Application that crashed: kdevelop
Version of the application: 3.9.94 (using KDevPlatform 0.9.94)
KDE Version: 4.3.00 (KDE 4.3.0) "release 155"
Qt Version: 4.5.2
Operating System: Linux 2.6.27.23-0.1-default x86_64
Distribution: "openSUSE 11.1 (x86_64)"

 -- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0x7ff44c539750 (LWP 25858))]

Thread 5 (Thread 0x7ff439af7950 (LWP 25859)):
#0  0x00007ff448f93fdd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ff449204df7 in QWaitCondition::wait (this=0x17ed018, mutex=0x17ed020, time=200000) at thread/qwaitcondition_unix.cpp:85
#2  0x00007ff4460a507e in KDevelop::DUChainPrivate::CleanupThread::run (this=0x17ed000) at /usr/src/debug/kdevplatform-0.9.94/language/duchain/duchain.cpp:280
#3  0x00007ff449203e65 in QThreadPrivate::start (arg=0x17ed000) at thread/qthread_unix.cpp:188
#4  0x00007ff448f90070 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ff44777b10d in clone () from /lib64/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7ff42e4c3950 (LWP 25862)):
#0  0x00007ff441e7ad70 in g_main_context_acquire () from /usr/lib64/libglib-2.0.so.0
#1  0x00007ff441e7c491 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007ff441e7ca8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ff449316d5e in QEventDispatcherGlib::processEvents (this=0x2e87390, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#4  0x00007ff4492ec1d2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 776745024}) at kernel/qeventloop.cpp:149
#5  0x00007ff4492ec5a4 in QEventLoop::exec (this=0x7ff42e4c3080, flags={i = 776745104}) at kernel/qeventloop.cpp:201
#6  0x00007ff449200ed8 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#7  0x00007ff449203e65 in QThreadPrivate::start (arg=0x2e87460) at thread/qthread_unix.cpp:188
#8  0x00007ff448f90070 in start_thread () from /lib64/libpthread.so.0
#9  0x00007ff44777b10d in clone () from /lib64/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7ff42dcc2950 (LWP 25863)):
#0  0x00007ff441e7c2e3 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#1  0x7fffffffffffffff in ?? ()
#2  0x0000000002e895f0 in ?? ()
#3  0x0000000000000001 in ?? ()
#4  0x00007ff448f91570 in ?? () from /lib64/libpthread.so.0
#5  0x00007ff442102de0 in ?? () from /usr/lib64/libglib-2.0.so.0
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ff42d4c1950 (LWP 25868)):
#0  0x00007ff448f93fdd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ff4492038b5 in thread_sleep (ti=0x7ff42d4c1030) at thread/qthread_unix.cpp:297
#2  0x00007ff449203a1e in QThread::msleep (msecs=30) at thread/qthread_unix.cpp:323
#3  0x00007ff42eeb0cc1 in UIBlockTester::UIBlockTesterThread::run (this=0x2eed450) at /usr/src/debug/kdevelop-3.9.94/languages/cpp/cpplanguagesupport.cpp:985
#4  0x00007ff449203e65 in QThreadPrivate::start (arg=0x2eed450) at thread/qthread_unix.cpp:188
#5  0x00007ff448f90070 in start_thread () from /lib64/libpthread.so.0
#6  0x00007ff44777b10d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ff44c539750 (LWP 25858)):
[KCrash Handler]
#5  0x00007ff445ddd7f4 in Sublime::View::document (this=0x38eb960) at /usr/src/debug/kdevplatform-0.9.94/sublime/view.cpp:73
#6  0x00007ff432f36ed8 in DocumentSwitcherPlugin::walkForward (this=0x2108000) at /usr/src/debug/kdevplatform-0.9.94/plugins/documentswitcher/documentswitcherplugin.cpp:95
#7  0x00007ff432f37f30 in DocumentSwitcherPlugin::qt_metacall (this=0x2108000, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff54578500)
    at /usr/src/debug/kdevplatform-0.9.94/build/plugins/documentswitcher/documentswitcherplugin.moc:91
#8  0x00007ff4493026e2 in QMetaObject::activate (sender=0x20edd80, from_signal_index=<value optimized out>, to_signal_index=6, argv=0x3) at kernel/qobject.cpp:3113
#9  0x00007ff448313af7 in QAction::triggered (this=0x38eb960, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
#10 0x00007ff448314f70 in QAction::activate (this=0x20edd80, event=<value optimized out>) at kernel/qaction.cpp:1160
#11 0x00007ff448317a87 in QAction::event (this=0x38eb960, e=<value optimized out>) at kernel/qaction.cpp:1079
#12 0x00007ff44998b403 in KAction::event (this=0x38eb960, event=0x7fff54578a90) at /usr/src/debug/kdelibs-4.3.0/kdeui/actions/kaction.cpp:88
#13 0x00007ff448319b0d in QApplicationPrivate::notify_helper (this=0x14bb600, receiver=0x20edd80, e=0x7fff54578a90) at kernel/qapplication.cpp:4056
#14 0x00007ff448321d9a in QApplication::notify (this=0x7fff5457b200, receiver=0x20edd80, e=0x7fff54578a90) at kernel/qapplication.cpp:4021
#15 0x00007ff449a5d71b in KApplication::notify (this=0x7fff5457b200, receiver=0x20edd80, event=0x7fff54578a90) at /usr/src/debug/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#16 0x00007ff4492ed94c in QCoreApplication::notifyInternal (this=0x7fff5457b200, receiver=0x20edd80, event=0x7fff54578a90) at kernel/qcoreapplication.cpp:610
#17 0x00007ff44834f36d in QShortcutMap::dispatchEvent (this=<value optimized out>, e=0x7fff54578f90) at ../../src/corelib/kernel/qcoreapplication.h:213
#18 0x00007ff4483511dc in QShortcutMap::tryShortcutEvent (this=0x14bb718, o=<value optimized out>, e=0x7fff54578f90) at kernel/qshortcutmap.cpp:369
#19 0x00007ff448322dc1 in QApplication::notify (this=0x7fff5457b200, receiver=0x41a5ef0, e=0x7fff54578f90) at kernel/qapplication.cpp:3645
#20 0x00007ff449a5d71b in KApplication::notify (this=0x7fff5457b200, receiver=0x41a5ef0, event=0x7fff54578f90) at /usr/src/debug/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#21 0x00007ff4492ed94c in QCoreApplication::notifyInternal (this=0x7fff5457b200, receiver=0x41a5ef0, event=0x7fff54578f90) at kernel/qcoreapplication.cpp:610
#22 0x00007ff4483adab4 in QKeyMapper::sendKeyEvent (keyWidget=0x41a5ef0, grab=<value optimized out>, type=QEvent::KeyPress, code=16777217, modifiers={i = 1415025088}, text=@0x7fff545791b0, 
    autorepeat=false, count=1, nativeScanCode=23, nativeVirtualKey=65289, nativeModifiers=20) at kernel/qkeymapper_x11.cpp:1678
#23 0x00007ff4483afe22 in QKeyMapperPrivate::translateKeyEvent (this=0x14f7420, keyWidget=0x41a5ef0, event=0x7fff5457adc0, grab=16) at kernel/qkeymapper_x11.cpp:1648
#24 0x00007ff448389b0e in QApplication::x11ProcessEvent (this=0x7fff5457b200, event=0x7fff5457adc0) at kernel/qapplication_x11.cpp:3436
#25 0x00007ff4483b1874 in x11EventSourceDispatch (s=0x14bee30, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#26 0x00007ff441e790fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#27 0x00007ff441e7c8cd in ?? () from /usr/lib64/libglib-2.0.so.0
#28 0x00007ff441e7ca8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#29 0x00007ff449316d3f in QEventDispatcherGlib::processEvents (this=0x613c40, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#30 0x00007ff4483b0fff in QGuiEventDispatcherGlib::processEvents (this=0x38eb960, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#31 0x00007ff4492ec1d2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 1415033008}) at kernel/qeventloop.cpp:149
#32 0x00007ff4492ec5a4 in QEventLoop::exec (this=0x7fff5457b0f0, flags={i = 1415033088}) at kernel/qeventloop.cpp:201
#33 0x00007ff4492ee894 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#34 0x0000000000408047 in main (argc=1, argv=0x7fff5457c3a8) at /usr/src/debug/kdevelop-3.9.94/app/main.cpp:172

Reported using DrKonqi
Comment 1 Andreas Pakulat 2009-08-19 11:02:20 UTC
this should be fixed in trunk. Please re-open if you can reproduce it with trunk or beta5 (to be released this weekend).
Comment 2 Andreas Pakulat 2009-09-08 15:39:36 UTC
*** Bug 206743 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Pakulat 2009-09-08 15:40:31 UTC
we've got a new report suggesting this is still a problem in beta5, hence re-open.

Can anybody reproduce this at will?
Comment 4 Andrei Benea 2009-09-08 15:49:55 UTC
I found a way to reproduce this:

1. Close all the tabs.
2. Create a new CMake-based project.
3. Add a new class using the wizard.
4. After the project reloads itself, open a C++ file.
5. Now, with only one file(tab) open you should be able to press Ctrl-Tab and see the tab-switching widget with two entries for the same file(tab). Switching between them shouldn't crash KDevelop.
6. Open another file.
7. Switch back to the original file (which should still have two entries in the tab-switching widget) and close it.
8. Press Ctrl-Tab. This should crash KDevelop.
Comment 5 Andreas Pakulat 2009-09-08 17:39:53 UTC
thanks, the 5th step already sounds much like a bug.
Comment 6 Andreas Pakulat 2009-09-08 20:29:48 UTC
Hmm, I'm sorry but I can't reproduce this here with current trunk. So either there's a step missing or there's something already broken in your configuration. Can you move $HOME/.kde/share/config/kdeveloprc away and check wether your steps still work?
Comment 7 Andrei Benea 2009-09-09 11:18:17 UTC
Yes, you are right, I can't reproduce it every time now. Probably it's a race condition and I got lucky 3 times in a row yesterday.
Comment 8 Andrei Benea 2009-09-09 14:31:31 UTC
Created attachment 36813 [details]
Ensure documentList is duplicate-free

After debugging I found the cause for the duplicate entries in the tab switching widget: DocumentSwitcherPlugin::addView is called sometiems with a view that already exists in the list.

I have attached a simple patch that maintains the documentList duplicate-free. Probably this isn't the best approach to fixing the problem, but it should fix the crashes.
Comment 9 Andrei Benea 2009-09-09 14:38:08 UTC
I think the crash that I was experiencing was caused by the fact that only one of the duplicate pointers was removed by DocumentSwitcherPlugin::removeView(). After this, the View would probably be destroyed, causing the other pointer which remained in the list to become invalid.
Comment 10 Andreas Pakulat 2009-09-09 14:51:37 UTC
Thanks for looking into this. I'll need to have a look at the code to better understand what might happen, probably doing that tonight.
Comment 11 Andreas Pakulat 2009-09-09 21:37:48 UTC
Hmm, this smells very much like a bug in sublime the ui-library. I don't see why the plugin would add the same view twice, unless the signal is emitted twice - which would be a bug in sublime.

I'm hesitant to add this patch right now, instead I added some debug output (run kdebugdialog and enable area 9530 to see it). If anybody hits this again, please attach that output from the konsole here.
Comment 12 Andrei Benea 2009-09-09 21:56:06 UTC
Here's some of the debug output:

kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: view: KDevelop::TextView(0xa26f660) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::removeView: removing view, list should now not contain this view anymore KDevelop::TextView(0xa26f660) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::removeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0x9998790) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: got signal from mainwindow: KDevelop::MainWindow(0x907c618, name = "MainWindow") "/home/andrei/projects/x/xx.h – KDevelop"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: its area is: Sublime::Area(0x909cee8, name = "code") "Code"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: adding view: KDevelop::TextView(0x9998790) "xx.h"
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0x9998790) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: 0
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0x9998790) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0x9998790) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: view: KDevelop::TextView(0x9998790) "xx.h"
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0x9998790) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeArea: got area change, storing its views
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::storeAreaViewList: adding area views
Object::disconnect: Unexpected null parameter
Object::disconnect: Unexpected null parameter
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0xa377e28) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: -1
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: got signal from mainwindow: KDevelop::MainWindow(0x907c618, name = "MainWindow") "/home/andrei/projects/x/xx.h – KDevelop"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: its area is: Sublime::Area(0x9098518, name = "debug") "Debug"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::addView: adding view: KDevelop::TextView(0xa377e28) "xx.h"
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0xa377e28) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: 0
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0xa377e28) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: 0
Calling appendChild() on a null node does nothing.
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: moving view to front, list should now not contain this view anymore KDevelop::TextView(0xa377e28) "xx.h"
kdevelop(21867)/kdevplatform (documentswitcher) DocumentSwitcherPlugin::changeView: idx of this view in list: 0

Every time this happens you can crash KDevelop by following the my steps 5-8.
Comment 13 Andrei Benea 2009-09-09 22:21:23 UTC
Created attachment 36826 [details]
debug output

Args, bugzilla word-wrapped it. I'm attaching the same console output (in full).
Comment 14 Andreas Pakulat 2009-09-09 22:49:49 UTC
Thanks a lot, there's definetly something fishy there. I've just added yet some more debug output (more places printing the area and mainwindow information). Would be really great if you could do another run-through and post the new output. Hopefully that sheds some light on this.
Comment 15 Andrei Benea 2009-09-09 23:10:28 UTC
Created attachment 36828 [details]
debug output 2
Comment 16 Andreas Pakulat 2009-09-10 07:00:56 UTC
Thanks a lot, this clearly shows that during construction of the Code area we get a changeView(), followed by an addView, followed by another changeView signal from the mainwindow. This is definetly wrong, the addView should be first. I'll see if I can find out where this comes from.
Comment 17 Andreas Pakulat 2009-10-18 01:08:13 UTC
*** Bug 210723 has been marked as a duplicate of this bug. ***
Comment 18 Andreas Pakulat 2009-10-18 01:09:10 UTC
moving to sublime as thats probably the real source of the problem (or shell).
Comment 19 Andreas Pakulat 2009-10-18 01:09:46 UTC
*** Bug 200054 has been marked as a duplicate of this bug. ***
Comment 20 Andreas Pakulat 2009-10-18 01:11:12 UTC
*** Bug 204169 has been marked as a duplicate of this bug. ***
Comment 21 Andreas Pakulat 2009-10-23 19:23:29 UTC
*** Bug 211542 has been marked as a duplicate of this bug. ***
Comment 22 Andreas Pakulat 2009-11-09 23:38:48 UTC
*** Bug 187607 has been marked as a duplicate of this bug. ***
Comment 23 Andreas Pakulat 2009-11-09 23:42:30 UTC
*** Bug 213881 has been marked as a duplicate of this bug. ***
Comment 24 Andreas Pakulat 2009-11-09 23:43:39 UTC
adjust the title to better reflect what this report really is about
Comment 25 Andreas Pakulat 2009-11-10 08:53:27 UTC
*** Bug 213924 has been marked as a duplicate of this bug. ***
Comment 26 Andreas Pakulat 2009-11-12 00:24:28 UTC
*** Bug 214174 has been marked as a duplicate of this bug. ***
Comment 27 Jonathan Thomas 2009-11-15 20:28:38 UTC
*** Bug 214705 has been marked as a duplicate of this bug. ***
Comment 28 Andreas Pakulat 2009-11-15 22:14:51 UTC
*** Bug 195047 has been marked as a duplicate of this bug. ***
Comment 29 Andreas Pakulat 2009-11-15 23:42:42 UTC
*** Bug 208735 has been marked as a duplicate of this bug. ***
Comment 30 Andreas Pakulat 2009-11-17 00:03:49 UTC
*** Bug 204222 has been marked as a duplicate of this bug. ***
Comment 31 Andreas Pakulat 2009-11-24 16:21:04 UTC
*** Bug 215963 has been marked as a duplicate of this bug. ***
Comment 32 Alexander Dymo 2009-11-28 02:36:05 UTC
This (or similar problem) can be also reproduced as:
* open two files
* switch to the one of them one using ctrl-tab
* close another by clicking on its tab close icon
* press ctrl-tab to crash
Comment 33 Alexander Dymo 2009-11-29 00:18:49 UTC
SVN commit 1055891 by dymo:

Fix tab activation bug after closing another tabs without switching to them
(for example clicking on another tab's close button).
We should remove the widget from container's stack before removing it from the tabbar,
tabbar activates new widget by its index, and if the old one is still in stack, then
indices are off by one.
For me this also fixes the crash in ctrl-tab document switcher (which probably got
activation signal of the view which was already deleted).
BUG:204383


 M  +2 -1      container.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1055891
Comment 34 Andreas Pakulat 2009-11-29 10:59:40 UTC
(In reply to comment #33)
> SVN commit 1055891 by dymo:
> 
> Fix tab activation bug after closing another tabs without switching to them
> (for example clicking on another tab's close button).
> We should remove the widget from container's stack before removing it from the
> tabbar,
> tabbar activates new widget by its index, and if the old one is still in stack,
> then
> indices are off by one.
> For me this also fixes the crash in ctrl-tab document switcher (which probably
> got
> activation signal of the view which was already deleted).

Hmm, one thing that I found out earlier is that there seems to be one document not being deleted during initialization of areas. That was very early during setup of the gui, an area was created, a document automatically loaded, then the area was "closed" or something but the document hasn't been removed again from the list of open documents. 

This could be reproduced by having 1 document that is automatically opened, then close it and open it again. Open a second one and then switch between them. (IIRC).
Comment 35 Andreas Pakulat 2009-12-04 13:41:59 UTC
*** Bug 217329 has been marked as a duplicate of this bug. ***
Comment 36 Andreas Pakulat 2009-12-05 19:05:12 UTC
Hmm, I'm re-opening this one as I can still reproduce a crash that looks related (let me know if I should create a new backtrace for it). Create a non-utf8 file (I've used latin1 with german umlauts), then open it in kdevelop. 

First problem: The same dialog twice and it seems the view is also opened twice. Now close the document again. 

Second problem: Try to open the same document a second time, you again get both messageboxes, but after seeing the second kdevelop will crash with this:

#0  0xb5511f2d in QFlags<Qt::WindowType>::operator& (this=0x8, f=Qt::WindowType_Mask)
    at ../../include/QtCore/../../../../kde-qt/src/corelib/global/qglobal.h:2181     
#1  0xb5511f68 in QWidget::windowType (this=0xc575a70) at ../../include/QtGui/../../../../kde-qt/src/gui/kernel/qwidget.h:914
#2  0xb5585b53 in QWidgetPrivate::init (this=0xd0f8358, parentWidget=0xc575a70, f=...) at /home/andreas/src/kde-qt/src/gui/kernel/qwidget.cpp:1122
#3  0xb5589359 in QWidget (this=0xd0bf570, parent=0xc575a70, f=...) at /home/andreas/src/kde-qt/src/gui/kernel/qwidget.cpp:1007                   
---Type <return> to continue, or q <return> to quit---                                                                                            
#4  0xb71f84e7 in View (this=0xd0bf570, parent=0xc575a70) at /home/andreas/src/kdelibs/interfaces/ktexteditor/ktexteditor.cpp:260                 
#5  0xa3ff23f9 in KateView (this=0xd0bf570, doc=0xcec6bb8, parent=0xc575a70) at /home/andreas/src/kdelibs/kate/view/kateview.cpp:123              
#6  0xa3f3bdde in KateDocument::createView (this=0xcec6bb8, parent=0xc575a70) at /home/andreas/src/kdelibs/kate/document/katedocument.cpp:340     
#7  0xb75a0fb0 in KDevelop::TextDocument::createViewWidget (this=0xcda0548, parent=0xc575a70)                                                     
    at /home/andreas/src/kdevplatform/shell/textdocument.cpp:268                                                                                  
#8  0xb759f45f in KDevelop::TextView::createWidget (this=0xce0d008, parent=0xc575a70) at /home/andreas/src/kdevplatform/shell/textdocument.cpp:522
#9  0xb49bc20c in Sublime::View::widget (this=0xce0d008, parent=0xc575a70) at /home/andreas/src/kdevplatform/sublime/view.cpp:82                  
#10 0xb49b567f in Sublime::MainWindowPrivate::ViewCreator::operator() (this=0xbff98808, index=0x99396a0)                                          
    at /home/andreas/src/kdevplatform/sublime/mainwindow_p.cpp:243                                                                                
#11 0xb49bafb6 in Sublime::Area::walkViewsInternal<Sublime::MainWindowPrivate::ViewCreator> (this=0x9962f88, op=..., index=0x99396a0)             
    at /home/andreas/src/kdevplatform/sublime/areawalkers.h:32                                                                                    
#12 0xb49bb08b in Sublime::Area::walkViews<Sublime::MainWindowPrivate::ViewCreator> (this=0x9962f88, op=..., index=0x99396a0)                     
    at /home/andreas/src/kdevplatform/sublime/areawalkers.h:48                                                                                    
#13 0xb49b5a6b in Sublime::MainWindowPrivate::viewAdded (this=0x994b168, index=0x99396a0, view=0xce0d008)                                         
    at /home/andreas/src/kdevplatform/sublime/mainwindow_p.cpp:389                                                                                
#14 0xb49aed5c in Sublime::MainWindow::qt_metacall (this=0x9948528, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0xbff98968)                      
    at /home/andreas/src/build/kdevplatform/sublime/mainwindow.moc:118                                                                            
#15 0xb7573cbc in KDevelop::MainWindow::qt_metacall (this=0x9948528, _c=QMetaObject::InvokeMetaMethod, _id=61, _a=0xbff98968)                     
    at /home/andreas/src/build/kdevplatform/shell/mainwindow.moc:91                                                                               
#16 0xb62a3b3b in QMetaObject::metacall (object=0x9948528, cl=QMetaObject::InvokeMetaMethod, idx=61, argv=0xbff98968)                             
    at /home/andreas/src/kde-qt/src/corelib/kernel/qmetaobject.cpp:237                                                                            
#17 0xb62b84de in QMetaObject::activate (sender=0x9962f88, m=0xb49d57a0, local_signal_index=0, argv=0xbff98968)                                   
    at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:3282                                                                               
#18 0xb499d66b in Sublime::Area::viewAdded (this=0x9962f88, _t1=0x99396a0, _t2=0xce0d008) at /home/andreas/src/build/kdevplatform/sublime/area.moc:115
#19 0xb499f653 in Sublime::Area::addView (this=0x9962f88, view=0xce0d008, index=0x99396a0) at /home/andreas/src/kdevplatform/sublime/area.cpp:169     
#20 0xb499f6fa in Sublime::Area::addView (this=0x9962f88, view=0xce0d008, after=0x0) at /home/andreas/src/kdevplatform/sublime/area.cpp:182           
#21 0xb75a8056 in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=0x9a5ca20, doc=0xcda0558, range=..., activationParams=...)
    at /home/andreas/src/kdevplatform/shell/documentcontroller.cpp:347
#22 0xb75a9770 in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=0x9a5ca20, inputUrl=..., prefName=..., range=..., encoding=...,
    activationParams=...) at /home/andreas/src/kdevplatform/shell/documentcontroller.cpp:275
#23 0xb75a2c9e in KDevelop::DocumentController::openDocument (this=0x9a5c970, inputUrl=..., range=..., activationParams=...)
    at /home/andreas/src/kdevplatform/shell/documentcontroller.cpp:541
#24 0xa75584c4 in FileManager::openFile (this=0xab7eba8, file=...) at /home/andreas/src/kdevplatform/plugins/filemanager/filemanager.cpp:74
#25 0xa7558571 in FileManager::qt_metacall (this=0xab7eba8, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbff98eac)
    at /home/andreas/src/build/kdevplatform/plugins/filemanager/filemanager.moc:77
#26 0xb62a3b3b in QMetaObject::metacall (object=0xab7eba8, cl=QMetaObject::InvokeMetaMethod, idx=27, argv=0xbff98eac)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qmetaobject.cpp:237
#27 0xb62b84de in QMetaObject::activate (sender=0xacf5648, m=0xb4d17454, local_signal_index=7, argv=0xbff98eac)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:3282
#28 0xb4cb6cd3 in KDirOperator::fileSelected (this=0xacf5648, _t1=...) at /home/andreas/src/build/kdelibs/kfile/kdiroperator.moc:322
#29 0xb4cb7859 in KDirOperator::selectFile (this=0xacf5648, item=...) at /home/andreas/src/kdelibs/kfile/kdiroperator.cpp:1718
#30 0xb4cb79c3 in KDirOperator::Private::_k_slotActivated (this=0xa890180, index=...) at /home/andreas/src/kdelibs/kfile/kdiroperator.cpp:2365
#31 0xb4cc30e5 in KDirOperator::qt_metacall (this=0xacf5648, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0xbff9906c)
    at /home/andreas/src/build/kdelibs/kfile/kdiroperator.moc:251
#32 0xb62a3b3b in QMetaObject::metacall (object=0xacf5648, cl=QMetaObject::InvokeMetaMethod, idx=86, argv=0xbff9906c)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qmetaobject.cpp:237
#33 0xb62b84de in QMetaObject::activate (sender=0xac376c0, m=0xb602fb84, local_signal_index=3, argv=0xbff9906c)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:3282
#34 0xb5bdf0fc in QAbstractItemView::activated (this=0xac376c0, _t1=...) at .moc/debug-shared/moc_qabstractitemview.cpp:345
#35 0xb5be52af in QAbstractItemView::mouseReleaseEvent (this=0xac376c0, event=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/itemviews/qabstractitemview.cpp:1761
#36 0xb5c3a1da in QTreeView::mouseReleaseEvent (this=0xac376c0, event=0xbff99d94) at /home/andreas/src/kde-qt/src/gui/itemviews/qtreeview.cpp:1822
#37 0xb558012b in QWidget::event (this=0xac376c0, event=0xbff99d94) at /home/andreas/src/kde-qt/src/gui/kernel/qwidget.cpp:7973
#38 0xb5a5f740 in QFrame::event (this=0xac376c0, e=0xbff99d94) at /home/andreas/src/kde-qt/src/gui/widgets/qframe.cpp:557
#39 0xb5b15faf in QAbstractScrollArea::viewportEvent (this=0xac376c0, e=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/widgets/qabstractscrollarea.cpp:1032
#40 0xb5bea0f5 in QAbstractItemView::viewportEvent (this=0xac376c0, event=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/itemviews/qabstractitemview.cpp:1589
#41 0xb5c3723b in QTreeView::viewportEvent (this=0xac376c0, event=0xbff99d94) at /home/andreas/src/kde-qt/src/gui/itemviews/qtreeview.cpp:1250
#42 0xb5b194f4 in QAbstractScrollAreaPrivate::viewportEvent (this=0xab38628, event=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/widgets/qabstractscrollarea_p.h:100
#43 0xb5b19522 in QAbstractScrollAreaFilter::eventFilter (this=0xa9c61e8, o=0xab38a18, e=0xbff99d94)
---Type <return> to continue, or q <return> to quit---
    at /home/andreas/src/kde-qt/src/gui/widgets/qabstractscrollarea_p.h:116
#44 0xb6299caa in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x9800758, receiver=0xab38a18, event=0xbff99d94)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qcoreapplication.cpp:819
#45 0xb5502de1 in QApplicationPrivate::notify_helper (this=0x9800758, receiver=0xab38a18, e=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/kernel/qapplication.cpp:4238
#46 0xb5503cec in QApplication::notify (this=0xbff9a6a0, receiver=0xab38a18, e=0xbff99d94)
    at /home/andreas/src/kde-qt/src/gui/kernel/qapplication.cpp:3822
#47 0xb665a41d in KApplication::notify (this=0xbff9a6a0, receiver=0xab38a18, event=0xbff99d94)
    at /home/andreas/src/kdelibs/kdeui/kernel/kapplication.cpp:302
#48 0xb629c1ec in QCoreApplication::notifyInternal (this=0xbff9a6a0, receiver=0xab38a18, event=0xbff99d94)
    at /home/andreas/src/kde-qt/src/corelib/kernel/qcoreapplication.cpp:704
#49 0xb5516b43 in QCoreApplication::sendSpontaneousEvent (receiver=0xab38a18, event=0xbff99d94)
    at ../../include/QtCore/../../../../kde-qt/src/corelib/kernel/qcoreapplication.h:218
#50 0xb5509e12 in QApplicationPrivate::sendMouseEvent (receiver=0xab38a18, event=0xbff99d94, alienWidget=0xab38a18, nativeWidget=0xc0f6e70,
    buttonDown=0xb6046380, lastMouseReceiver=..., spontaneous=true) at /home/andreas/src/kde-qt/src/gui/kernel/qapplication.cpp:2954
#51 0xb55bfcb8 in QETWidget::translateMouseEvent (this=0xc0f6e70, event=0xbff9a330) at /home/andreas/src/kde-qt/src/gui/kernel/qapplication_x11.cpp:4368
#52 0xb55c0d47 in QApplication::x11ProcessEvent (this=0xbff9a6a0, event=0xbff9a330) at /home/andreas/src/kde-qt/src/gui/kernel/qapplication_x11.cpp:3379
#53 0xb55f43f7 in x11EventSourceDispatch (s=0x98039b0, callback=0, user_data=0x0)
    at /home/andreas/src/kde-qt/src/gui/kernel/qguieventdispatcher_glib.cpp:146
#54 0xb41f4e98 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#55 0xb41f8623 in ?? () from /lib/libglib-2.0.so.0
Comment 37 Alexander Dymo 2009-12-16 22:02:56 UTC
Andreas, I can't seem to reproduce both issues (with file that is automatically opened and with non-utf file) you've mentioned.
Comment 38 Andreas Pakulat 2009-12-17 02:36:15 UTC
Can't reproduce that anymore.
Comment 39 Dario Andres 2009-12-18 20:07:36 UTC
*** Bug 219225 has been marked as a duplicate of this bug. ***
Comment 40 Bernhard Friedreich 2010-01-12 19:44:05 UTC
Created attachment 39819 [details]
New crash information added by DrKonqi

I was editing (copy & pasting stuff around) when kdevelop suddenly crashed
Using archlinux with kdelibs/kde packages from kdemod-testing and kdevelop/kdevplatform compiled from source
Comment 41 Bernhard Friedreich 2010-01-12 20:35:18 UTC
It just happened again - I think I found something which both crashes have in common:

I pressed Ctrl + Tab to switch the current active document
Comment 42 Andreas Pakulat 2010-01-13 08:33:21 UTC
(In reply to comment #40)
> Created an attachment (id=39819) [details]
> New crash information added by DrKonqi
> 
> I was editing (copy & pasting stuff around) when kdevelop suddenly crashed
> Using archlinux with kdelibs/kde packages from kdemod-testing and
> kdevelop/kdevplatform compiled from source

Thanks, but this bug is already closed as fixed. The reason why you're still seeing the problem is that you're on an ancient Beta version of KDevelop4. I suggest to update to Beta7 which (IIRC) includes the fix to this problem.
Comment 43 Bernhard Friedreich 2010-01-13 09:08:17 UTC
Thanks for your reply but I somehow doubt that my version is that old.. I could be wrong but I think I remember that I've rebuilt kdevelop last week - or do you call this ancient? ^^ and kdevelop 4.0 beta 7 has been released on 16th december iirc...
but I'll rebuild and see if the problem persists.. if it does should I still use this bugreport, or file a new one?
Comment 44 Andreas Pakulat 2010-01-13 11:59:36 UTC
(In reply to comment #43)
> Thanks for your reply but I somehow doubt that my version is that old.. I could
> be wrong but I think I remember that I've rebuilt kdevelop last week - or do
> you call this ancient?

Well, thats what Dr. Konqi says and IIRC he extracts that directly from the KDE component object in the running application. Maybe you're still executing the Beta5 because some old packages are still installed?

> ^^ and kdevelop 4.0 beta 7 has been released on 16th
> december iirc...
> but I'll rebuild and see if the problem persists.. if it does should I still
> use this bugreport, or file a new one?

If the problem can be reproduced this bug needs to be re-opened.