Bug 335755 - kate crashes after a few seconds of editing LaTeX file
Summary: kate crashes after a few seconds of editing LaTeX file
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 3.13.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
: 337466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-03 15:52 UTC by ayr035+kde
Modified: 2014-07-20 00:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ktexteditor_klf backtrace (6.58 KB, text/plain)
2014-06-04 19:05 UTC, ayr035+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ayr035+kde 2014-06-03 15:52:00 UTC
Application: kate (3.13.1)
KDE Platform Version: 4.13.1
Qt Version: 4.8.6
Operating System: Linux 3.14.5-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:
I was editing a LaTeX file.  The crashes happens when I am either editing the file or just scrolling through it.

- Custom settings of the application:
I can only reproduce the crash reliably with a LaTeX file (any LaTeX file seems to trigger it).  Other file types seem unaffected.  

Notes:
I regularly edited these same files in prior versions of Kate without any problem.  I think a distribution (archlinux in my case) update caused the problem.

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f63a87db780 (LWP 7458))]

Thread 4 (Thread 0x7f638a522700 (LWP 7459)):
#0  0x00007f63a706566d in read () from /usr/lib/libpthread.so.0
#1  0x00007f63a2f1e9b0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f63a2edd894 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007f63a2eddcfb in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007f63a2edde6c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007f63a741f2c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f63a73f115f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007f63a73f1455 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x00007f63a72ed7ef in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0x00007f63a73d2943 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f63a72efebf in ?? () from /usr/lib/libQtCore.so.4
#11 0x00007f63a705e124 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007f63a5dd94bd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f6389c5e700 (LWP 7460)):
#0  0x00007f63a7062b2f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f639a51dfab in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f639a51dfe9 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f63a705e124 in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007f63a5dd94bd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f62fa4ea700 (LWP 7466)):
#0  0x00007f63a5dd081d in poll () from /usr/lib/libc.so.6
#1  0x00007f63a2eddd64 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f63a2edde6c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f63a741f2c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f63a73f115f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f63a73f1455 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f63a72ed7ef in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f638c1ca4dc in KLFLatexPreviewThread::run() () from /usr/lib/libklfbackend.so.3.3
#8  0x00007f63a72efebf in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f63a705e124 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007f63a5dd94bd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f63a87db780 (LWP 7458)):
[KCrash Handler]
#5  0x00007f638c403e78 in ?? () from /usr/lib/kde4/ktexteditor_klf.so
#6  0x00007f638c3fded1 in ?? () from /usr/lib/kde4/ktexteditor_klf.so
#7  0x00007f63a740630a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#8  0x00007f6392779507 in KTextEditor::View::cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor const&) () from /usr/lib/libktexteditor.so.4
#9  0x00007f638c7a0316 in KateViewInternal::updateCursor (this=this@entry=0x150daa0, newCursor=..., force=force@entry=true, center=center@entry=false, calledExternally=calledExternally@entry=false) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:1925
#10 0x00007f638c7a2228 in KateViewInternal::editEnd (this=0x150daa0, editTagLineStart=119, editTagLineEnd=119, tagFrom=<optimized out>) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:3422
#11 0x00007f638c718cd2 in KateDocument::editEnd (this=0x1) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/document/katedocument.cpp:821
#12 0x00007f638c71d0e1 in KateDocument::typeChars (this=0xf1a5d0, view=0x14ee630, realChars=...) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/document/katedocument.cpp:2651
#13 0x00007f638c79ccc0 in KateViewInternal::keyPressEvent (this=0x150daa0, e=0x7fff701e95d0) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:2430
#14 0x00007f638c7a2407 in KateViewInternal::eventFilter (this=0x150daa0, obj=0x150daa0, e=0x7fff701e95d0) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:2231
#15 0x00007f63a73f26f6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#16 0x00007f63a6574eec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007f63a657c741 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x00007f63a81d263a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#19 0x00007f63a73f258d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#20 0x00007f63a660f3f7 in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f63a660f799 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007f63a65eb71f in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007f63a6611f02 in ?? () from /usr/lib/libQtGui.so.4
#24 0x00007f63a2eddb84 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#25 0x00007f63a2edddc8 in ?? () from /usr/lib/libglib-2.0.so.0
#26 0x00007f63a2edde6c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#27 0x00007f63a741f2a5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x00007f63a6611fb6 in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007f63a73f115f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007f63a73f1455 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0x00007f63a73f6719 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#32 0x00007f6392c29d2d in kdemain (argc=1, argv=0x1) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/kate/app/katemain.cpp:381
#33 0x00000000004080e6 in _start ()

