Bug 344192 - Crash while trying to save a file as an already open file
Summary: Crash while trying to save a file as an already open file
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: All editors (show other bugs)
Version: 4.7.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 5.0.0
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2015-02-15 13:15 UTC by Avihay
Modified: 2016-11-17 09:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Avihay 2015-02-15 13:15:21 UTC
Application: kdevelop (4.7.60)
KDE Platform Version: 4.14.1
Qt Version: 4.8.6
Operating System: Linux 3.16.0-30-generic i686
Distribution: Ubuntu 14.10

-- Information about the crash:
- What I was doing when the application crashed:
I was trying to save a copy of a file under a name of an already open file that had changes that weren't saved yet.
Crashed 2 out of 2 attempts.
my kdevelop is compiled from source for qt4

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb04ab7c0 (LWP 20506))]

Thread 11 (Thread 0xad4f3b40 (LWP 20507)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0xad4f2f58) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xacb0289c) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xacb0289c, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xad4f3048) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb5c65705 in timerSourcePrepare (source=0xacb02868, timeout=0xad4f3048) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xacb00468, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb5c346c3 in QEventLoop::processEvents (this=0xad4f31d8, flags=...) at kernel/qeventloop.cpp:149
#13 0xb5c349fe in QEventLoop::exec (this=0xad4f31d8, flags=...) at kernel/qeventloop.cpp:204
#14 0xb5b22a00 in QThread::exec (this=0x9042a60) at thread/qthread.cpp:538
#15 0xb5c1531b in QInotifyFileSystemWatcherEngine::run (this=0x9042a60) at io/qfilesystemwatcher_inotify.cpp:265
#16 0xb5b254c3 in QThreadPrivate::start (arg=0x9042a60) at thread/qthread_unix.cpp:349
#17 0xb565cf16 in start_thread (arg=0xad4f3b40) at pthread_create.c:309
#18 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 10 (Thread 0xacaffb40 (LWP 20508)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5660cac in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb59129dc in __pthread_cond_wait (cond=0xb42ea8f0, mutex=0xb42ea8d8) at forward.c:149
#3  0xb41ce5ff in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4  0xb41ce63c in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5  0xb565cf16 in start_thread (arg=0xacaffb40) at pthread_create.c:309
#6  0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 9 (Thread 0xaa0c4b40 (LWP 20509)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5661076 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:245
#2  0xb5912a34 in __pthread_cond_timedwait (cond=0x9447bf8, mutex=0x9447be0, abstime=0xaa0c41e8) at forward.c:162
#3  0xb5b25a08 in wait (time=155475200, this=0x9447be0) at thread/qwaitcondition_unix.cpp:84
#4  QWaitCondition::wait (this=0x9445cfc, mutex=0x9445d00, time=1000) at thread/qwaitcondition_unix.cpp:158
#5  0xb4432720 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x9445cf0) at /home/adarnet/projects/kdevplatform/language/duchain/duchain.cpp:282
#6  0xb5b254c3 in QThreadPrivate::start (arg=0x9445cf0) at thread/qthread_unix.cpp:349
#7  0xb565cf16 in start_thread (arg=0xaa0c4b40) at pthread_create.c:309
#8  0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 8 (Thread 0xa8bcfb40 (LWP 20510)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0xa8bcefa8) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xa820289c) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xa820289c, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xa8bcf078) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xa8200468, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#11 0xb5c346c3 in QEventLoop::processEvents (this=0xa8bcf208, flags=...) at kernel/qeventloop.cpp:149
#12 0xb5c349fe in QEventLoop::exec (this=0xa8bcf208, flags=...) at kernel/qeventloop.cpp:204
#13 0xb5b22a00 in QThread::exec (this=0x9506f7c) at thread/qthread.cpp:538
#14 0xb5b22bd8 in QThread::run (this=0x9506f7c) at thread/qthread.cpp:605
#15 0xb5b254c3 in QThreadPrivate::start (arg=0x9506f7c) at thread/qthread_unix.cpp:349
#16 0xb565cf16 in start_thread (arg=0xa8bcfb40) at pthread_create.c:309
#17 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 7 (Thread 0xa6870b40 (LWP 20517)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0xa686ff88) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xa8203534) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xa8203534, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xa6870078) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb5c65705 in timerSourcePrepare (source=0xa8203500, timeout=0xa6870078) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xa8202b30, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb5c346c3 in QEventLoop::processEvents (this=0xa6870208, flags=...) at kernel/qeventloop.cpp:149
#13 0xb5c349fe in QEventLoop::exec (this=0xa6870208, flags=...) at kernel/qeventloop.cpp:204
#14 0xb5b22a00 in QThread::exec (this=0x96c1818) at thread/qthread.cpp:538
#15 0xb453eff4 in KDevelop::CompletionWorkerThread::run (this=0x96c1818) at /home/adarnet/projects/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#16 0xb5b254c3 in QThreadPrivate::start (arg=0x96c1818) at thread/qthread_unix.cpp:349
#17 0xb565cf16 in start_thread (arg=0xa6870b40) at pthread_create.c:309
#18 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 6 (Thread 0x99bcab40 (LWP 20544)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0x99bc9f58) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xa9702f84) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xa9702f84, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0x99bca048) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb5c65705 in timerSourcePrepare (source=0xa9702f50, timeout=0x99bca048) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xa97045f0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb5c346c3 in QEventLoop::processEvents (this=0x99bca1d8, flags=...) at kernel/qeventloop.cpp:149
#13 0xb5c349fe in QEventLoop::exec (this=0x99bca1d8, flags=...) at kernel/qeventloop.cpp:204
#14 0xb5b22a00 in QThread::exec (this=0x9fa0e90) at thread/qthread.cpp:538
#15 0xb5c1531b in QInotifyFileSystemWatcherEngine::run (this=0x9fa0e90) at io/qfilesystemwatcher_inotify.cpp:265
#16 0xb5b254c3 in QThreadPrivate::start (arg=0x9fa0e90) at thread/qthread_unix.cpp:349
#17 0xb565cf16 in start_thread (arg=0x99bcab40) at pthread_create.c:309
#18 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 5 (Thread 0x993c9b40 (LWP 20548)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5660cac in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb59129dc in __pthread_cond_wait (cond=0x93a2988, mutex=0x93a2970) at forward.c:149
#3  0xb5b25a2b in wait (time=154806928, this=0x93a2970) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x93a28c0, mutex=0x93a2a90, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xb3399920 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x93a28a8, th=0x9787418) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#6  0xb339cc34 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x93a2b10, th=0x9787418) at ../../../threadweaver/Weaver/WorkingHardState.cpp:77
#7  0xb3399864 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x93a28a8, th=0x9787418) at ../../../threadweaver/Weaver/WeaverImpl.cpp:361
#8  0xb339cd2a in ThreadWeaver::WorkingHardState::applyForWork (this=0x93a2b10, th=0x9787418, previous=0x0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#9  0xb33986c8 in ThreadWeaver::WeaverImpl::applyForWork (this=0x93a28a8, th=0x9787418, previous=0x0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#10 0xb339cd3e in ThreadWeaver::WorkingHardState::applyForWork (this=0x93a2b10, th=0x9787418, previous=0xac56640) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#11 0xb33986c8 in ThreadWeaver::WeaverImpl::applyForWork (this=0x93a28a8, th=0x9787418, previous=0xac56640) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#12 0xb339b4dd in ThreadWeaver::Thread::run (this=0x9787418) at ../../../threadweaver/Weaver/Thread.cpp:98
#13 0xb5b254c3 in QThreadPrivate::start (arg=0x9787418) at thread/qthread_unix.cpp:349
#14 0xb565cf16 in start_thread (arg=0x993c9b40) at pthread_create.c:309
#15 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 4 (Thread 0xa3affb40 (LWP 20597)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5660cac in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb59129dc in __pthread_cond_wait (cond=0x93a2988, mutex=0x93a2970) at forward.c:149
#3  0xb5b25a2b in wait (time=154806928, this=0x93a2970) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x93a28c0, mutex=0x93a2a90, time=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xb3399920 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x93a28a8, th=0x912fa90) at ../../../threadweaver/Weaver/WeaverImpl.cpp:370
#6  0xb339cc34 in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x93a2b10, th=0x912fa90) at ../../../threadweaver/Weaver/WorkingHardState.cpp:77
#7  0xb3399864 in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x93a28a8, th=0x912fa90) at ../../../threadweaver/Weaver/WeaverImpl.cpp:361
#8  0xb339cd2a in ThreadWeaver::WorkingHardState::applyForWork (this=0x93a2b10, th=0x912fa90, previous=0xb538480) at ../../../threadweaver/Weaver/WorkingHardState.cpp:68
#9  0xb33986c8 in ThreadWeaver::WeaverImpl::applyForWork (this=0x93a28a8, th=0x912fa90, previous=0xb538480) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#10 0xb339b4dd in ThreadWeaver::Thread::run (this=0x912fa90) at ../../../threadweaver/Weaver/Thread.cpp:98
#11 0xb5b254c3 in QThreadPrivate::start (arg=0x912fa90) at thread/qthread_unix.cpp:349
#12 0xb565cf16 in start_thread (arg=0xa3affb40) at pthread_create.c:309
#13 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 3 (Thread 0xa2f24b40 (LWP 20598)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0xa2f23f88) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xa8205a3c) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xa8205a3c, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xa2f24078) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb5c65705 in timerSourcePrepare (source=0xa8205a08, timeout=0xa2f24078) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xa8202af0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb5c346c3 in QEventLoop::processEvents (this=0xa2f24208, flags=...) at kernel/qeventloop.cpp:149
#13 0xb5c349fe in QEventLoop::exec (this=0xa2f24208, flags=...) at kernel/qeventloop.cpp:204
#14 0xb5b22a00 in QThread::exec (this=0x98bffe8) at thread/qthread.cpp:538
#15 0xb453eff4 in KDevelop::CompletionWorkerThread::run (this=0x98bffe8) at /home/adarnet/projects/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#16 0xb5b254c3 in QThreadPrivate::start (arg=0x98bffe8) at thread/qthread_unix.cpp:349
#17 0xb565cf16 in start_thread (arg=0xa2f24b40) at pthread_create.c:309
#18 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 2 (Thread 0xa0124b40 (LWP 20599)):
#0  0xb772dc7c in __kernel_vsyscall ()
#1  0xb5913482 in __GI___clock_gettime (clock_id=1, tp=0xa0123f88) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb5b7e2f9 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb5c66e23 in updateCurrentTime (this=0xa9706ba4) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0xa9706ba4, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb5c65661 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xa0124078) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb5c65705 in timerSourcePrepare (source=0xa9706b70, timeout=0xa0124078) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb37aa35b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb37aadc4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb5c65f5c in QEventDispatcherGlib::processEvents (this=0xa9704cc8, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb5c346c3 in QEventLoop::processEvents (this=0xa0124208, flags=...) at kernel/qeventloop.cpp:149
#13 0xb5c349fe in QEventLoop::exec (this=0xa0124208, flags=...) at kernel/qeventloop.cpp:204
#14 0xb5b22a00 in QThread::exec (this=0xaf71aa0) at thread/qthread.cpp:538
#15 0xb453eff4 in KDevelop::CompletionWorkerThread::run (this=0xaf71aa0) at /home/adarnet/projects/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84
#16 0xb5b254c3 in QThreadPrivate::start (arg=0xaf71aa0) at thread/qthread_unix.cpp:349
#17 0xb565cf16 in start_thread (arg=0xa0124b40) at pthread_create.c:309
#18 0xb5905a3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 1 (Thread 0xb04ab7c0 (LWP 20506)):
[KCrash Handler]
#7  0x00000074 in ?? ()
#8  0xa741644f in KateUndoManager::updateLineModifications() () from /usr/lib/libkatepartinterfaces.so.4
#9  0xa7409aad in KateDocument::saveFile() () from /usr/lib/libkatepartinterfaces.so.4
#10 0xb55adaf1 in KParts::ReadWritePart::save (this=0xac73b08) at ../../kparts/part.cpp:879
#11 0xa73eaf4a in KateDocument::save() () from /usr/lib/libkatepartinterfaces.so.4
#12 0xb55adc25 in KParts::ReadWritePart::saveAs (this=0xac73b08, kurl=...) at ../../kparts/part.cpp:900
#13 0xa73eb384 in KateDocument::saveAs(KUrl const&) () from /usr/lib/libkatepartinterfaces.so.4
#14 0xa73f0fc3 in KateDocument::documentSaveAs() () from /usr/lib/libkatepartinterfaces.so.4
#15 0xa740c29c in ?? () from /usr/lib/libkatepartinterfaces.so.4
#16 0xb5c4b1e8 in QMetaObject::activate (sender=0xb4395e0, m=0xb686d478 <QAction::staticMetaObject>, local_signal_index=1, argv=0xbfa03068) at kernel/qobject.cpp:3567
#17 0xb5ee992d in QAction::triggered (this=0xb4395e0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#18 0xb5eeb4f6 in QAction::activate (this=0xb4395e0, event=QAction::Trigger) at kernel/qaction.cpp:1257
#19 0xb636c023 in QMenuPrivate::activateCausedStack (this=0x941eb98, causedStack=..., action=0xb4395e0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1037
#20 0xb6370e71 in QMenuPrivate::activateAction (this=0x941eb98, action=0xb4395e0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1129
#21 0xb6374dfa in QMenu::mouseReleaseEvent (this=0x9419d48, e=0xbfa03634) at widgets/qmenu.cpp:2371
#22 0xb6bbcd22 in KMenu::mouseReleaseEvent (this=0x9419d48, e=0xbfa03634) at ../../kdeui/widgets/kmenu.cpp:464
#23 0xb5f4821b in QWidget::event (this=0x9419d48, event=0xbfa03634) at kernel/qwidget.cpp:8775
#24 0xb63752e4 in QMenu::event (this=0x9419d48, e=0xbfa03634) at widgets/qmenu.cpp:2480
#25 0xb5ef0c2a in QApplicationPrivate::notify_helper (this=0x8c22400, receiver=0x9419d48, e=0xbfa03634) at kernel/qapplication.cpp:4570
#26 0xb5ef91f0 in QApplication::notify (this=0xbfa03bb0, receiver=0x9419d48, e=0xbfa03634) at kernel/qapplication.cpp:4113
#27 0xb6ae5f7c in KApplication::notify (this=0xbfa03bb0, receiver=0x9419d48, event=0xbfa03634) at ../../kdeui/kernel/kapplication.cpp:311
#28 0xb5c35c2c in QCoreApplication::notifyInternal (this=0xbfa03bb0, receiver=0x9419d48, event=0xbfa03634) at kernel/qcoreapplication.cpp:953
#29 0xb5ef6e97 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#30 QApplicationPrivate::sendMouseEvent (receiver=0x9419d48, event=0xbfa03634, alienWidget=0x0, nativeWidget=0x9419d48, buttonDown=0xb688bf44 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3178
#31 0xb5f789e2 in QETWidget::translateMouseEvent (this=0x9419d48, event=0xbfa0383c) at kernel/qapplication_x11.cpp:4568
#32 0xb5f77e42 in QApplication::x11ProcessEvent (this=0xbfa03bb0, event=0xbfa0383c) at kernel/qapplication_x11.cpp:3627
#33 0xb5fa1f51 in x11EventSourceDispatch (s=0x8c2aec0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#34 0xb37aac04 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#35 0xb37aaf29 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#36 0xb37aaff6 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#37 0xb5c65f3b in QEventDispatcherGlib::processEvents (this=0x8c1f3a8, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#38 0xb5fa2019 in QGuiEventDispatcherGlib::processEvents (this=0x8c1f3a8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0xb5c346c3 in QEventLoop::processEvents (this=0xbfa03b18, flags=...) at kernel/qeventloop.cpp:149
#40 0xb5c349fe in QEventLoop::exec (this=0xbfa03b18, flags=...) at kernel/qeventloop.cpp:204
#41 0xb5c3a89b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#42 0xb5eeec04 in QApplication::exec () at kernel/qapplication.cpp:3828
#43 0x08054d02 in main (argc=<optimized out>, argv=0xbfa03d14) at /home/adarnet/projects/kdevelop/app/main.cpp:564

