Bug 283826 - Kate crashes when opening large txt file
Summary: Kate crashes when opening large txt file
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 20.12.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 22:15 UTC by Christian Lins
Modified: 2020-12-11 17:07 UTC (History)
2 users (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 Christian Lins 2011-10-11 22:15:10 UTC
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 x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
I tried to open a large log file (> 140 MiB) and Kate crashed every time with the given segfault.
Perhaps that has something to do with the log file as it contains no newline... only a 140 MiB line of characters.

The crash can be reproduced every time.

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

Thread 2 (Thread 0x7fb8b80cc700 (LWP 11636)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb8b8fc3fe2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007fb8b8fc4019 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007fb8c6f8cefc in start_thread (arg=0x7fb8b80cc700) at pthread_create.c:304
#4  0x00007fb8c996a89d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb8ca00e780 (LWP 11635)):
[KCrash Handler]
#6  0x00007fb8c908a35f in stringToCMap (flags=..., nglyphs=0x7fffff7e6388, glyphs=<optimized out>, len=4096, str=0x7fb8a520e02a, this=0x2a601a0) at text/qfontengine_ft.cpp:1609
#7  QFontEngineFT::stringToCMap (this=0x2a601a0, str=0x7fb8a520e02a, len=4096, glyphs=<optimized out>, nglyphs=0x7fffff7e6388, flags=...) at text/qfontengine_ft.cpp:1554
#8  0x00007fb8c8fc146c in QFontEngineMulti::stringToCMap (this=<optimized out>, str=0x7fb8a520e02a, len=4096, glyphs=0x7fffff7e6730, nglyphs=0x7fffff7e68ec, flags=...) at text/qfontengine.cpp:1316
#9  0x00007fb8c8ff2ad1 in stringToGlyphs (fontEngine=0x2a5c810, glyphs=0x7fffff7e6730, item=0x7fffff7e6650) at text/qtextengine.cpp:823
#10 QTextEngine::shapeTextWithHarfbuzz (this=0x2dc67e0, item=<optimized out>) at text/qtextengine.cpp:1178
#11 0x00007fb8c8ff37cb in QTextEngine::shapeText (this=0x2dc67e0, item=0) at text/qtextengine.cpp:874
#12 0x00007fb8c8ff3af8 in QTextEngine::shape (this=0x2dc67e0, item=0) at text/qtextengine.cpp:1384
#13 0x00007fb8c8ffd7fd in QTextLine::layout_helper (this=0x7fffff7e7250, maxGlyphs=<optimized out>) at text/qtextlayout.cpp:1874
#14 0x00007fb8b96300a2 in KateRenderer::layoutLine (this=0x2a597d0, lineLayout=..., maxwidth=992, cacheLayout=<optimized out>) at ../../part/render/katerenderer.cpp:951
#15 0x00007fb8b963499d in KateLayoutCache::line (this=0x2a5e320, realLine=0, virtualLine=-1) at ../../part/render/katelayoutcache.cpp:314
#16 0x00007fb8b96360eb in KateLayoutCache::updateViewCache (this=0x2a5e320, startPos=..., newViewLineCount=0, viewLinesScrolled=0) at ../../part/render/katelayoutcache.cpp:181
#17 0x00007fb8b968566d in KateViewInternal::tagLines (this=0x2a5ac00, start=..., end=..., realCursors=<optimized out>) at ../../part/view/kateviewinternal.cpp:1963
#18 0x00007fb8b9685adc in KateViewInternal::tagLines (this=0x2a5ac00, start=0, end=<optimized out>, realLines=true) at ../../part/view/kateviewinternal.cpp:1933
#19 0x00007fb8b95f6d12 in KateDocument::tagLines (this=<optimized out>, start=0, end=1) at ../../part/document/katedocument.cpp:3588
#20 0x00007fb8b960614a in KateDocument::qt_metacall (this=0x27d0080, _c=QMetaObject::InvokeMetaMethod, _id=51, _a=0x7fffff7e7840) at ./katedocument.moc:350
#21 0x00007fb8c785eeba in QMetaObject::activate (sender=0x27d0b00, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffff7e7840) at kernel/qobject.cpp:3278
#22 0x00007fb8b960ef1f in KateBuffer::tagLines (this=<optimized out>, _t1=0, _t2=1) at ./katebuffer.moc:98
#23 0x00007fb8b961113f in KateBuffer::doHighlight (this=<optimized out>, startLine=0, endLine=0, invalidate=true) at ../../part/document/katebuffer.cpp:708
#24 0x00007fb8b9611944 in KateBuffer::ensureHighlighted (this=0x27d0b00, line=<optimized out>) at ../../part/document/katebuffer.cpp:245
#25 0x00007fb8b95f13da in KateDocument::kateTextLine (this=0x27d0080, i=0) at ../../part/document/katedocument.cpp:4747
#26 0x00007fb8b9637aed in KateLineLayout::textLine (this=0x2dc6890, reloadForce=<optimized out>) at ../../part/render/katelinelayout.cpp:67
#27 0x00007fb8b962fe9d in KateRenderer::layoutLine (this=0x2a597d0, lineLayout=..., maxwidth=992, cacheLayout=true) at ../../part/render/katerenderer.cpp:894
#28 0x00007fb8b963499d in KateLayoutCache::line (this=0x2a5e320, realLine=0, virtualLine=-1) at ../../part/render/katelayoutcache.cpp:314
#29 0x00007fb8b96360eb in KateLayoutCache::updateViewCache (this=0x2a5e320, startPos=..., newViewLineCount=35, viewLinesScrolled=0) at ../../part/render/katelayoutcache.cpp:181
#30 0x00007fb8b9682d5f in doUpdateView (viewLinesScrolled=0, changed=<optimized out>, this=0x2a5ac00) at ../../part/view/kateviewinternal.cpp:548
#31 KateViewInternal::doUpdateView (this=0x2a5ac00, changed=<optimized out>, viewLinesScrolled=0) at ../../part/view/kateviewinternal.cpp:528
#32 0x00007fb8b968347c in KateViewInternal::updateView (this=0x2a5ac00, changed=true, viewLinesScrolled=<optimized out>) at ../../part/view/kateviewinternal.cpp:522
#33 0x00007fb8b966df16 in KateView::updateView (this=0x2a5a060, changed=<optimized out>) at ../../part/view/kateview.cpp:1680
#34 0x00007fb8b95f6b29 in KateDocument::updateConfig (this=0x27d0080) at ../../part/document/katedocument.cpp:4045
#35 0x00007fb8b96d87be in KateDocumentConfig::setEncoding (this=0x27d1110, encoding=<optimized out>) at ../../part/utils/kateconfig.cpp:820
#36 0x00007fb8b960f1c3 in KateBuffer::openFile (this=0x27d0b00, m_file=...) at ../../part/document/katebuffer.cpp:164
#37 0x00007fb8b960aacd in KateDocument::openFile (this=0x27d0080) at ../../part/document/katedocument.cpp:1972
#38 0x00007fb8c3f0582c in KParts::ReadOnlyPartPrivate::openLocalFile (this=0x27cff20) at ../../kparts/part.cpp:590
#39 0x00007fb8c3f05e74 in KParts::ReadOnlyPart::openUrl (this=0x27d0080, url=...) at ../../kparts/part.cpp:554
#40 0x00007fb8c84931f5 in KateDocManager::openUrl (this=0x265f1c0, url=<optimized out>, encoding=..., isTempFile=false, docInfo=...) at ../../../kate/app/katedocmanager.cpp:304
#41 0x00007fb8c84a142d in KateViewManager::openUrl (this=0x2801f30, url=..., encoding=..., activate=false, isTempFile=false, docInfo=...) at ../../../kate/app/kateviewmanager.cpp:261
#42 0x00007fb8c8488530 in KateApp::startupKate (this=0x7fffff7e8d20) at ../../../kate/app/kateapp.cpp:222
#43 0x00007fb8c8489235 in KateApp::initKate (this=0x7fffff7e8d20) at ../../../kate/app/kateapp.cpp:135
#44 0x00007fb8c8489452 in KateApp::KateApp (this=0x7fffff7e8d20, args=<optimized out>) at ../../../kate/app/kateapp.cpp:72
#45 0x00007fb8c9c2dce6 in kdemain (argc=<optimized out>, argv=<optimized out>) at ../../../kate/app/katemain.cpp:373
#46 0x00007fb8c98aa30d in __libc_start_main (main=0x400630 <main(int, char**)>, argc=3, ubp_av=0x7fffff7ea258, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffff7ea248) at libc-start.c:226
#47 0x0000000000400661 in _start ()

Possible duplicates by query: bug 230658.

Reported using DrKonqi
Comment 1 Christoph Cullmann 2011-11-07 12:18:59 UTC
Qt doesn't like multi-thousand column lines for layouting.
Current Kate master just limits the lines to some threshold and hard wraps on load.
Comment 2 Ilya Bizyaev 2020-12-11 15:24:23 UTC
I can reproduce it with Kate 20.12.
Comment 3 Christoph Feck 2020-12-11 16:50:09 UTC
Please do not reopen ancient bugs. Instead, report a new ticket with a current backtrace.
Comment 4 Ilya Bizyaev 2020-12-11 17:07:25 UTC
If I opened a new ticket right away, it would have been closed as a duplicate; will do now.