Bug 236899 - Kate crashed on undo
Summary: Kate crashed on undo
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 208056 247331 253962 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-08 20:37 UTC by Bernhard Beschow
Modified: 2012-01-21 16:15 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The file contains one line of HTML encoded for JavaScript (99.03 KB, text/html)
2011-02-08 01:16 UTC, Christopher Yeleighton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2010-05-08 20:37:20 UTC
Application: kwrite (4.4.3 (KDE 4.4.3))
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.33-ARCH i686
Distribution (Platform): Archlinux Packages

-- Information about the crash:
Using the latest svn version of the part, Kate (latest stable) crashed while performing an undo.

 -- Backtrace:
Application: KWrite (kwrite), signal: Segmentation fault
[KCrash Handler]
#6  0xb689babd in QTextLine::cursorToX(int*, QTextLine::Edge) const () from /usr/lib/libQtGui.so.4
#7  0xb39e7b55 in QTextLine::cursorToX (this=0x9153f80, range=..., pos=...) at /usr/include/QtGui/qtextlayout.h:218
#8  KateRenderer::cursorToX (this=0x9153f80, range=..., pos=...) at /home/shentey/Projekte/kate-standalone/src/part/render/katerenderer.cpp:994
#9  0xb39e7c2a in KateRenderer::cursorToX (this=0x9153f80, range=..., pos=..., returnPastLine=false) at /home/shentey/Projekte/kate-standalone/src/part/render/katerenderer.cpp:999
#10 0xb3a535dc in KateViewInternal::makeVisible (this=0x9159f00, c=..., endCol=0, force=false, center=true, calledExternally=true)
    at /home/shentey/Projekte/kate-standalone/src/part/view/kateviewinternal.cpp:676
#11 0xb3a5520b in KateViewInternal::updateCursor (this=0x9159f00, newCursor=..., force=false, center=true, calledExternally=true)
    at /home/shentey/Projekte/kate-standalone/src/part/view/kateviewinternal.cpp:1878
#12 0xb3a384b3 in KateView::setCursorPositionInternal (this=0x9155b80, position=..., tabwidth=1, calledExternally=true) at /home/shentey/Projekte/kate-standalone/src/part/view/kateview.cpp:1096
#13 0xb3a38664 in KateView::setCursorPosition (this=0x9155b80, position=...) at /home/shentey/Projekte/kate-standalone/src/part/view/kateview.cpp:2132
#14 0xb39cf047 in KateUndoGroup::undo (this=0x945fc20, view=0x9155b80) at /home/shentey/Projekte/kate-standalone/src/part/undo/kateundo.cpp:219
#15 0xb39d0a4b in KateUndoManager::undo (this=0x9150b38) at /home/shentey/Projekte/kate-standalone/src/part/undo/kateundomanager.cpp:240
#16 0xb39a2223 in KateDocument::undo (this=0x9150b98) at /home/shentey/Projekte/kate-standalone/src/part/document/katedocument.cpp:1516
#17 0xb39b15ad in KateDocument::qt_metacall (this=0x9150b98, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0xbfb56d98) at /home/shentey/Projekte/kate-standalone/build/part/katedocument.moc:335
#18 0xb61cd6ea in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#19 0xb61dc715 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#20 0xb662d399 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#21 0xb662d5fb in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#22 0xb662d7a8 in QAction::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb70396c3 in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5
#24 0xb66345f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0xb66387ee in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0xb71081ba in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0xb61c77db in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#28 0xb6669bd7 in ?? () from /usr/lib/libQtGui.so.4
#29 0xb666b0b7 in ?? () from /usr/lib/libQtGui.so.4
#30 0xb663a794 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#31 0xb71081ba in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#32 0xb61c77db in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#33 0xb6631f5e in ?? () from /usr/lib/libQtGui.so.4
#34 0xb66dd3cd in ?? () from /usr/lib/libQtGui.so.4
#35 0xb66dd7d1 in ?? () from /usr/lib/libQtGui.so.4
#36 0xb66b8292 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#37 0xb66e0892 in ?? () from /usr/lib/libQtGui.so.4
#38 0xb5a1cf72 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#39 0xb5a1d750 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#40 0xb5a1da04 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#41 0xb61f257c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#42 0xb66e04d5 in ?? () from /usr/lib/libQtGui.so.4
#43 0xb61c6a29 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#44 0xb61c6c9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#45 0xb61cb4cf in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#46 0xb6631d17 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#47 0xb76d39f3 in kdemain () from /usr/lib/libkdeinit4_kwrite.so
#48 0x0804853b in _start ()

This bug may be a duplicate of or related to bug 208056.

Possible duplicates by query: bug 208056.

Reported using DrKonqi
Comment 1 Dominik Haumann 2010-05-23 00:49:47 UTC
*** Bug 208056 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Cullmann 2010-09-01 17:34:37 UTC
Need way to reproduce
Comment 3 Christoph Feck 2010-10-23 17:25:12 UTC
Bug 247331 indicates that the crash may happen because of very long lines. I am reopening it so that duplicates can add more information if this is reproducible.
Comment 4 Christoph Feck 2010-10-23 17:25:50 UTC
*** Bug 247331 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2010-10-23 17:26:13 UTC
*** Bug 253962 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2011-01-23 15:53:24 UTC
Bug 263686 has a related backtrace, but with another situation:
I pasted the results of an svn st, such as the following:

?      devel.drush.inc
!      ui.mouse.js
!      devel_themer.module
!      devel_themer.css
!      generate/generate-og2list-mail.php
!      generate/generate-og-users.php
?      krumo/skins/CVS/Entries.Log
!      devel_themer.info
!      ui.draggable.js
?      performance/CVS/Entries.Log
!      loader-little.gif
!      devel_themer.install
!      themer-bar.png
!      devel_themer_ie_fix.css
!      devel_themer.js

Then I did a search and replace to replace all line feeds + ! with a space. It
crashed 2 times consecutively before succeeding the third.
Comment 7 Christopher Yeleighton 2011-02-08 01:16:12 UTC
Created attachment 56957 [details]
The file contains one line of HTML encoded for JavaScript

Kwrite does not crash but it is very unresponsive (takes 80% CPU and does not even refresh).
Comment 8 Christoph Cullmann 2011-11-07 12:20:57 UTC
Small file works now, but only with the new threshold for line length :/
Yeah, know that sucks, but Qt won't allow such long lines in any sane way.
Tested with Kate git master, opens domains.html in under a second + hl.
Comment 9 Christopher Yeleighton 2012-01-21 16:15:36 UTC
I think KWrite should refuse to open text files that exceed the line length threshold (just as it should refuse to open files that are too big), or open them in read-only mode to use less resources (if there is such a mode).
At least, that is what Norton Commander used to do :-)