Report to https://bugs.kde.org/

Reproducible: Always

Steps to Reproduce:
1. open file a
2. perform "save as..." on file a as file b
3. open and modify file b
4. open file a
5. perform "save as..." on file a as file b

Actual Results:  
crash

Expected Results:  
file a and b are the same and kdevelop keeps running.

Kate was the editor kpart involved
Comment 1 Francis Herne 2016-03-17 11:27:07 UTC
This still causes a crash in 4.90.91 and the current 5.0 branch, albeit slightly different.

When saving the second file, the "Overwrite <-> Cancel" dialog is shown. When choosing 'Overwrite', KDevelop crashes iff the first file has unsaved changes.

------

Thread 1 "kdevelop" received signal SIGABRT, Aborted.
0x00007ffff43ab2a8 in raise () from /usr/lib/libc.so.6

#0  0x00007ffff43ab2a8 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff43ac72a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff47a87cd in __gnu_cxx::__verbose_terminate_handler () at /build/gcc/src/gcc-5-20160209/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#3  0x00007ffff47a6636 in __cxxabiv1::__terminate (handler=<optimized out>) at /build/gcc/src/gcc-5-20160209/libstdc++-v3/libsupc++/eh_terminate.cc:47
No locals.
#4  0x00007ffff47a6681 in std::terminate () at /build/gcc/src/gcc-5-20160209/libstdc++-v3/libsupc++/eh_terminate.cc:57
No locals.
#5  0x00007ffff47a71bf in __cxxabiv1::__cxa_pure_virtual () at /build/gcc/src/gcc-5-20160209/libstdc++-v3/libsupc++/pure.cc:50
No locals.
#6  0x00007ffff7a915e3 in KDevelop::MainWindow::updateTabColor (this=0xa00340, doc=0xa3db90) at /tmp/yaourt-tmp-flh/aur-kdevplatform-git/src/kdevplatform/shell/mainwindow.cpp:420
        color = {cspec = 11142656, ct = {argb = {alpha = 0, red = 0, green = 0, blue = 0, pad = 0}, ahsv = {alpha = 0, hue = 0, saturation = 0, value = 0, pad = 0}, acmyk = {alpha = 0, cyan = 0, magenta = 0, yellow = 0,
              black = 0}, ahsl = {alpha = 0, hue = 0, saturation = 0, lightness = 0, pad = 0}, array = {0, 0, 0, 0, 0}}}
        doc = 0xa3db90
        this = 0xa00340
