Bug 181894

Summary: kate crashes when deleting text
Product: [Applications] kate Reporter: illogic-al <illogical1>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description illogic-al 2009-01-25 18:44:05 UTC
Version:            (using KDE 4.1.96)
Compiler:          gcc version 4.2.1 (Apple Inc. build 5564) 
OS:                OS X
Installed from:    Compiled From Sources

Kate crashed while editing a Portfile and using the delete button. OS X.
The backtrace mentions something about  cursor. I noticed that the default black oxygen cursor was momentarily shown (a second if not shorter) instead of the default OS X cursor sometimes while going from the editing window to the documents sidebar. 
To reproduce I open a file with some text.
delete from the end of the document
Press "delete" key once more
Press left cursor key
Here's a video that shows it much better: http://www.youtube.com/watch?v=U8qOnxjNp6w

Attaching to process 50765.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ............................................................................................................................................................................ done
0x95f90791 in __wait4 ()
[Current thread is 1 (process 50765 thread 0x20b)]

Thread 2 (process 50765 thread 0x2403):
#0  0x95f9b6f2 in select$DARWIN_EXTSN ()
#1  0x918f151f in __CFSocketManager ()
#2  0x95f7d095 in _pthread_start ()
#3  0x95f7cf52 in thread_start ()

Thread 1 (process 50765 thread 0x20b):
#0  0x95f90791 in __wait4 ()
#1  0x95f90787 in waitpid$UNIX2003 ()
#2  0x00ab11a4 in KCrash::startDirectly (argv=0xbfffb80c)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kdeui/util/kcrash.cpp:436
#3  0x00ab1f86 in KCrash::defaultCrashHandler (sig=6)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kdeui/util/kcrash.cpp:340
#4  <signal handler called>
#5  0x95fb9e42 in __kill ()
#6  0x95fb9e34 in kill$UNIX2003 ()
#7  0x9602c23a in raise ()
#8  0x96038679 in abort ()
#9  0x020a4695 in qt_message_output ()
#10 0x020a4769 in qFatal ()
#11 0x020a47f0 in qt_assert ()
#12 0x15c8b120 in CalculatingCursor::CalculatingCursor (this=0x0, vi=0x32c2800, c=@0x32c2854)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kate/view/kateviewinternal.cpp:852
#13 0x15c8b16b in WrappingCursor::WrappingCursor (this=0xbfffdd6c, vi=0x32c2800, c=@0x32c2854)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kate/view/kateviewinternal.cpp:974
#14 0x15c83459 in KateViewInternal::moveChar (this=0xbfffdd6c, bias=KateViewInternal::left, sel=false)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kate/view/kateviewinternal.cpp:1049
#15 0x15c83615 in KateViewInternal::cursorLeft (this=0x32c2800, sel=false)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kate/view/kateviewinternal.cpp:1065
#16 0x15c6461f in KateView::cursorLeft (this=0x1d1f04e0)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kate/view/kateview.cpp:2507
#17 0x15c76459 in KateView::qt_metacall (this=0x1d1f04e0, _c=QMetaObject::InvokeMetaMethod, _id=56, _a=0xbfffdf18) at kate/kateview.moc:362
#18 0x021a9280 in QMetaObject::activate ()
#19 0x00f7a46c in QAction::triggered () at signal.h:119
#20 0x00f7bfef in QAction::activate () at signal.h:119
#21 0x00f7c123 in QAction::event () at signal.h:119
#22 0x009818d4 in KAction::event (this=0x1d356540, event=0x1d3565a0)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kdeui/actions/kaction.cpp:88
#23 0x00f8147f in QApplicationPrivate::notify_helper () at kdeui/kaction.moc:99
#24 0x00f8316c in QApplication::notify () at kdeui/kaction.moc:99
#25 0x00a4cfdb in KApplication::notify (this=0xbffff684, receiver=0x1d356540, event=0xbfffe338)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kdeui/kernel/kapplication.cpp:307
#26 0x02197b61 in QCoreApplication::notifyInternal ()
#27 0x00fb0351 in QShortcutMap::dispatchEvent () at kdeui/kaction.moc:99
#28 0x00fb19d5 in QShortcutMap::tryShortcutEvent () at kdeui/kaction.moc:99
#29 0x00f8456f in QApplication::notify () at kdeui/kaction.moc:99
#30 0x00a4cfdb in KApplication::notify (this=0xbffff684, receiver=0x32c2800, event=0xbfffe700)
    at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4-devel/work/kdelibs-4.1.96/kdeui/kernel/kapplication.cpp:307
#31 0x02197b61 in QCoreApplication::notifyInternal ()
#32 0x00fd60bc in qt_sendSpontaneousEvent () at kdeui/kaction.moc:99
#33 0x00ff8e09 in QKeyMapper::sendKeyEvent () at kdeui/kaction.moc:99
#34 0x00ffa253 in QKeyMapperPrivate::translateKeyEvent () at kdeui/kaction.moc:99
#35 0x00fd9620 in QApplicationPrivate::globalEventProcessor () at kdeui/kaction.moc:99
#36 0x90d36143 in DispatchEventToHandlers ()
#37 0x90d3557d in SendEventToEventTargetInternal ()
#38 0x90d353e2 in SendEventToEventTargetWithOptions ()
#39 0x90d6432e in ToolboxEventDispatcherHandler ()
#40 0x90d364fc in DispatchEventToHandlers ()
#41 0x90d3557d in SendEventToEventTargetInternal ()
#42 0x90d51ed2 in SendEventToEventTarget ()
#43 0x00fd4d61 in qt_mac_send_event () at kdeui/kaction.moc:99
#44 0x00fe3352 in QEventDispatcherMac::processEvents () at kdeui/kaction.moc:99
#45 0x02197121 in QEventLoop::processEvents ()
#46 0x021971ed in QEventLoop::exec ()
#47 0x0219b191 in QCoreApplication::exec ()
#48 0x0001e83c in kdemain ()
#49 0x00008fa6 in start ()
Comment 1 Dario Andres 2009-01-25 18:55:48 UTC
This may be related to bug 153766
Comment 2 Dominik Haumann 2009-05-14 11:58:40 UTC
I cannot reproduce. Illogic-al, can you please test again? Do you have other ways how to reproduce? The backtrace in bug #153766 is indeed the same, but it was also closed just because it wasn't reproducible.
Comment 3 illogic-al 2009-05-17 02:00:25 UTC
I've tried this with Kwrite in 4.2.0 and I could not reproduce it. I'm compile kdesdk 4.2.3 now to see. 
When I tried with kate I also wasn't using the native mac theme (instead using the mac oxygen 'port') so I'll switch to that and try again.
Comment 4 illogic-al 2009-05-17 02:43:45 UTC
Just used kate 4.2.3 (against kdelibs 4.2.0) could not reproduce. I still had the "text cursor stops moving" and "delete stops deleting after one character" issue, but when pressing the left cursor no crash was observed. 
Seeing that the above is the case in kwrite from 4.2.0 and kate from 4.2.2, and i reported this for 4.1.96, I'd say this bug is fixed. 
One permutation I have not tested with, that changed from then to now is Qt, but seeing that 4.5 is the new hotness and technically updated, bugfix recieving version this's ok.
Comment 5 illogic-al 2009-05-17 02:44:43 UTC
I meant kate from kdesdk 4.2.3 above.
Comment 6 illogic-al 2009-05-19 21:09:11 UTC
Any chance at looking at https://bugs.kde.org/show_bug.cgi?id=170199 while I have your attention?