Possible duplicates by query: bug 329047, bug 321664.

Reported using DrKonqi
Comment 1 Dominik Haumann 2014-06-04 17:18:08 UTC
@Philippe: This crash goes into your KLatexFormula KTextEditor plugin. Can you please have a look? I'll close as downstream, as this is not a kate issue. Please take care of it, though.

@ayr035+kde: You can be of great help in finding the cause of this issue if you install the ktexteditor_klf plugin with debug information/symbols, and then reproduce this crash again, and paste the backtrace again here.
Comment 2 ayr035+kde 2014-06-04 19:05:19 UTC
Created attachment 87015 [details]
ktexteditor_klf backtrace

Compiled the plugin with debug symbols.  I didn't even think that it might be related to KLatexFormula.
Comment 3 Dominik Haumann 2014-06-04 22:07:48 UTC
Thanks, now the backtrace looks like this:

Thread 1 (Thread 0x7fcb150a6780 (LWP 5325)):
[KCrash Handler]
#5  KSharedPtr (o=..., this=<optimized out>) at /usr/include/ksharedptr.h:84
#6  AttributeBlock (this=<optimized out>) at /usr/include/ktexteditor/highlightinterface.h:106
#7  HiAttElem (l=-1, h=..., this=<optimized out>) at /build/klatexformula/src/klatexformula-3.2.9/src/klfkateplugin/klfkteparser_p.h:121
#8  find_mathmode_transition (wantTrueBoundary=true, forward=false, pos=<incomplete type>, this=0x2968290) at /build/klatexformula/src/klatexformula-3.2.9/src/klfkateplugin/klfkteparser_p.h:350
#9  KLFKteParser_KatePart::parseContext (this=0x2968290, cur=...) at /build/klatexformula/src/klatexformula-3.2.9/src/klfkateplugin/klfkteparser_p.h:189
#10 0x00007fcaf8cc7ed1 in KLFKtePluginView::slotReparseCurrentContext (this=0x346eec0) at /build/klatexformula/src/klatexformula-3.2.9/src/klfkateplugin/klfkateplugin.cpp:348
#11 0x00007fcb13cd130a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007fcaff044507 in KTextEditor::View::cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor const&) () from /usr/lib/libktexteditor.so.4
#13 0x00007fcaf906a316 in KateViewInternal::updateCursor (this=this@entry=0x330eca0, newCursor=..., force=force@entry=true, center=center@entry=false, calledExternally=calledExternally@entry=false) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:1925
#14 0x00007fcaf906c228 in KateViewInternal::editEnd (this=0x330eca0, editTagLineStart=158, editTagLineEnd=158, tagFrom=<optimized out>) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:3422
#15 0x00007fcaf8fe2cd2 in KateDocument::editEnd (this=0x1) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/document/katedocument.cpp:821
#16 0x00007fcaf8fe70e1 in KateDocument::typeChars (this=0x2d15ad0, view=0x32ef730, realChars=...) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/document/katedocument.cpp:2651
#17 0x00007fcaf9066cc0 in KateViewInternal::keyPressEvent (this=0x330eca0, e=0x7fff8e843c20) at /build/abs/extra/kdesdk-kate/src/kate-4.13.1/part/view/kateviewinternal.cpp:2430
Comment 4 Philippe Faist 2014-06-15 19:04:44 UTC
Hi Dominik,

Thanks for the bug report. I'm currently trying to reproduce it.

How did you install KLatexFormula and which version are you using? The
paths in the backtrace suggest you're using 3.2.9 but the listed source
file "klfkteparser_p.h" is only present in the development version.

Best,
Philippe
Comment 5 Philippe Faist 2014-06-15 19:54:08 UTC
Hi again,

Digging into this problem, I realized that I had done a mistake and
packaged the *development branch* instead of the *stable branch* into
3.2.9. I now released version 3.2.10 which is what was supposed to be
3.2.9, which should not make kwrite crash.

Thanks for the feedback,
Philippe
Comment 6 Christoph Feck 2014-07-20 00:58:32 UTC
*** Bug 337466 has been marked as a duplicate of this bug. ***