Bug 284450 - The kate snippets expand when the file recovery panel is visible lead to SEGV
Summary: The kate snippets expand when the file recovery panel is visible lead to SEGV
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: plugin-snippets (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 11:38 UTC by Kabakov Alexander
Modified: 2012-10-22 17:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kabakov Alexander 2011-10-19 11:38:41 UTC
Application: kate (3.7.1)
KDE Platform Version: 4.7.1 (4.7.1) (Compiled from sources)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-12-generic i686
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:

Had swap file .myfile.kate-swp for previous crash
started kate and dont't touched recovery buttons, but started typing code
and then selected snippet from autocomplete list

Reproducable - 100% on latest svn version

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
[Current thread is 1 (Thread 0xb78b9710 (LWP 12863))]

Thread 5 (Thread 0xb6bffb70 (LWP 12865)):
#0  0x00ba5416 in __kernel_vsyscall ()
#1  0x002f940e in __GI___poll (fds=0x92a7280, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x00aaf34b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x00aa0896 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x00aa0f9b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x067dbcea in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x00ac75f4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x001c5d31 in start_thread (arg=0xb6bffb70) at pthread_create.c:304
#8  0x003080ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 4 (Thread 0xb5599b70 (LWP 12868)):
#0  0x035379f7 in __i686.get_pc_thunk.bx () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#1  0x035ac736 in QElapsedTimer::isMonotonic () at tools/qelapsedtimer_unix.cpp:106
#2  0x0367f7a3 in QTimerInfoList::repairTimersIfNeeded (this=0x989c934) at kernel/qeventdispatcher_unix.cpp:395
#3  0x0367f821 in QTimerInfoList::timerWait (this=0x989c934, tm=...) at kernel/qeventdispatcher_unix.cpp:443
#4  0x0367e053 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xb559912c) at kernel/qeventdispatcher_glib.cpp:136
#5  0x0367e0ed in timerSourcePrepare (source=0x989c900, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#6  0x00a9f88c in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x00aa0637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0x00aa0c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0x0367eb37 in QEventDispatcherGlib::processEvents (this=0x989b1f8, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#10 0x0364f1dd in QEventLoop::processEvents (this=0xb55992b0, flags=...) at kernel/qeventloop.cpp:149
#11 0x0364f421 in QEventLoop::exec (this=0xb55992b0, flags=...) at kernel/qeventloop.cpp:201
#12 0x0355290b in QThread::exec (this=0x9898db0) at thread/qthread.cpp:498
#13 0x0362fe2d in QInotifyFileSystemWatcherEngine::run (this=0x9898db0) at io/qfilesystemwatcher_inotify.cpp:248
#14 0x035557b3 in QThreadPrivate::start (arg=0x9898db0) at thread/qthread_unix.cpp:331
#15 0x001c5d31 in start_thread (arg=0xb5599b70) at pthread_create.c:304
#16 0x003080ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 3 (Thread 0xb4d3eb70 (LWP 12869)):
#0  0x00ba5416 in __kernel_vsyscall ()
#1  0x001c9a5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0x00315cfc in __pthread_cond_wait (cond=0x65f8a50, mutex=0x65f8a38) at forward.c:139
#3  0x064f39a9 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#4  0x064f39ef in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4
#5  0x001c5d31 in start_thread (arg=0xb4d3eb70) at pthread_create.c:304
#6  0x003080ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 2 (Thread 0xb28e7b70 (LWP 12872)):
#0  __pthread_mutex_unlock_usercnt (mutex=0x9a5786c, decr=1) at pthread_mutex_unlock.c:36
#1  0x00315f54 in pthread_mutex_unlock (mutex=0x9a5786c) at forward.c:184
#2  0x00a9f87f in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x00aa0637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x00aa0c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x0367eb37 in QEventDispatcherGlib::processEvents (this=0x987df90, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x0364f1dd in QEventLoop::processEvents (this=0xb28e72b0, flags=...) at kernel/qeventloop.cpp:149
#7  0x0364f421 in QEventLoop::exec (this=0xb28e72b0, flags=...) at kernel/qeventloop.cpp:201
#8  0x0355290b in QThread::exec (this=0x9976500) at thread/qthread.cpp:498
#9  0x0362fe2d in QInotifyFileSystemWatcherEngine::run (this=0x9976500) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x035557b3 in QThreadPrivate::start (arg=0x9976500) at thread/qthread_unix.cpp:331
#11 0x001c5d31 in start_thread (arg=0xb28e7b70) at pthread_create.c:304
#12 0x003080ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xb78b9710 (LWP 12863)):
[KCrash Handler]
#7  KTextEditor::MovingRange::operator KTextEditor::Range const (this=0x0) at /home/ak/kde/kate/ktexteditor/movingrange.h:339
#8  0x0423349f in KateTemplateHandler::handleTemplateString (this=0x9ac7488, initialValues=...) at /home/ak/kde/kate/part/utils/katetemplatehandler.cpp:424
#9  0x04235de2 in KateTemplateHandler::KateTemplateHandler (this=0x9ac7488, view=0x98e2040, position=..., templateString=..., initialValues=..., undoManager=0x94fde20, templateScript=0x9812a68) at /home/ak/kde/kate/part/utils/katetemplatehandler.cpp:121
#10 0x040f6770 in KateDocument::insertTemplateTextImplementation (this=0x94e9f80, c=..., templateString=..., initialValues=..., templateScript=0x9812aa8, view=0x98e2040) at /home/ak/kde/kate/part/document/katedocument.cpp:4718
#11 0x041964ac in KateView::insertTemplateTextImplementation (this=0x98e2040, c=..., templateString=..., initialValues=..., templateScript=0x9812aa8) at /home/ak/kde/kate/part/view/kateview.cpp:2069
#12 0x00b769a8 in KTextEditor::TemplateInterface2::insertTemplateText (this=0x98e2070, insertPosition=..., templateString=..., initialValues=..., templateScript=0x9812aa8) at /home/ak/kde/kate/ktexteditor/templateinterface2.cpp:59
#13 0x0204e53b in KTextEditor::CodesnippetsCore::SnippetCompletionModel::executeCompletionItem2 (this=0x97f65f8, document=0x94e9f80, word=..., index=...) at /home/ak/kde/kate/kate/plugins/snippets_tng/lib/completionmodel.cpp:401
#14 0x040af675 in KateCompletionWidget::execute (this=0x995af98) at /home/ak/kde/kate/part/completion/katecompletionwidget.cpp:821
#15 0x041b813d in KateViewInternal::keyPressEvent (this=0x98e8b98, e=0xbfedfa44) at /home/ak/kde/kate/part/view/kateviewinternal.cpp:2257
#16 0x041af946 in KateViewInternal::eventFilter (this=0x98e8b98, obj=0x98e8b98, e=0xbfedfa44) at /home/ak/kde/kate/part/view/kateviewinternal.cpp:2164
#17 0x03650336 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x91df070, receiver=0x98e8b98, event=0xbfedfa44) at kernel/qcoreapplication.cpp:902
#18 0x00d24d22 in notify_helper (e=0xbfedfa44, receiver=0x98e8b98, this=0x91df070) at kernel/qapplication.cpp:4482
#19 QApplicationPrivate::notify_helper (this=0x91df070, receiver=0x98e8b98, e=0xbfedfa44) at kernel/qapplication.cpp:4458
#20 0x00d2ac07 in QApplication::notify (this=0x98e8b98, receiver=0x98e8b98, e=0xbfedfa44) at kernel/qapplication.cpp:3945
#21 0x05d7b721 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0x0365019e in QCoreApplication::notifyInternal (this=0xbfee03f8, receiver=0x98e8b98, event=0xbfedfa44) at kernel/qcoreapplication.cpp:787
#23 0x00d22b6d in sendSpontaneousEvent (event=0xbfedfa44, receiver=0x98e8b98) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#24 qt_sendSpontaneousEvent (receiver=0x98e8b98, event=0xbfedfa44) at kernel/qapplication.cpp:5480
#25 0x00dd88b1 in QKeyMapper::sendKeyEvent (keyWidget=0x98e8b98, grab=false, type=QEvent::KeyPress, code=16777220, modifiers=..., text=..., autorepeat=false, count=-1074922940, nativeScanCode=162296968, nativeVirtualKey=162296968, nativeModifiers=162296968) at kernel/qkeymapper_x11.cpp:1866
#26 0x00dd8d55 in QKeyMapperPrivate::translateKeyEvent (this=0x92091c0, keyWidget=0x98e8b98, event=0xbfee002c, grab=false) at kernel/qkeymapper_x11.cpp:1836
#27 0x00db09f5 in QApplication::x11ProcessEvent (this=0xbfee03f8, event=0xbfee002c) at kernel/qapplication_x11.cpp:3583
#28 0x00ddd24c in x11EventSourceDispatch (s=0x91e0318, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#29 0x00aa025f in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#30 0x00aa0990 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#31 0x00aa0c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0x0367eada in QEventDispatcherGlib::processEvents (this=0x91b3248, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#33 0x00ddce3a in QGuiEventDispatcherGlib::processEvents (this=0x91b3248, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#34 0x0364f1dd in QEventLoop::processEvents (this=0xbfee0334, flags=...) at kernel/qeventloop.cpp:149
#35 0x0364f421 in QEventLoop::exec (this=0xbfee0334, flags=...) at kernel/qeventloop.cpp:201
#36 0x0365419d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#37 0x00d228f4 in QApplication::exec () at kernel/qapplication.cpp:3760
#38 0x00bc5d22 in kdemain (argc=1, argv=0xbfee0a54) at /home/ak/kde/kate/kate/app/katemain.cpp:377
#39 0x080484f7 in main (argc=1, argv=0xbfee0a54) at /home/ak/kde/build/kate/app/kate_dummy.cpp:3

Reported using DrKonqi
Comment 1 Dominik Haumann 2012-03-10 19:59:41 UTC
Milian, Jowenn? :-)
Comment 2 Joseph Wenninger 2012-10-22 17:28:38 UTC
Git commit 0f2c876632ed05f33a25ddb8780544e99fae51c8 by Joseph Wenninger.
Committed on 22/10/2012 at 19:26.
Pushed by jowenn into branch 'master'.

Do not try to insert a template into a readonly document -> 1) semantic issue 2) crashes -> should fix bug #284450

M  +2    -0    part/document/katedocument.cpp

http://commits.kde.org/kate/0f2c876632ed05f33a25ddb8780544e99fae51c8