#7  0x00007ffff4d46659 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#8  0x00007ffff5a81c4b in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007ffff5b940db in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff02abd9a in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#11 0x00007ffff02fb1c5 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#12 0x00007ffff5a3d68c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff5a428f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff4d19518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#15 0x00007ffff4d1b3da in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#16 0x00007ffff4d6e883 in ?? () from /usr/lib/libQt5Core.so.5
#17 0x00007fffec0eed87 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#18 0x00007fffec0eefe0 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00007fffec0ef08c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#20 0x00007ffff4d6ec8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#21 0x00007ffff4d176fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#22 0x00007ffff4d1fb7c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#23 0x000000000040cbfa in main (argc=1, argv=<optimized out>) at /tmp/yaourt-tmp-flh/aur-kdevelop-git/src/kdevelop/app/main.cpp:680
        timer = {t1 = -9223372036854775808, t2 = -9223372036854775808}
        description = "The KDevelop Integrated Development Environment"
        aboutData = {d = 0x63b6b0}
        debugArgs = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4,
                          _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7ffff4dc8d40 <QListData::shared_null>}, d = 0x7ffff4dc8d40 <QListData::shared_null>}}, <No data fields>}
        debugeeName = {static null = {<No data fields>}, d = 0x7ffff4dc6ee0 <QArrayData::shared_null>}
        app = {<QApplication> = {<No data fields>}, <No data fields>}
        migrator = {d = 0x692e40}
        __PRETTY_FUNCTION__ = "int main(int, char**)"
        parser = {d = 0x6a96b0}
        initialFiles = {d = 0x7ffff4dc6ee0 <QArrayData::shared_null>}
        session = {static null = {<No data fields>}, d = 0x7ffff4dc6ee0 <QArrayData::shared_null>}
        nRunningSessions = <optimized out>
        splash = <optimized out>
        core = 0xbe45c0
        projectNames = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4,
                          _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7ffff4dc8d40 <QListData::shared_null>}, d = 0x7ffff4dc8d40 <QListData::shared_null>}}, <No data fields>}
