Bug 112071 - Reformatting source crashes kdevelop
Summary: Reformatting source crashes kdevelop
Status: RESOLVED DUPLICATE of bug 127928
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (show other bugs)
Version: 3.2.91
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 117266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-05 12:51 UTC by Gunther Piez
Modified: 2006-07-16 13:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File which crashes kdevelop if auto-reformatted. (860.63 KB, text/plain)
2005-10-02 21:49 UTC, Gunther Piez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunther Piez 2005-09-05 12:51:44 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Gentoo Packages

While editing a long (>11000 lines) c++ source file, I was hitting "reformat source". Kdevelop crashed, all changes made to the source file were lost (annoying).
This happened using kdevelop 3.2.90.
The problem can be repeated easily. If you need the source (~1 MB), tell me.

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 46912522611552 (LWP 4647)]
[New Thread 1082132832 (LWP 4649)]
[KCrash handler]
#3  KateBufBlock::line (this=0x2f6e980, i=9678) at ksharedptr.h:120
#4  0x00002aaab49b2a86 in KateDocument::textLine (this=0x2d223c0, line=9678)
    at katebuffer.h:129
#5  0x00002aaab49a6be0 in KateDocument::editRemoveLine (this=0x29b5170, 
    line=9678) at katedocument.cpp:1612
#6  0x00002aaab49b242f in KateDocument::removeText (this=0x29b5170, 
    startLine=0, startCol=0, endLine=11488, endCol=0, blockwise=184)
    at katedocument.cpp:911
#7  0x00002aaab49b29cc in KateDocument::removeText (this=0x2d223c0, 
    startLine=47326144, startCol=47326144, endLine=15943296, endCol=49744239)
    at katedocument.cpp:863
#8  0x00002aaab49a1a1d in KateDocument::clear (this=0x29b5170)
    at katedocument.h:661
#9  0x00002aaab49b352b in KateDocument::setText (this=0x29b5170, 
    s=@0x7ffffff03380) at katedocument.cpp:758
#10 0x00002aaaafca1bf4 in AStylePart::beautifySource (this=0x1598d00)
    at astyle_part.cpp:101
#11 0x00002aaaafca1ceb in AStylePart::qt_invoke (this=0x1598d00, _id=3, 
    _o=0x7ffffff03470) at astyle_part.moc:93
#12 0x00002aaaabaf1479 in QObject::activate_signal (this=0x2aaaafdbf470, 
    clist=0x158d320, o=0x7ffffff03470) at qconnection.h:54
#13 0x00002aaaabaf1bf4 in QObject::activate_signal (this=0x2d223c0, 
    signal=47326144) at qobject.cpp:2324
#14 0x00000030059c72a0 in KAction::qt_invoke (this=0x15189b0, _id=12, 
    _o=0x7ffffff03530) at kaction.moc:212
#15 0x00002aaaabaf1479 in QObject::activate_signal (this=0x3005c7f830, 
    clist=0x1522f20, o=0x7ffffff03530) at qconnection.h:54
#16 0x00002aaaabaf1bf4 in QObject::activate_signal (this=0x2d223c0, 
    signal=47326144) at qobject.cpp:2324
#17 0x0000003005379a8d in KAccelPrivate::eventFilter (this=0x1557210, 
    pEvent=0x7ffffff03a50) at kaccel.cpp:353
#18 0x00002aaaabaee757 in QObject::activate_filters (this=0x76c520, 
    e=0x7ffffff03a50) at qobject.cpp:902
#19 0x00002aaaabaee83e in QObject::event (this=0x76c520, e=0x7ffffff03a50)
    at qobject.cpp:735
#20 0x00002aaaabb23ae3 in QWidget::event (this=0x76c520, e=0x7ffffff03a50)
    at qwidget.cpp:4658
#21 0x00002aaaabbd10a5 in QMainWindow::event (this=0x76c520, e=0x7ffffff03a50)
    at qmainwindow.cpp:1686
#22 0x00002aaaaba960dd in QApplication::internalNotify (this=0x2d223c0, 
    receiver=0x76c520, e=0x7ffffff03a50) at qapplication.cpp:2635
#23 0x00002aaaaba96712 in QApplication::notify (this=0x7ffffff04090, 
    receiver=0x29c4350, e=0x7ffffff03a50) at qapplication.cpp:2392
#24 0x00000030052f4f2a in KApplication::notify (this=0x7ffffff04090, 
    receiver=0x29c4350, event=0x7ffffff03a50) at kapplication.cpp:549
#25 0x0000003005377c0f in KAccelEventHandler::x11Event (this=0x2d223c0, 
    pEvent=0x30055a51b8) at qapplication.h:491
#26 0x00000030052f7cfe in KApplication::x11EventFilter (this=0x7ffffff04090, 
    _event=0x7ffffff03e30) at kapplication.cpp:1669
#27 0x00002aaaaba367a7 in QApplication::x11ProcessEvent (this=0x7ffffff04090, 
    event=0x7ffffff03e30) at qapplication_x11.cpp:386
#28 0x00002aaaaba48eab in QEventLoop::processEvents (this=0x6cc040, flags=4)
    at qeventloop_x11.cpp:192
#29 0x00002aaaabaaa696 in QEventLoop::enterLoop (this=0x6cc040)
    at qeventloop.cpp:198
#30 0x00002aaaabaaa5f5 in QEventLoop::exec (this=0x6cc040)
    at qeventloop.cpp:145
#31 0x0000000000407728 in main (argc=-1032304, argv=0x7ffffff03fa0)
    at main.cpp:145
Comment 1 Amilcar do Carmo Lucas 2005-09-12 11:24:53 UTC
This is probably a kate bug
Comment 2 Christoph Cullmann 2005-10-02 20:31:20 UTC
without any file to reproduce, no chance, perhaps already fixed, perhaps still there hidden in the dark
Comment 3 Gunther Piez 2005-10-02 21:49:21 UTC
Created attachment 12812 [details]
File which crashes kdevelop if auto-reformatted.
Comment 4 Gunther Piez 2005-10-02 21:51:18 UTC
A file to reproduce, a chance, not fixed in 3.2.91 using kde 3.4.91, not hidden in the dark
Comment 5 Christoph Cullmann 2005-10-03 11:26:07 UTC
k, thx for the file :)
Now my remaining problems are: the KDE 3.4 version of KDevelop I have from KUbuntu has no such button, as the whole indentation stuff is missing and my 3.5 branch doesn't compile, as I have other berkley libs around, back to KDevelop, if they can give me more feedback, will look again.
Comment 6 Jens Dagerbo 2005-10-07 14:27:17 UTC
KDevelop just calls KTextEditor::EditInterface::setText(). 
See http://websvn.kde.org/tags/KDE/3.4.2/kdevelop/parts/astyle/astyle_part.cpp?rev=436917&view=markup,   AStylePart::beautifySource().

I guess it is conceivable that the astyle manipulation of the string corrupts it and katepart is fed broken input, but I can't test it at the moment.
Comment 7 Andreas Kling 2006-07-16 13:41:41 UTC
This is indeed a katepart bug, and it has been fixed in revision 554150.

*** This bug has been marked as a duplicate of 127928 ***
Comment 8 Andreas Kling 2006-07-16 13:51:58 UTC
*** Bug 117266 has been marked as a duplicate of this bug. ***