Bug 131933 - crash when pressing enter inside a doxygen comment block
Summary: crash when pressing enter inside a doxygen comment block
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 132835 140674 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-06 02:22 UTC by Andreas Pakulat
Modified: 2007-08-30 10:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pakulat 2006-08-06 02:22:39 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc (GCC) 4.1.2 20060729 (prerelease) (Debian 4.1.1-10) 
OS:                Linux

Hi,

not sure wether this happened with 3.5.3 too, but katepart is crashing when pressing <return> in a doxygen (/**) comment. The backtrace is:

#0  0xb465b9ce in KateTextLine::stringAtPos (this=0x9fe72e0, pos=4294967295, match=@0xbfce4298)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/katetextline.cpp:196
#1  0xb46e2b16 in KateCSAndSIndent::handleDoxygen (this=0x90823b0, begin=@0xbfce4338)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateautoindent.cpp:1497
#2  0xb46e2e9c in KateCSAndSIndent::processNewline (this=0x90823b0, begin=@0xbfce4338)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateautoindent.cpp:1522
#3  0xb46fb6fb in KateDocument::newLine (this=0x917cc90, c=@0xbfce4380, v=0x91c8b20)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/katedocument.cpp:3001
#4  0xb47101d4 in KateViewInternal::doReturn (this=0x91c8b20)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateviewinternal.cpp:893
#5  0xb4739d93 in KateView::keyReturn (this=0x91e2e28)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateview.h:329
#6  0xb4724daa in KateViewInternal::keyPressEvent (this=0x91c8b20, e=0xbfce4b10)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateviewinternal.cpp:2507
#7  0xb470c5e8 in KateViewInternal::eventFilter (this=0x91c8b20, obj=0x91c8b20, e=0xbfce4b10)
    at /home/sid-user/kdelibs/kdelibs-3.5.4/./kate/part/kateviewinternal.cpp:2439
#8  0xb680d17a in QObject::activate_filters (this=0x91c8b20, e=0xbfce4b10)
    at kernel/qobject.cpp:903
#9  0xb680d1f8 in QObject::event (this=0x91c8b20, e=0xbfce4b10) at kernel/qobject.cpp:735
#10 0xb684448a in QWidget::event (this=0x91c8b20, e=0xbfce4b10) at kernel/qwidget.cpp:4678
#11 0xb67a5b2a in QApplication::internalNotify (this=0xbfce4ff4, receiver=0x91c8b20,
    e=0xbfce4b10) at kernel/qapplication.cpp:2635

Andreas
Comment 1 Andreas Kling 2006-08-06 10:28:39 UTC
SVN commit 570246 by kling:

Fixed another stringAtPos(-1) call (known & hated signedness issue)

BUG: 131933


 M  +1 -1      kateautoindent.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/kateautoindent.cpp #570245:570246
@@ -1494,7 +1494,7 @@
   bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
 
   // starts with *: indent one space more to line up *s
-  if ( textLine->stringAtPos(first, "*") )
+  if ( first > 0 && textLine->stringAtPos(first, "*") )
     indent = indent + " ";
   // does not start with *: insert one if user wants that
   else if ( doxygenAutoInsert )
Comment 2 Andreas Kling 2006-08-23 07:30:08 UTC
*** Bug 132835 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Haumann 2007-01-27 15:11:44 UTC
*** Bug 140674 has been marked as a duplicate of this bug. ***