Bug 130619 - Crash on entering doxygen comment on editing cpp files
Summary: Crash on entering doxygen comment on editing cpp files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 131078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-11 15:36 UTC by Stefan Nikolaus
Modified: 2007-08-30 10:07 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 Stefan Nikolaus 2006-07-11 15:36:27 UTC
Version:           2.5.3 (using KDE 3.5.3, compiled sources)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.16.13-4-default

Kate crashes, if I try to edit a doxygen comment.

Steps to reproduce:
1. Open a .cpp/.h file
2. Enter '/**'
3. <RETURN>

-> crash

3.5 branch, SVN 559263
Comment 1 Stefan Nikolaus 2006-07-11 15:41:50 UTC
This was fixed with one of the patches for bug 129263 or bug 129580. Apparently, the respective fixes were committed in a modified form.
Comment 2 Andreas Kling 2006-07-11 21:57:17 UTC
SVN commit 561299 by kling:

Don't pass (int)-1 to KateTextLine::stringAtPos(), it chokes on that.
This is fixed in KDE4 Kate, where all unsigned ints are made signed.

BUG: 130619


 M  +2 -1      kateautoindent.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/kateautoindent.cpp #561298:561299
@@ -568,8 +568,9 @@
       QString filler = tabString (indent);
 
       bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping;
+
       if ( doxygenAutoInsert &&
-           (!textLine->stringAtPos(first, "*/") && !textLine->stringAtPos(first, "*")))
+           ((first < 0) || (!textLine->stringAtPos(first, "*/") && !textLine->stringAtPos(first, "*"))))
       {
         filler = filler + " * ";
       }
Comment 3 Andreas Kling 2006-07-19 18:30:54 UTC
*** Bug 131078 has been marked as a duplicate of this bug. ***