Bug 179225 - crash when deleting folded code
Summary: crash when deleting folded code
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-31 18:13 UTC by john russo
Modified: 2009-01-02 00:21 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 john russo 2008-12-31 18:13:36 UTC
Version:           3.1.3 (using 4.1.3 (KDE 4.1.3), Arch Linux)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27-ARCH

In Kate editing C source files. If I have a whole function folded and I try to delete it, by selecting its lines and pressing canc, Kate crashes immediatly. To avoid the crash I have to unfold the function, select its lines and then canc.
Comment 1 Dario Andres 2008-12-31 18:30:18 UTC
If you can reproduce the crash at will in a recent KDE (4.1.3 /4.2beta2 /4.2svn) , can you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports and post a complete backtrace here? Thanks :)
Comment 2 john russo 2008-12-31 20:29:37 UTC
The crash doesn't show the Crash Dialog so I used gdb. I guess I should get more debug informations. I use Arch Linux. Do I have to recompile something with '-g' ? I'll ask in Arch forums.

gdb kate                          
GNU gdb 6.8                                                                  
Copyright (C) 2008 Free Software Foundation, Inc.                            
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.           
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"   
and "show warranty" for details.                                             
This GDB was configured as "i686-pc-linux-gnu"...                            
(no debugging symbols found)                                                 
(gdb) run                                                                    
Starting program: /usr/bin/kate                                              
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
(no debugging symbols found)                                                 
[Thread debugging using libthread_db enabled]                                
[New Thread 0xb5f5a920 (LWP 8949)]                                           

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5f5a920 (LWP 8949)]         
0xb6820880 in QString::operator= () from /usr/lib/libQtCore.so.4
(gdb) thread apply all backtrace                                

Thread 1 (Thread 0xb5f5a920 (LWP 8949)):
#0  0xb6820880 in QString::operator= () from /usr/lib/libQtCore.so.4
#1  0xb6c52192 in QTextLayout::setText () from /usr/lib/libQtGui.so.4
#2  0xb46dcb17 in KateRenderer::layoutLine () from /usr/lib/kde4/katepart.so
#3  0xb46e20aa in KateLayoutCache::line () from /usr/lib/kde4/katepart.so   
#4  0xb46e2f68 in KateLayoutCache::updateViewCache () from /usr/lib/kde4/katepart.so
#5  0xb4731237 in KateViewInternal::doUpdateView () from /usr/lib/kde4/katepart.so  
#6  0xb4731ae5 in KateViewInternal::updateView () from /usr/lib/kde4/katepart.so    
#7  0xb47323ff in KateViewInternal::scrollPos () from /usr/lib/kde4/katepart.so     
#8  0xb47327b5 in KateViewInternal::slotRegionVisibilityChangedAt () from /usr/lib/kde4/katepart.so
#9  0xb473838a in KateViewInternal::qt_metacall () from /usr/lib/kde4/katepart.so                  
#10 0xb68cd82b in QMetaObject::activate () from /usr/lib/libQtCore.so.4                            
#11 0xb68cdd82 in QMetaObject::activate () from /usr/lib/libQtCore.so.4                            
#12 0xb4711113 in KateCodeFoldingTree::regionVisibilityChangedAt () from /usr/lib/kde4/katepart.so 
#13 0xb47125a4 in KateCodeFoldingTree::toggleRegionVisibility () from /usr/lib/kde4/katepart.so
#14 0xb4712a22 in KateCodeFoldingTree::removeOpening () from /usr/lib/kde4/katepart.so
#15 0xb4713166 in KateCodeFoldingTree::cleanupUnneededNodes () from /usr/lib/kde4/katepart.so
#16 0xb47141b2 in KateCodeFoldingTree::updateLine () from /usr/lib/kde4/katepart.so
#17 0xb46c442b in KateBuffer::doHighlight () from /usr/lib/kde4/katepart.so
#18 0xb46c50b0 in KateBuffer::line () from /usr/lib/kde4/katepart.so
#19 0xb4712366 in KateCodeFoldingTree::toggleRegionVisibility () from /usr/lib/kde4/katepart.so
#20 0xb4712a22 in KateCodeFoldingTree::removeOpening () from /usr/lib/kde4/katepart.so
#21 0xb4713166 in KateCodeFoldingTree::cleanupUnneededNodes () from /usr/lib/kde4/katepart.so
#22 0xb4714755 in KateCodeFoldingTree::lineHasBeenRemoved () from /usr/lib/kde4/katepart.so
#23 0xb46c221a in KateBuffer::removeLine () from /usr/lib/kde4/katepart.so
#24 0xb46b452a in KateDocument::editRemoveLine () from /usr/lib/kde4/katepart.so
#25 0xb46b6e04 in KateDocument::removeText () from /usr/lib/kde4/katepart.so
#26 0xb471b592 in KateView::removeSelectedText () from /usr/lib/kde4/katepart.so
#27 0xb46a9a23 in KateDocument::del () from /usr/lib/kde4/katepart.so
#28 0xb472a43e in KateViewInternal::doDelete () from /usr/lib/kde4/katepart.so
#29 0xb471f712 in KateView::qt_metacall () from /usr/lib/kde4/katepart.so
#30 0xb68cd82b in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#31 0xb68cdb00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#32 0xb6a6f4e1 in QAction::triggered () from /usr/lib/libQtGui.so.4
#33 0xb6a6fe57 in QAction::activate () from /usr/lib/libQtGui.so.4
#34 0xb6a728bb in QAction::event () from /usr/lib/libQtGui.so.4
#35 0xb6ac97b3 in QWidgetAction::event () from /usr/lib/libQtGui.so.4
#36 0xb6a74b1c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#37 0xb6a7af1e in QApplication::notify () from /usr/lib/libQtGui.so.4
#38 0xb760b15d in KApplication::notify () from /usr/lib/libkdeui.so.5
#39 0xb68bbfd1 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#40 0xb6aa8ad2 in ?? () from /usr/lib/libQtGui.so.4
#41 0xbfae286c in ?? ()
#42 0x09ed1ba0 in ?? ()
#43 0xbfae19e4 in ?? ()
#44 0x00000000 in ?? ()
(gdb)
Comment 3 Dario Andres 2009-01-01 19:24:26 UTC
The reporter sent me a new backtrace:

