Bug 300296 - Kile crashes when cutting text
Summary: Kile crashes when cutting text
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 315683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-19 09:12 UTC by Pascal Vanier
Modified: 2013-03-30 12:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.5


Attachments
New crash information added by DrKonqi (5.22 KB, text/plain)
2012-05-21 18:20 UTC, Pascal Vanier
Details
New crash information added by DrKonqi (6.28 KB, text/plain)
2012-05-21 19:49 UTC, Pascal Vanier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Vanier 2012-05-19 09:12:47 UTC
Application: kile (2.1.1)
KDE Platform Version: 4.8.3 (4.8.3)
Qt Version: 4.8.1
Operating System: Linux 3.3.3-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
I selected a big portion of text and cut it (Shift + V, Shift + D), this does not happen when cutting a small portion of text (a few lines) only with really big ones.

- Custom settings of the application:
vi input mode

The crash can be reproduced every time.

-- Backtrace:
Application: Kile (kile), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5e15c24780 (LWP 29933))]

Thread 3 (Thread 0x7f5e01e08700 (LWP 29935)):
#0  0x00007f5e130e42ed in read () from /lib/libpthread.so.0
#1  0x00007f5e0cbb77bf in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f5e0cb7c1ca in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007f5e0cb7c6d2 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007f5e0cb7c854 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007f5e134951b6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5e13465f8f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007f5e13466218 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x00007f5e1336a6f0 in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0x00007f5e1344698f in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f5e1336d68b in ?? () from /usr/lib/libQtCore.so.4
#11 0x00007f5e130dde0e in start_thread () from /lib/libpthread.so.0
#12 0x00007f5e119e41ed in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7f5dfaf80700 (LWP 29939)):
#0  0x00007f5e130e18f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f5e0fc67ae7 in ?? () from /usr/lib/libQtScript.so.4
#2  0x00007f5e0fc67b19 in ?? () from /usr/lib/libQtScript.so.4
#3  0x00007f5e130dde0e in start_thread () from /lib/libpthread.so.0
#4  0x00007f5e119e41ed in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f5e15c24780 (LWP 29933)):
[KCrash Handler]
#5  0x00007f5e125e6d07 in QTextLine::cursorToX(int*, QTextLine::Edge) const () from /usr/lib/libQtGui.so.4
#6  0x00007f5e0257cd86 in ?? () from /usr/lib/libkatepartinterfaces.so.4
#7  0x00007f5e0257ce2e in ?? () from /usr/lib/libkatepartinterfaces.so.4
#8  0x00007f5e025d1a0a in ?? () from /usr/lib/libkatepartinterfaces.so.4
#9  0x00007f5e025d2aaf in ?? () from /usr/lib/libkatepartinterfaces.so.4
#10 0x00007f5e025f0fdd in KateViNormalMode::commandDeleteToEOL() () from /usr/lib/libkatepartinterfaces.so.4
#11 0x00007f5e025fd386 in KateViNormalMode::executeCommand(KateViCommand const*) () from /usr/lib/libkatepartinterfaces.so.4
#12 0x00007f5e025fe490 in KateViNormalMode::handleKeypress(QKeyEvent const*) () from /usr/lib/libkatepartinterfaces.so.4
#13 0x00007f5e025e61d4 in KateViInputModeManager::handleKeypress(QKeyEvent const*) () from /usr/lib/libkatepartinterfaces.so.4
#14 0x00007f5e025d7cce in ?? () from /usr/lib/libkatepartinterfaces.so.4
#15 0x00007f5e025cfffb in ?? () from /usr/lib/libkatepartinterfaces.so.4
#16 0x00007f5e134670f6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#17 0x00007f5e1238403c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x00007f5e12389114 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007f5e13ec8f86 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#20 0x00007f5e13466f8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#21 0x00007f5e1242068a in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007f5e12420ac1 in ?? () from /usr/lib/libQtGui.so.4
#23 0x00007f5e123fe498 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007f5e124247b2 in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007f5e0cb7c37c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0x00007f5e0cb7c798 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0x00007f5e0cb7c854 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0x00007f5e13495196 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007f5e1242442e in ?? () from /usr/lib/libQtGui.so.4
#30 0x00007f5e13465f8f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0x00007f5e13466218 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007f5e1346abf8 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#33 0x0000000000437244 in ?? ()
#34 0x00007f5e11921455 in __libc_start_main () from /lib/libc.so.6
#35 0x00000000004395d5 in _start ()

