Application: kate (3.7.1) KDE Platform Version: 4.7.1 (4.7.1) 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: Developing and testing my snippet Kate crash'ed when i've selected template expansion form autocomplete menu - Custom settings of the application: function generateFunctionComment(src) { var cursor = view.cursorPosition(); var currentLine = document.line(cursor.line) .replace("${fn`generateFunctionComment`}", ""); // if cursor placed on function declaration var functionDeclarationRegexp = new RegExp("=\\s*function\\s*\\("); if(functionDeclarationRegexp.test(currentLine)) { var commentText = "/**\n * Функция \n"; var argsPart = currentLine.split(new RegExp("=\\s*function\\s*\\("))[1] .replace(")", "").replace(" ", ""); for(var i = 0, c = argsPart.split(",").length; i < c; i++) { var argName = argsPart[i]; commentText += " * @param {unknown_type} " + argName + "\n"; } commentText += " */\n"; document.insertText(cursor.line, 0, commentText); } return ""; } -- Backtrace: Application: Kate (kate), signal: Segmentation fault [Current thread is 1 (Thread 0xb77c8710 (LWP 9752))] Thread 5 (Thread 0xb6affb70 (LWP 9754)): #0 0x0061d680 in g_thread_self () from /lib/i386-linux-gnu/libglib-2.0.so.0 #1 0x005f3ea7 in g_main_context_acquire () from /lib/i386-linux-gnu/libglib-2.0.so.0 #2 0x005f556d in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #3 0x005f5f9b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0 #4 0x01fbecea in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0 #5 0x0061c5f4 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #6 0x002c7d31 in start_thread (arg=0xb6affb70) at pthread_create.c:304 #7 0x001e20ce 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 0xb4630b70 (LWP 9756)): #0 0x00703d10 in __GI_clock_gettime (clock_id=1, tp=0xb4630028) at ../sysdeps/unix/clock_gettime.c:116 #1 0x0221d7d5 in do_gettime (frac=0xb4630020, sec=0xb4630018) at tools/qelapsedtimer_unix.cpp:123 #2 qt_gettime () at tools/qelapsedtimer_unix.cpp:140 #3 0x022f04b6 in QTimerInfoList::updateCurrentTime (this=0xb6b151b4) at kernel/qeventdispatcher_unix.cpp:339 #4 0x022f080a in QTimerInfoList::timerWait (this=0xb6b151b4, tm=...) at kernel/qeventdispatcher_unix.cpp:442 #5 0x022ef053 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xb463012c) at kernel/qeventdispatcher_glib.cpp:136 #6 0x022ef0ed in timerSourcePrepare (source=0xb6b15180, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169 #7 0x005f488c in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0 #8 0x005f5637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #9 0x005f5c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0 #10 0x022efb37 in QEventDispatcherGlib::processEvents (this=0x9800b10, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #11 0x022c01dd in QEventLoop::processEvents (this=0xb46302b0, flags=...) at kernel/qeventloop.cpp:149 #12 0x022c0421 in QEventLoop::exec (this=0xb46302b0, flags=...) at kernel/qeventloop.cpp:201 #13 0x021c390b in QThread::exec (this=0x985beb0) at thread/qthread.cpp:498 #14 0x022a0e2d in QInotifyFileSystemWatcherEngine::run (this=0x985beb0) at io/qfilesystemwatcher_inotify.cpp:248 #15 0x021c67b3 in QThreadPrivate::start (arg=0x985beb0) at thread/qthread_unix.cpp:331 #16 0x002c7d31 in start_thread (arg=0xb4630b70) at pthread_create.c:304 #17 0x001e20ce 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 0xb74eeb70 (LWP 9804)): #0 0x002cad0d in __pthread_mutex_unlock_usercnt (mutex=0x9d692e4, decr=1) at pthread_mutex_unlock.c:36 #1 0x001eff54 in pthread_mutex_unlock (mutex=0x9d692e4) at forward.c:184 #2 0x005f487f in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0 #3 0x005f5637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #4 0x005f5c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0 #5 0x022efb37 in QEventDispatcherGlib::processEvents (this=0x9d69068, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #6 0x022c01dd in QEventLoop::processEvents (this=0xb74ee2b0, flags=...) at kernel/qeventloop.cpp:149 #7 0x022c0421 in QEventLoop::exec (this=0xb74ee2b0, flags=...) at kernel/qeventloop.cpp:201 #8 0x021c390b in QThread::exec (this=0x9d660f0) at thread/qthread.cpp:498 #9 0x022a0e2d in QInotifyFileSystemWatcherEngine::run (this=0x9d660f0) at io/qfilesystemwatcher_inotify.cpp:248 #10 0x021c67b3 in QThreadPrivate::start (arg=0x9d660f0) at thread/qthread_unix.cpp:331 #11 0x002c7d31 in start_thread (arg=0xb74eeb70) at pthread_create.c:304 #12 0x001e20ce 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 0xb35d4b70 (LWP 9805)): #0 0x005b1416 in __kernel_vsyscall () #1 0x002cba5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169 #2 0x001efcfc in __pthread_cond_wait (cond=0x398aa50, mutex=0x398aa38) at forward.c:139 #3 0x038859a9 in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4 #4 0x038859ef in ?? () from /usr/lib/i386-linux-gnu/libQtScript.so.4 #5 0x002c7d31 in start_thread (arg=0xb35d4b70) at pthread_create.c:304 #6 0x001e20ce 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 0xb77c8710 (LWP 9752)): [KCrash Handler] #7 0x02e78157 in KateTemplateHandler::KateTemplateHandler (this=0xbaf6e10, view=0xa564b18, position=..., templateString=..., initialValues=..., undoManager=0xa24fdb0, templateScript=0xa624b18) at /home/ak/kde/kate/part/utils/katetemplatehandler.cpp:128 #8 0x02d38770 in KateDocument::insertTemplateTextImplementation (this=0xa387608, c=..., templateString=..., initialValues=..., templateScript=0xa624b58, view=0xa564b18) at /home/ak/kde/kate/part/document/katedocument.cpp:4718 #9 0x02dd84ac in KateView::insertTemplateTextImplementation (this=0xa564b18, c=..., templateString=..., initialValues=..., templateScript=0xa624b58) at /home/ak/kde/kate/part/view/kateview.cpp:2069 #10 0x007b29a8 in KTextEditor::TemplateInterface2::insertTemplateText (this=0xa564b48, insertPosition=..., templateString=..., initialValues=..., templateScript=0xa624b58) at /home/ak/kde/kate/ktexteditor/templateinterface2.cpp:59 #11 0x02faeb4b in KTextEditor::CodesnippetsCore::CategorizedSnippetModel::actionTriggered (this=0xa2e7ec8) at /home/ak/kde/kate/kate/plugins/snippets_tng/lib/completionmodel.cpp:847 #12 0x02faec7b in KTextEditor::CodesnippetsCore::CategorizedSnippetModel::qt_metacall (this=0xa2e7ec8, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0xbfbad698) at /home/ak/kde/build/kate/plugins/snippets_tng/lib/completionmodel.moc:135 #13 0x022c7b7d in metacall (argv=0xbfbad698, idx=26, cl=QMetaObject::InvokeMetaMethod, object=0xa2e7ec8) at kernel/qmetaobject.cpp:237 #14 QMetaObject::metacall (object=0xa2e7ec8, cl=QMetaObject::InvokeMetaMethod, idx=26, argv=0xbfbad698) at kernel/qmetaobject.cpp:232 #15 0x022d6a6a in QMetaObject::activate (sender=0xb939e68, m=0x181f458, local_signal_index=1, argv=0xbfbad698) at kernel/qobject.cpp:3278 #16 0x00ecf83d in QAction::triggered (this=0xb939e68, _t1=false) at .moc/release-shared/moc_qaction.cpp:263 #17 0x00ecfadb in QAction::activate (this=0xb939e68, event=QAction::Trigger) at kernel/qaction.cpp:1257 #18 0x00ecfc70 in QAction::event (this=0xbaf6e10, e=0x740074) at kernel/qaction.cpp:1183 #19 0x087e32af in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5 #20 0x00ed6d54 in notify_helper (e=0xbfbada68, receiver=0xb939e68, this=0x94bcbc0) at kernel/qapplication.cpp:4486 #21 QApplicationPrivate::notify_helper (this=0x94bcbc0, receiver=0xb939e68, e=0xbfbada68) at kernel/qapplication.cpp:4458 #22 0x00edc103 in QApplication::notify (this=0xbfbada68, receiver=0xb939e68, e=0xbfbada68) at kernel/qapplication.cpp:3886 #23 0x088e5721 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5 #24 0x022c119e in QCoreApplication::notifyInternal (this=0xbfbae748, receiver=0xb939e68, event=0xbfbada68) at kernel/qcoreapplication.cpp:787 #25 0x00f0f597 in sendEvent (event=0xbfbada68, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #26 QShortcutMap::dispatchEvent (this=0x94bcc6c, e=0xbfbadd94) at kernel/qshortcutmap.cpp:879 #27 0x00f10b75 in QShortcutMap::tryShortcutEvent (this=0x94bcc6c, o=0x9e10098, e=0xbfbadd94) at kernel/qshortcutmap.cpp:364 #28 0x00ede0ea in QApplication::notify (this=0x9e10098, receiver=0x9e10098, e=0xbfbadd94) at kernel/qapplication.cpp:3928 #29 0x088e5721 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5 #30 0x022c119e in QCoreApplication::notifyInternal (this=0xbfbae748, receiver=0x9e10098, event=0xbfbadd94) at kernel/qcoreapplication.cpp:787 #31 0x00ed4b6d in sendSpontaneousEvent (event=0xbfbadd94, receiver=0x9e10098) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218 #32 qt_sendSpontaneousEvent (receiver=0x9e10098, event=0xbfbadd94) at kernel/qapplication.cpp:5480 #33 0x00f8a8b1 in QKeyMapper::sendKeyEvent (keyWidget=0x9e10098, grab=false, type=QEvent::KeyPress, code=75, modifiers=..., text=..., autorepeat=false, count=-1078272620, nativeScanCode=196046352, nativeVirtualKey=196046352, nativeModifiers=196046352) at kernel/qkeymapper_x11.cpp:1866 #34 0x00f8ad55 in QKeyMapperPrivate::translateKeyEvent (this=0x94eb2b8, keyWidget=0x9e10098, event=0xbfbae37c, grab=false) at kernel/qkeymapper_x11.cpp:1836 #35 0x00f629f5 in QApplication::x11ProcessEvent (this=0xbfbae748, event=0xbfbae37c) at kernel/qapplication_x11.cpp:3583 #36 0x00f8f24c in x11EventSourceDispatch (s=0x94c29e8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146 #37 0x005f525f in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0 #38 0x005f5990 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #39 0x005f5c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0 #40 0x022efada in QEventDispatcherGlib::processEvents (this=0x9498248, flags=...) at kernel/qeventdispatcher_glib.cpp:422 #41 0x00f8ee3a in QGuiEventDispatcherGlib::processEvents (this=0x9498248, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #42 0x022c01dd in QEventLoop::processEvents (this=0xbfbae684, flags=...) at kernel/qeventloop.cpp:149 #43 0x022c0421 in QEventLoop::exec (this=0xbfbae684, flags=...) at kernel/qeventloop.cpp:201 #44 0x022c519d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064 #45 0x00ed48f4 in QApplication::exec () at kernel/qapplication.cpp:3760 #46 0x00d77d22 in kdemain (argc=1, argv=0xbfbaeda4) at /home/ak/kde/kate/kate/app/katemain.cpp:377 #47 0x080484f7 in main (argc=1, argv=0xbfbaeda4) at /home/ak/kde/build/kate/app/kate_dummy.cpp:3 Possible duplicates by query: bug 241935. Reported using DrKonqi
Reprocucable - 100% At the moment of SEGV this pointer is invalid because destructor for him was already called... I've traced some calls... Destructor was called from KateTemplateHandler::handleTemplateString I know that is weird
How can I reproduce that to 100%?
Hi, if you can reproduce that to 100%, please provide me with the snippet + snippet scripts and some mini howto ;) I can see some script here that is pasted in the first comment but no snippet. I fixed some stuff in template interface today, still no idea if that really fixes your issue. Any help highly appreciated!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!