Application: Kate (kate), signal SIGSEGV

(no debugging symbols found)

(no debugging symbols found)

[Thread debugging using libthread_db enabled]

[New Thread 0xb5dfc920 (LWP 3110)]

[KCrash handler]

#6 0xb45baa09 in QVector<KateCodeFoldingNode*>::size (this=0x9ce0ae0)

at /usr/include/QtCore/qvector.h:111

#7 0xb45b9b02 in KateCodeFoldingTree::removeOpening (this=0x97ce5cc,

node=0x9c46f40, line=1392)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/syntax/katecodefolding.cpp:551

#8 0xb45b9dee in KateCodeFoldingTree::cleanupUnneededNodes (this=0x97ce5cc,

line=1392)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/syntax/katecodefolding.cpp:1303

#9 0xb45b9fa4 in KateCodeFoldingTree::lineHasBeenRemoved (this=0x97ce5cc,

line=1392)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/syntax/katecodefolding.cpp:1053

#10 0xb45699c5 in KateBuffer::removeLine (this=0x97ce5a0, i=1392)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/document/katebuffer.cpp:647

#11 0xb455af67 in KateDocument::editRemoveLine (this=0x97b46d0, line=1392,

editSource=Kate::NoEditSource)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/document/katedocument.cpp:1592

#12 0xb455c7a4 in KateDocument::removeText (this=0x97b46d0,

_range=@0xbfe3e4ac, block=false)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/document/katedocument.cpp:861

#13 0xb45c1daa in KateView::removeSelectedText (this=0x97e53b0)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/view/kateview.cpp:1505

#14 0xb454b443 in KateDocument::del (this=0x97b46d0, view=0x97e53b0,

c=@0x9906ef4)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/document/katedocument.cpp:4224

#15 0xb45d26ae in KateViewInternal::doDelete (this=0x9906ea0)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:748

#16 0xb45be2e3 in KateView::keyDelete (this=0x97e53b0)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kate/view/kateview.cpp:2222

#17 0xb45cd0b8 in KateView::qt_metacall (this=0x97e53b0,

_c=QMetaObject::InvokeMetaMethod, _id=45, _a=0xbfe3e65c)

at /home/john/abs/kdelibs/src/build/kate/kateview.moc:331

#18 0xb676f82b in QMetaObject::activate () from /usr/lib/libQtCore.so.4

#19 0xb676fb00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4

#20 0xb69114e1 in QAction::triggered () from /usr/lib/libQtGui.so.4

#21 0xb6911e57 in QAction::activate () from /usr/lib/libQtGui.so.4

#22 0xb69148bb in QAction::event () from /usr/lib/libQtGui.so.4

#23 0xb696b7b3 in QWidgetAction::event () from /usr/lib/libQtGui.so.4

#24 0xb6916b1c in QApplicationPrivate::notify_helper ()

from /usr/lib/libQtGui.so.4

#25 0xb691cf1e in QApplication::notify () from /usr/lib/libQtGui.so.4

#26 0xb749c5f3 in KApplication::notify (this=0xbfe3f8bc, receiver=0x9971e78,

event=0xbfe3ea34)

at /home/john/abs/kdelibs/src/kdelibs-4.1.3/kdeui/kernel/kapplication.cpp:311

#27 0xb675dfd1 in QCoreApplication::notifyInternal ()

from /usr/lib/libQtCore.so.4

#28 0xb694aad2 in ?? () from /usr/lib/libQtGui.so.4

#29 0xbfe3f8bc in ?? ()

#30 0x09971e78 in ?? ()

#31 0xbfe3ea34 in ?? ()

#32 0x00000000 in ?? ()

#0 0xb7f22424 in __kernel_vsyscall ()
Comment 4 Dario Andres 2009-01-01 19:28:10 UTC
This may be related/duplicate of bug 177790
Comment 5 Joseph Wenninger 2009-01-02 00:21:59 UTC
Fixed in r904337. Deletion of folded and nested folded regions works now. If this bug reoccurs reopen.

There are some existing issues with updates of folding regions, which don't have bugreports I'll try to fix them during the next days or at least for 4.3