Reported using DrKonqi
Comment 1 Michel Ludwig 2012-05-19 20:23:19 UTC
Forwarding to KatePart.
Comment 2 Dominik Haumann 2012-05-21 06:32:12 UTC
I thought this was fixed in KDE 4.8.3?

Pascal, can you please install debug infos and test again to provide a better backtrace?
Even better is if you quickly build Kate from sources by following http://kate-editor.org/get-it/

Possible duplicate of #292947
Comment 3 Pascal Vanier 2012-05-21 17:36:43 UTC
It only happens in kile, for the moment it never happened in kate : but I use kile heavily, while I only use kate on small files (I just tried to make kate bug and did not manage to, but kile didn't either right now). I'm building kate and kile from sources, and I'll use them and see if they crash.
Comment 4 Pascal Vanier 2012-05-21 18:20:27 UTC
Created attachment 71268 [details]
New crash information added by DrKonqi

kate (3.8.3) on KDE Platform 4.8.3 (4.8.3) using Qt 4.8.1

- What I was doing when the application crashed:
Same as before, cutting text in a file	
- Custom settings of the application:
Still in VI mode, maybe I should add that it was while working on a .tex file, I doubt the tex file is relevant as it happened to me in several of them.

-- Backtrace (Reduced):
#5  0x00007f2c11194d07 in QTextLine::cursorToX(int*, QTextLine::Edge) const () from /usr/lib/libQtGui.so.4
[...]
#10 0x00007f2c029ebfdd in KateViNormalMode::commandDeleteToEOL() () from /usr/lib/libkatepartinterfaces.so.4
#11 0x00007f2c029f8386 in KateViNormalMode::executeCommand(KateViCommand const*) () from /usr/lib/libkatepartinterfaces.so.4
#12 0x00007f2c029f9490 in KateViNormalMode::handleKeypress(QKeyEvent const*) () from /usr/lib/libkatepartinterfaces.so.4
#13 0x00007f2c029e11d4 in KateViInputModeManager::handleKeypress(QKeyEvent const*) () from /usr/lib/libkatepartinterfaces.so.4
Comment 5 Pascal Vanier 2012-05-21 18:23:58 UTC
I forgot to add that this is with a compiled from sources kate, maybe I can improve the bug report (as it does not seem to add information to the previous one), but I don't know how (I'm on arch, there does not seem to be a debug symbols package).
Comment 6 Pascal Vanier 2012-05-21 19:49:06 UTC
Created attachment 71269 [details]
New crash information added by DrKonqi

kate (3.8.3) on KDE Platform 4.8.3 (4.8.3) using Qt 4.8.1

- What I was doing when the application crashed:
Copy pasting, it seems it is related to copying the last line of the file. I already managed to make it crash without this condition, but it is always the case with it.

- Custom settings of the application:
Vi input mode, the source file is not relevant, tried with .tex and other files
I compiled kate from git