Comment 2 Kevin Funk 2016-03-17 13:01:05 UTC
@Francis: You could try removing the QueuedConnection flag from here:

shell/mainwindow.cpp:
    connect(Core::self()->documentController(), &IDocumentController::documentOpened, this, &MainWindow::updateTabColor, Qt::QueuedConnection);
    connect(Core::self()->documentController(), &IDocumentController::documentUrlChanged, this, &MainWindow::updateTabColor, Qt::QueuedConnection);

Does it still crash then?

Care to investigate a bit?
Comment 3 Francis Herne 2016-03-21 11:26:59 UTC
It crashes intermittently with those flags (or all the Qt::QueuedConnection flags around there) removed, but not every time as before.

I'm a bit busy actually using KDevelop to poke inside it much, maybe later this week.

Backtrace looks different again...

Thread 1 "kdevelop" received signal SIGSEGV, Segmentation fault.

#0  0x00007ffff1c70040 in QQmlData::isSignalConnected(QAbstractDeclarativeData*, QObject const*, int) () from /usr/lib/libQt5Qml.so.5
#1  0x00007ffff4d46260 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#2  0x00007ffff05654d2 in KParts::Part::setWindowCaption(QString const&) () from /usr/lib/libKF5Parts.so.5
#3  0x00007ffff056c030 in KParts::ReadWritePart::saveAs(QUrl const&) () from /usr/lib/libKF5Parts.so.5
#4  0x00007ffff08b9545 in KTextEditor::DocumentPrivate::saveAs (this=0x9f9e50, url=...) at /home/flh/ktexteditor/src/ktexteditor-5.20.0/src/document/katedocument.cpp:5443
        url = @0x7fffffffd4d0: {d = 0x116c130}
        this = 0x9f9e50
