Bug 192107 - KWrite crashes when i set encoding to UTF8.
Summary: KWrite crashes when i set encoding to UTF8.
Status: RESOLVED DUPLICATE of bug 178789
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-09 11:20 UTC by Martin Poviser
Modified: 2009-05-15 01:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
problematic file (706 bytes, application/octet-stream)
2009-05-13 21:48 UTC, Martin Poviser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Poviser 2009-05-09 11:20:57 UTC
Version:            (using KDE 4.2.2)
Compiler:          gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2) 
OS:                Linux
Installed from:    Gentoo Packages

When i open text file (.php) and set encoding to UTF8, Kwrite crashes.
When i do this with other file types then it works normaly.

Here is backtrace:

Application: KWrite (kwrite), signal SIGSEGV

Thread 1 (Thread 0xb63ba700 (LWP 1029)):
#0  0xb7fa5424 in __kernel_vsyscall ()
#1  0xb6a66430 in nanosleep () from /lib/libc.so.6
#2  0xb6a6627b in sleep () from /lib/libc.so.6
#3  0xb7a52d84 in ?? () from /usr/kde/4.2/lib/libkdeui.so.5
#4  0x00000001 in ?? ()
#5  0x00000000 in ?? ()

(Sorry for my english, I'm beginner)
Comment 1 Dario Andres 2009-05-09 14:32:57 UTC
Does this happen with every PHP file? Have you tried with some random PHP ones?
If this only happens with that file, can you attach it here? It could be useful for other people to test it.
Thanks
Comment 2 Martin Poviser 2009-05-11 14:36:12 UTC
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
<?php
if(isset($title))
        echo $title.' - Restaurace U petrĹŻ';
else
        echo 'Restaurace U petrĹŻ';
?>
</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="all">
<img id="header" src="img/hlavicka.gif">
<div id="menu">
<a id="first" href="f">Fotogalerie</a>
<a href="ff">Menu</a>
<a href="fff">Jidelak</a>
</div>
<div id="content">
<h1>
<?php
if(isset($title))
        echo $title;
else echo 'Restaurace U petrĹŻ';
?>
</h1>
<?php echo $content ?>
</div>
</div>
<p id="footer">2009 .:[povik]:.</p>
</body>
</html>
Comment 3 Dario Andres 2009-05-12 16:38:56 UTC
Can you please attach the file instead of pasting the contents? It seems it got broken when pasting it.
You can use this link: https://bugs.kde.org/attachment.cgi?bugid=192107&action=enter
Thanks
Comment 4 Martin Poviser 2009-05-13 21:48:20 UTC
Created attachment 33642 [details]
problematic file
Comment 5 Dario Andres 2009-05-15 01:07:31 UTC
Here using:

Qt: 4.5.1 (qt-copy  958974)
KDE: 4.2.85 (KDE 4.2.85 (KDE 4.3 Beta1))
kdelibs svn rev. 967040 / kdebase svn rev. 967041
on ArchLinux i686 - Kernel 2.6.29.2


Opening the testcase file with KWrite and setting the encoding to UTF-8 crashed the application.

Backtrace:

Application: KWrite (kwrite), signal: Segmentation fault
[KCrash Handler]
#6  0xb45be544 in KateFileLoader::open (this=0xbfbd54dc) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katebuffer.cpp:180
#7  0xb45b96bd in KateBuffer::openFile (this=0x9dba478, m_file=@0xbfbd5798) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katebuffer.cpp:529
#8  0xb45a00f6 in KateDocument::openFile (this=0x9ec7748) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:3139
#9  0xb7f4e7f9 in KParts::ReadOnlyPart::openUrl (this=0x9ec7748, url=@0xbfbd593c) at /home/kde-devel/kde/src/KDE/kdelibs/kparts/part.cpp:557
#10 0xb4596fae in KateDocument::documentReload (this=0x9ec7748) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:5043
#11 0xb461ce9a in KateView::reloadFile (this=0x9f6d500) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1028
#12 0xb4649207 in KateViewEncodingAction::setProberTypeForEncodingAutoDetection (this=0xa0a94c8, proberType=KEncodingProber::Universal)
    at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewhelpers.cpp:1701
#13 0xb4652a6f in KateViewEncodingAction::qt_metacall (this=0xa0a94c8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfbd5b48) at /home/kde-devel/kde/build/KDE/kdelibs/kate/kateviewhelpers.moc:232
#14 0xb6a47b3b in QMetaObject::activate (sender=0xa0a94c8, from_signal_index=32, to_signal_index=32, argv=0xbfbd5b48) at kernel/qobject.cpp:3117
#15 0xb6a48f07 in QMetaObject::activate (sender=0xa0a94c8, m=0xb4721024, local_signal_index=2, argv=0xbfbd5b48) at kernel/qobject.cpp:3194
#16 0xb46484c3 in KateViewEncodingAction::triggered (this=0xa0a94c8, _t1=KEncodingProber::Universal) at /home/kde-devel/kde/build/KDE/kdelibs/kate/kateviewhelpers.moc:287
#17 0xb785bb02 in KSelectAction::qt_metacall (this=0xa0a94c8, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfbd5cdc) at /home/kde-devel/kde/build/KDE/kdelibs/kdeui/kselectaction.moc:109
#18 0xb465297a in KateViewEncodingAction::qt_metacall (this=0xa0a94c8, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfbd5cdc) at /home/kde-devel/kde/build/KDE/kdelibs/kate/kateviewhelpers.moc:221
#19 0xb6a47b3b in QMetaObject::activate (sender=0x9ca60d8, from_signal_index=4, to_signal_index=4, argv=0xbfbd5cdc) at kernel/qobject.cpp:3117
#20 0xb6a48f07 in QMetaObject::activate (sender=0x9ca60d8, m=0xb7426544, local_signal_index=0, argv=0xbfbd5cdc) at kernel/qobject.cpp:3194
#21 0xb6c56f66 in QActionGroup::triggered (this=0x9ca60d8, _t1=0xa0d4c68) at .moc/debug-shared/moc_qactiongroup.cpp:140
#22 0xb6c578e1 in QActionGroupPrivate::_q_actionTriggered (this=0xa0b4968) at kernel/qactiongroup.cpp:87
#23 0xb6c57b5e in QActionGroup::qt_metacall (this=0x9ca60d8, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfbd5e4c) at .moc/debug-shared/moc_qactiongroup.cpp:95
#24 0xb6a47b3b in QMetaObject::activate (sender=0xa0d4c68, from_signal_index=5, to_signal_index=6, argv=0xbfbd5e4c) at kernel/qobject.cpp:3117
#25 0xb6a47d68 in QMetaObject::activate (sender=0xa0d4c68, m=0xb74264c8, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfbd5e4c) at kernel/qobject.cpp:3214
#26 0xb6c50f8a in QAction::triggered (this=0xa0d4c68, _t1=true) at .moc/debug-shared/moc_qaction.cpp:236
#27 0xb6c52c98 in QAction::activate (this=0xa0d4c68, event=QAction::Trigger) at kernel/qaction.cpp:1160
#28 0xb785a73c in KSelectAction::actionTriggered (this=0xa0d4c68, action=0xa0d6598) at /home/kde-devel/kde/src/qt-copy/include/QtGui/../../src/gui/kernel/qaction.h:203
#29 0xb785bb02 in KSelectAction::qt_metacall (this=0xa0d4c68, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfbd600c) at /home/kde-devel/kde/build/KDE/kdelibs/kdeui/kselectaction.moc:109
#30 0xb6a47b3b in QMetaObject::activate (sender=0xa0070b0, from_signal_index=4, to_signal_index=4, argv=0xbfbd600c) at kernel/qobject.cpp:3117
#31 0xb6a48f07 in QMetaObject::activate (sender=0xa0070b0, m=0xb7426544, local_signal_index=0, argv=0xbfbd600c) at kernel/qobject.cpp:3194
#32 0xb6c56f66 in QActionGroup::triggered (this=0xa0070b0, _t1=0xa0d6598) at .moc/debug-shared/moc_qactiongroup.cpp:140
#33 0xb6c578e1 in QActionGroupPrivate::_q_actionTriggered (this=0xa0d53c0) at kernel/qactiongroup.cpp:87
#34 0xb6c57b5e in QActionGroup::qt_metacall (this=0xa0070b0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfbd617c) at .moc/debug-shared/moc_qactiongroup.cpp:95
#35 0xb6a47b3b in QMetaObject::activate (sender=0xa0d6598, from_signal_index=5, to_signal_index=6, argv=0xbfbd617c) at kernel/qobject.cpp:3117
#36 0xb6a47d68 in QMetaObject::activate (sender=0xa0d6598, m=0xb74264c8, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfbd617c) at kernel/qobject.cpp:3214
#37 0xb6c50f8a in QAction::triggered (this=0xa0d6598, _t1=true) at .moc/debug-shared/moc_qaction.cpp:236
#38 0xb6c52c98 in QAction::activate (this=0xa0d6598, event=QAction::Trigger) at kernel/qaction.cpp:1160
#39 0xb7115cc6 in QMenuPrivate::activateCausedStack (this=0xa0d5538, causedStack=@0xbfbd6230, action=0xa0d6598, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:967
#40 0xb711a49c in QMenuPrivate::activateAction (this=0xa0d5538, action=0xa0d6598, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1060
#41 0xb711c1c3 in QMenu::mouseReleaseEvent (this=0xa0d5518, e=0xbfbd69f4) at widgets/qmenu.cpp:2254
#42 0xb7a1e555 in KMenu::mouseReleaseEvent (this=0xa0d5518, e=0xbfbd69f4) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/widgets/kmenu.cpp:456
#43 0xb6cba184 in QWidget::event (this=0xa0d5518, event=0xbfbd69f4) at kernel/qwidget.cpp:7521
#44 0xb711b56d in QMenu::event (this=0xa0d5518, e=0xbfbd69f4) at widgets/qmenu.cpp:2353
#45 0xb6c591d5 in QApplicationPrivate::notify_helper (this=0x9aa7300, receiver=0xa0d5518, e=0xbfbd69f4) at kernel/qapplication.cpp:4057
#46 0xb6c59f58 in QApplication::notify (this=0xbfbd83c0, receiver=0xa0d5518, e=0xbfbd69f4) at kernel/qapplication.cpp:3759
#47 0xb793324a in KApplication::notify (this=0xbfbd83c0, receiver=0xa0d5518, event=0xbfbd69f4) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#48 0xb6a316cb in QCoreApplication::notifyInternal (this=0xbfbd83c0, receiver=0xa0d5518, event=0xbfbd69f4) at kernel/qcoreapplication.cpp:606
#49 0xb6c64e97 in QCoreApplication::sendSpontaneousEvent (receiver=0xa0d5518, event=0xbfbd69f4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#50 0xb6c5df42 in QApplicationPrivate::sendMouseEvent (receiver=0xa0d5518, event=0xbfbd69f4, alienWidget=0x0, nativeWidget=0xa0d5518, buttonDown=0xb74462a0, lastMouseReceiver=@0xb74462a4)
    at kernel/qapplication.cpp:2925
#51 0xb6cdb1ce in QETWidget::translateMouseEvent (this=0xa0d5518, event=0xbfbd8070) at kernel/qapplication_x11.cpp:4382
#52 0xb6cdc593 in QApplication::x11ProcessEvent (this=0xbfbd83c0, event=0xbfbd8070) at kernel/qapplication_x11.cpp:3444
#53 0xb6d075bd in x11EventSourceDispatch (s=0x9aaa500, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#54 0xb62cc718 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#55 0xb62cfc7b in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#56 0xb62cfdf8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#57 0xb6a6041e in QEventDispatcherGlib::processEvents (this=0x9aa72e0, flags={i = -1078099400}) at kernel/qeventdispatcher_glib.cpp:324
#58 0xb6d06dd8 in QGuiEventDispatcherGlib::processEvents (this=0x9aa72e0, flags={i = -1078099352}) at kernel/qguieventdispatcher_glib.cpp:202
#59 0xb6a2e6b0 in QEventLoop::processEvents (this=0xbfbd82f0, flags={i = -1078099280}) at kernel/qeventloop.cpp:149
#60 0xb6a2e90a in QEventLoop::exec (this=0xbfbd82f0, flags={i = -1078099208}) at kernel/qeventloop.cpp:196
#61 0xb6a31ea3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#62 0xb6c58eee in QApplication::exec () at kernel/qapplication.cpp:3526
#63 0xb7fb6a20 in kdemain (argc=2, argv=0xbfbd87b4) at /home/kde-devel/kde/src/KDE/kdebase/apps/kwrite/kwritemain.cpp:779
#64 0x080486d2 in main (argc=0, argv=0x0) at /home/kde-devel/kde/build/KDE/kdebase/apps/kwrite/kwrite_dummy.cpp:3
Comment 6 Dario Andres 2009-05-15 01:10:08 UTC
Marking as duplicate of bug 178789 as it is the same backtrace.
Thanks for the testcase

*** This bug has been marked as a duplicate of bug 178789 ***