-- Backtrace (Reduced):
#10 0x00007f5f96d3339e in KSharedPtr<KateLineLayout>::operator-> (this=0x7fffc2812c30) at /usr/include/ksharedptr.h:126
#11 0x00007f5f96d37d26 in KateLayoutCache::textLayout (this=0x1089600, realCursor=...) at /home/yodaoryack/kde/kate/part/render/katelayoutcache.cpp:340
#12 0x00007f5f96d930d1 in KateViewInternal::makeVisible (this=0x10cc110, c=..., endCol=0, force=false, center=false, calledExternally=false) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:645
#13 0x00007f5f96d9903e in KateViewInternal::updateCursor (this=0x10cc110, newCursor=..., force=false, center=false, calledExternally=false) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:1861
#14 0x00007f5f96dbd23e in KateViModeBase::updateCursor (this=0x1329560, c=...) at /home/yodaoryack/kde/kate/part/vimode/katevimodebase.cpp:842
Comment 7 Dominik Haumann 2012-07-04 14:00:30 UTC
#9  0x00007f5fa4aa35a4 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#10 0x00007f5f96d3339e in KSharedPtr<KateLineLayout>::operator-> (this=0x7fffc2812c30) at /usr/include/ksharedptr.h:126
#11 0x00007f5f96d37d26 in KateLayoutCache::textLayout (this=0x1089600, realCursor=...) at /home/yodaoryack/kde/kate/part/render/katelayoutcache.cpp:340
#12 0x00007f5f96d930d1 in KateViewInternal::makeVisible (this=0x10cc110, c=..., endCol=0, force=false, center=false, calledExternally=false) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:645
#13 0x00007f5f96d9903e in KateViewInternal::updateCursor (this=0x10cc110, newCursor=..., force=false, center=false, calledExternally=false) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:1861
#14 0x00007f5f96dbd23e in KateViModeBase::updateCursor (this=0x1329560, c=...) at /home/yodaoryack/kde/kate/part/vimode/katevimodebase.cpp:842
#15 0x00007f5f96dc40d9 in KateViNormalMode::commandDeleteToEOL (this=0x1329560) at /home/yodaoryack/kde/kate/part/vimode/katevinormalmode.cpp:715
#16 0x00007f5f96dd70c6 in KateViCommand::execute (this=0x132f4e0) at /home/yodaoryack/kde/kate/part/vimode/katevicommand.cpp:38
#17 0x00007f5f96dc328d in KateViNormalMode::executeCommand (this=0x1329560, cmd=0x132f4e0) at /home/yodaoryack/kde/kate/part/vimode/katevinormalmode.cpp:440
#18 0x00007f5f96dc2f9a in KateViNormalMode::handleKeypress (this=0x1329560, e=0x7fffc2813f90) at /home/yodaoryack/kde/kate/part/vimode/katevinormalmode.cpp:367
#19 0x00007f5f96db3a2b in KateViInputModeManager::handleKeypress (this=0x130fa60, e=0x7fffc2813f90) at /home/yodaoryack/kde/kate/part/vimode/kateviinputmodemanager.cpp:102
#20 0x00007f5f96d9b586 in KateViewInternal::keyPressEvent (this=0x10cc110, e=0x7fffc2813f90) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:2298
#21 0x00007f5f96d9acb8 in KateViewInternal::eventFilter (this=0x10cc110, obj=0x10cc110, e=0x7fffc2813f90) at /home/yodaoryack/kde/kate/part/view/kateviewinternal.cpp:2183
Comment 8 Dominik Haumann 2012-07-04 14:34:18 UTC
Git commit 8cb708f66a75f8cbd2dd94ca07c5834105dfba68 by Dominik Haumann.
Committed on 04/07/2012 at 16:31.
Pushed by dhaumann into branch 'master'.

fix crash in vi normal mode: v G D

M  +3    -0    part/vimode/katevinormalmode.cpp

http://commits.kde.org/kate/8cb708f66a75f8cbd2dd94ca07c5834105dfba68
Comment 9 Dominik Haumann 2012-07-04 14:34:55 UTC
Git commit 59f59d9e61904385cdd880edc7697193331260a5 by Dominik Haumann.
Committed on 04/07/2012 at 16:31.
Pushed by dhaumann into branch 'KDE/4.9'.

fix crash in vi normal mode: v G D

M  +3    -0    part/vimode/katevinormalmode.cpp

http://commits.kde.org/kate/59f59d9e61904385cdd880edc7697193331260a5
Comment 10 Dominik Haumann 2012-07-05 14:02:35 UTC
Git commit e88d0d35c6e3cb40692a811f335a99cd79f0beaa by Dominik Haumann.
Committed on 04/07/2012 at 16:31.
Pushed by dhaumann into branch 'KDE/4.8'.

fix crash in vi normal mode: v G D

M  +3    -0    part/vimode/katevinormalmode.cpp

http://commits.kde.org/kate/e88d0d35c6e3cb40692a811f335a99cd79f0beaa
Comment 11 Pascal Vanier 2012-07-07 12:27:43 UTC
This is great, thank you very much!
Comment 12 Simon St James 2013-03-30 12:48:15 UTC
*** Bug 315683 has been marked as a duplicate of this bug. ***