#5  0x00007ffff08b9ab9 in KTextEditor::DocumentPrivate::documentSaveAs (this=0x9f9e50) at /home/flh/ktexteditor/src/ktexteditor-5.20.0/src/document/katedocument.cpp:4277
        saveUrl = {d = 0x116c130}
#6  0x00007ffff0a62deb in KTextEditor::DocumentPrivate::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffd6b0) at /home/flh/ktexteditor/src/build/src/moc_katedocument.cpp:501
        _r = <optimized out>
        _t = <optimized out>
#7  0x00007ffff4d46870 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#8  0x00007ffff5a353d2 in QAction::triggered(bool) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007ffff5a37ef0 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff5a3884f in QAction::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#11 0x00007ffff5a3e68c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff5a438f6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff4d1a518 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#14 0x00007ffff528f826 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#15 0x00007ffff528f8d9 in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib/libQt5Gui.so.5
#16 0x00007ffff5248716 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) ()
   from /usr/lib/libQt5Gui.so.5
#17 0x00007ffff5260a14 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/libQt5Gui.so.5
#18 0x00007ffff5265b65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#19 0x00007ffff5242d6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#20 0x00007fffd7b53d10 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#21 0x00007fffec0f0d87 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007fffec0f0fe0 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007fffec0f108c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0x00007ffff4d6fc8f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#25 0x00007ffff4d186fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#26 0x00007ffff4d20b7c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#27 0x000000000040cbfa in main (argc=1, argv=<optimized out>) at /tmp/yaourt-tmp-flh/aur-kdevelop-git/src/kdevelop/app/main.cpp:680
        timer = {t1 = -9223372036854775808, t2 = -9223372036854775808}
        description = "The KDevelop Integrated Development Environment"
        aboutData = {d = 0x63b240}
        debugArgs = {<QList<QS
Comment 4 Francis Herne 2016-03-21 11:31:17 UTC
It seems to me as though Kate should crash the same way, but I can't make it do so.

It does behave in a really unintuitive way that probably should be its own bug, but doesn't actually crash.
Comment 5 deoakshay 2016-05-02 17:38:08 UTC
Hello everyone, I am a beginner in open source development and would like to contribute. I was wondering if I could contribute to this bug?
Comment 6 Kevin Funk 2016-08-26 20:27:16 UTC
Reproduced.

SUMMARY: AddressSanitizer: undefined-behavior /home/kfunk/devel/src/kf5/kdevplatform-stable/sublime/document.cpp:64:70 in 
=================================================================
==6799==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000ed92e0 at pc 0x7fed1fc9d0eb bp 0x7ffc8f498cb0 sp 0x7ffc8f498ca8
READ of size 8 at 0x606000ed92e0 thread T0
    #0 0x7fed1fc9d0ea in KDevelop::MainWindow::updateTabColor(KDevelop::IDocument*) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/mainwindow.cpp:433:41
    #1 0x7fed1fcc0e5e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KDevelop::IDocument*>, void, void (KDevelop::MainWindow::*)(KDevelop::IDocument*)>::call(void (KDevelop::MainWindow::*)(KDevelop::IDocument*), KDevelop::MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:501:13
    #2 0x7fed1fcc098d in void QtPrivate::FunctionPointer<void (KDevelop::MainWindow::*)(KDevelop::IDocument*)>::call<QtPrivate::List<KDevelop::IDocument*>, void>(void (KDevelop::MainWindow::*)(KDevelop::IDocument*), KDevelop::MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:520:13
    #3 0x7fed1fcc0431 in QtPrivate::QSlotObject<void (KDevelop::MainWindow::*)(KDevelop::IDocument*), QtPrivate::List<KDevelop::IDocument*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:143:17
    #4 0x7fed19501ea0 in QObject::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2b5ea0)
    #5 0x7fed19e07cda in QWidget::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x19dcda)
    #6 0x7fed19f1dd8a in QMainWindow::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2b3d8a)
    #7 0x7fed1cc1c6a6 in KMainWindow::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5+0x7a6a6)
    #8 0x7fed1cc56964 in KXmlGuiWindow::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5+0xb4964)
    #9 0x7fed19dc505b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15b05b)
    #10 0x7fed19dca515 in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x160515)
    #11 0x7fed194d262a in QCoreApplication::notifyInternal(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x28662a)
    #12 0x7fed194d4a25 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x288a25)
    #13 0x7fed19528672  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2dc672)
    #14 0x7fed0c7471a6 in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a1a6)
    #15 0x7fed0c7473ff  (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a3ff)
    #16 0x7fed0c7474ab in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a4ab)
    #17 0x7fed19528a7e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2dca7e)
    #18 0x7fed194cfde9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x283de9)
    #19 0x7fed194d7e8b in QCoreApplication::exec() (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x28be8b)
    #20 0x5226a7 in main /home/kfunk/devel/src/kf5/kdevelop-stable/app/main.cpp:745:12
    #21 0x7fed17fd982f in __libc_start_main /build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:291
    #22 0x424228 in _start (/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x424228)

0x606000ed92e0 is located 32 bytes inside of 64-byte region [0x606000ed92c0,0x606000ed9300)
freed by thread T0 here:
    #0 0x4f5f40 in operator delete(void*) (/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x4f5f40)
    #1 0x7fed1ff19cdf in KDevelop::TextDocument::~TextDocument() /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/textdocument.cpp:258:1
    #2 0x7fed19501ebf in QObject::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2b5ebf)
    #3 0x7fed19dc505b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15b05b)

previously allocated by thread T0 here:
    #0 0x4f5940 in operator new(unsigned long) (/home/kfunk/devel/install/kf5-stable/bin/kdevelop+0x4f5940)
    #1 0x7fed1ff9fd56 in KDevelop::DocumentControllerPrivate::openDocumentInternal(QUrl const&, QString const&, KTextEditor::Range const&, QString const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, KDevelop::IDocument*) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/documentcontroller.cpp:322:27
    #2 0x7fed1ff7418c in KDevelop::DocumentController::openDocument(QUrl const&, KTextEditor::Range const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&, KDevelop::IDocument*) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/documentcontroller.cpp:703:12
    #3 0x7fed1d834caf in KDevelop::IDocumentController::openDocument(QUrl const&, KTextEditor::Cursor const&, QFlags<KDevelop::IDocumentController::DocumentActivation>, QString const&) /home/kfunk/devel/src/kf5/kdevplatform-stable/interfaces/idocumentcontroller.cpp:33:12
    #4 0x7fed1fbe353b in KDevelop::WorkingSet::loadToArea(Sublime::Area*, Sublime::AreaIndex*, KConfigGroup, KConfigGroup, QMultiMap<QString, Sublime::View*>&) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/workingsets/workingset.cpp:328:30
    #5 0x7fed1fbdda60 in KDevelop::WorkingSet::loadToArea(Sublime::Area*, Sublime::AreaIndex*) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/workingsets/workingset.cpp:253:5
    #6 0x7fed1fba8267 in KDevelop::WorkingSetController::changedWorkingSet(Sublime::Area*, QString const&, QString const&) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/workingsetcontroller.cpp:300:9
    #7 0x7fed1fbcf743 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<Sublime::Area*, QString, QString>, void, void (KDevelop::WorkingSetController::*)(Sublime::Area*, QString const&, QString const&)>::call(void (KDevelop::WorkingSetController::*)(Sublime::Area*, QString const&, QString const&), KDevelop::WorkingSetController*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:501:13
    #8 0x7fed1fbcf07d in void QtPrivate::FunctionPointer<void (KDevelop::WorkingSetController::*)(Sublime::Area*, QString const&, QString const&)>::call<QtPrivate::List<Sublime::Area*, QString, QString>, void>(void (KDevelop::WorkingSetController::*)(Sublime::Area*, QString const&, QString const&), KDevelop::WorkingSetController*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:520:13
    #9 0x7fed1fbceb1f in QtPrivate::QSlotObject<void (KDevelop::WorkingSetController::*)(Sublime::Area*, QString const&, QString const&), QtPrivate::List<Sublime::Area*, QString, QString>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:143:17
    #10 0x7fed19500e4e in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2b4e4e)
    #11 0x7fed1e8acfcc in Sublime::Area::changedWorkingSet(Sublime::Area*, QString, QString) /home/kfunk/devel/build/kf5/kdevplatform-stable/sublime/moc_area.cpp:322:5
    #12 0x7fed1e676e72 in Sublime::Area::setWorkingSet(QString) /home/kfunk/devel/src/kf5/kdevplatform-stable/sublime/area.cpp:428:14
    #13 0x7fed1e67547f in Sublime::Area::load(KConfigGroup const&) /home/kfunk/devel/src/kf5/kdevplatform-stable/sublime/area.cpp:353:5
    #14 0x7fed1fdc3da0 in KDevelop::UiController::loadArea(Sublime::Area*, KConfigGroup const&) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/uicontroller.cpp:556:5
    #15 0x7fed1fdc76d8 in KDevelop::UiController::loadAllAreas(QExplicitlySharedDataPointer<KSharedConfig>) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/uicontroller.cpp:642:17
    #16 0x7fed1fd94817 in KDevelop::CorePrivate::initialize(KDevelop::Core::Setup, QString) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/core.cpp:278:9
    #17 0x7fed1fd994f6 in KDevelop::Core::initialize(QObject*, KDevelop::Core::Setup, QString const&) /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/core.cpp:361:16
    #18 0x51a4b9 in main /home/kfunk/devel/src/kf5/kdevelop-stable/app/main.cpp:631:9
    #19 0x7fed17fd982f in __libc_start_main /build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:291

SUMMARY: AddressSanitizer: heap-use-after-free /home/kfunk/devel/src/kf5/kdevplatform-stable/shell/mainwindow.cpp:433:41 in KDevelop::MainWindow::updateTabColor(KDevelop::IDocument*)
Shadow bytes around the buggy address:
  0x0c0c801d3200: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c801d3210: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
  0x0c0c801d3220: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fa
  0x0c0c801d3230: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c801d3240: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
=>0x0c0c801d3250: fd fd fd fa fa fa fa fa fd fd fd fd[fd]fd fd fd
  0x0c0c801d3260: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c801d3270: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
  0x0c0c801d3280: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c0c801d3290: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c801d32a0: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==6799==ABORTING
Comment 7 Kevin Funk 2016-11-17 09:03:57 UTC
Git commit 53f27417d800d650e1cb8063a2f71dfaa5eb301c by Kevin Funk.
Committed on 17/11/2016 at 09:01.
Pushed by kfunk into branch '5.0'.

Fix crash when doing 'Save As' in some scenarios

Fix crash while trying to save a file as an already open (& modified) file
FIXED-IN: 5.0.3

M  +2    -2    shell/mainwindow.cpp
M  +2    -1    sublime/area.cpp

http://commits.kde.org/kdevplatform/53f27417d800d650e1cb8063a2f71dfaa5eb301c