Bug 204169 - Crash when opening broken UTF-8 file (QWidget::setParent, ..., View, KateView, KateDocument::createView)
Summary: Crash when opening broken UTF-8 file (QWidget::setParent, ..., View, KateView...
Status: RESOLVED DUPLICATE of bug 204383
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 212965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-17 13:53 UTC by Jens Bäckman
Modified: 2009-11-04 02:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File that crashes KDevelop (35 bytes, text/x-c++src)
2009-09-14 10:10 UTC, Jens Bäckman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Bäckman 2009-08-17 13:53:49 UTC
Application that crashed: kdevelop
Version of the application: 3.9.94 (using KDevPlatform 0.9.94)
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.30-ARCH i686

What I was doing when the application crashed:
Kdevelop4 (trunk) crashed after I opened a file with broken UTF-8 encoding. The message box with the information popped up, and the crash happened when I pressed OK.

Steps to reproduce:
1) Create a file with broken UTF-8 encoding in some application
2) Open it in KDevelop

 -- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 0 (LWP 23607)]

Thread 8 (Thread 0xb18cdb70 (LWP 23608)):
#0  0xb7f8a424 in __kernel_vsyscall ()
#1  0xb6c43ef2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6cc7fcf in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb5adbd85 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x88607b0) at /home/chainsaw/src/kdevelop/kdevplatform/language/duchain/duchain.cpp:280
#4  0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#6  0xb60a6e2e in clone () from /lib/libc.so.6

Thread 7 (Thread 0xadf3cb70 (LWP 23617)):
#0  0xb7f8a424 in __kernel_vsyscall ()
#1  0xb6c43ef2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6cc7fcf in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb6cbd81e in ?? () from /usr/lib/libQtCore.so.4
#4  0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#6  0xb60a6e2e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xac2a1b70 (LWP 23705)):
#0  0xb6de0866 in ?? () from /usr/lib/libQtCore.so.4
#1  0xb51eac60 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0xb51eb001 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#3  0xb51eb513 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb6de06e7 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#5  0xb6db4559 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#6  0xb6db49aa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#7  0xb6cc3dc3 in QThread::exec () from /usr/lib/libQtCore.so.4
#8  0xb5bdec90 in KDevelop::CompletionWorkerThread::run (this=0x93350c8) at /home/chainsaw/src/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:79
#9  0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#10 0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#11 0xb60a6e2e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xabaa0b70 (LWP 23706)):
#0  0xb5266e16 in clock_gettime () from /lib/librt.so.1
#1  0xb6de2273 in ?? () from /usr/lib/libQtCore.so.4
#2  0xb6de2461 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb6de383c in ?? () from /usr/lib/libQtCore.so.4
#4  0xb6de0890 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb51eac60 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#6  0xb51eb001 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#7  0xb51eb513 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#8  0xb6de06e7 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#9  0xb6db4559 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#10 0xb6db49aa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#11 0xb6cc3dc3 in QThread::exec () from /usr/lib/libQtCore.so.4
#12 0xb5bdec90 in KDevelop::CompletionWorkerThread::run (this=0x9336f10) at /home/chainsaw/src/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:79
#13 0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#14 0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#15 0xb60a6e2e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xab29fb70 (LWP 23709)):
#0  0xb7f8a424 in __kernel_vsyscall ()
#1  0xb6c43ef2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6cc6a31 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb6cc6b73 in QThread::msleep () from /usr/lib/libQtCore.so.4
#4  0xacd5e30b in UIBlockTester::UIBlockTesterThread::run (this=0x92ef2e8) at /home/chainsaw/src/kdevelop/kdevelop/languages/cpp/cpplanguagesupport.cpp:661
#5  0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#6  0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#7  0xb60a6e2e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xaaa9eb70 (LWP 23710)):
#0  0xb7f8a424 in __kernel_vsyscall ()
#1  0xb6c43bc5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6cc8047 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb7870b00 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x86f2ce8, th=0x90400e0)
    at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0xb787316c in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x86f2d58, th=0x90400e0) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WorkingHardState.cpp:80
#5  0xb786f1bb in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x86f2ce8, th=0x90400e0) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:356
#6  0xb7873262 in ThreadWeaver::WorkingHardState::applyForWork (this=0x86f2d58, th=0x90400e0) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WorkingHardState.cpp:71
#7  0xb7870d83 in ThreadWeaver::WeaverImpl::applyForWork (this=0x86f2ce8, th=0x90400e0, previous=0x97f0d78)
    at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:351
#8  0xb787138e in ThreadWeaver::ThreadRunHelper::run (this=0xaaa9e2f4, parent=0x86f2ce8, th=0x90400e0) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/Thread.cpp:87
#9  0xb78719ab in ThreadWeaver::Thread::run (this=0x90400e0) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/Thread.cpp:142
#10 0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#12 0xb60a6e2e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xaa29db70 (LWP 23711)):
#0  0xb7f8a424 in __kernel_vsyscall ()
#1  0xb6c43bc5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb6cc8047 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#3  0xb7870b00 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x86f2ce8, th=0x9330f98)
    at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:365
#4  0xb787316c in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x86f2d58, th=0x9330f98) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WorkingHardState.cpp:80
#5  0xb786f1bb in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x86f2ce8, th=0x9330f98) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:356
#6  0xb7873262 in ThreadWeaver::WorkingHardState::applyForWork (this=0x86f2d58, th=0x9330f98) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WorkingHardState.cpp:71
#7  0xb7870d83 in ThreadWeaver::WeaverImpl::applyForWork (this=0x86f2ce8, th=0x9330f98, previous=0xa0ff438)
    at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/WeaverImpl.cpp:351
#8  0xb787138e in ThreadWeaver::ThreadRunHelper::run (this=0xaa29d2f4, parent=0x86f2ce8, th=0x9330f98) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/Thread.cpp:87
#9  0xb78719ab in ThreadWeaver::Thread::run (this=0x9330f98) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/threadweaver/Weaver/Thread.cpp:142
#10 0xb6cc7032 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6c3f68c in start_thread () from /lib/libpthread.so.0
#12 0xb60a6e2e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb4e63930 (LWP 23607)):
[KCrash Handler]
#6  0xb63cd870 in QWidget::setParent () from /usr/lib/libQtGui.so.4
#7  0xb63cdc60 in QWidgetPrivate::init () from /usr/lib/libQtGui.so.4
#8  0xb63d40be in QWidget::QWidget () from /usr/lib/libQtGui.so.4
#9  0xb7893c57 in View (this=0x9573468, parent=0x8c72c08) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/interfaces/ktexteditor/ktexteditor.cpp:262
#10 0xa910d4d9 in KateView (this=0x9573468, doc=0xa927a428, parent=0x8c72c08) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/kate/view/kateview.cpp:125
#11 0xa90670fe in KateDocument::createView (this=0xa927a428, parent=0x8c72c08) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/kate/document/katedocument.cpp:339
#12 0xb7c73fa6 in KDevelop::TextDocument::createViewWidget (this=0xa921a8b8, parent=0x8c72c08) at /home/chainsaw/src/kdevelop/kdevplatform/shell/textdocument.cpp:268
#13 0xb7c7356e in KDevelop::TextView::createWidget (this=0x99e7048, parent=0x8c72c08) at /home/chainsaw/src/kdevelop/kdevplatform/shell/textdocument.cpp:504
#14 0xb5a1d677 in Sublime::View::widget (this=0x99e7048, parent=0x8c72c08) at /home/chainsaw/src/kdevelop/kdevplatform/sublime/view.cpp:82
#15 0xb5a18832 in Sublime::MainWindowPrivate::ViewCreator::operator() (this=0xbfeb12bc, index=0x86d7528) at /home/chainsaw/src/kdevelop/kdevplatform/sublime/mainwindow_p.cpp:241
#16 0xb5a1c3f9 in Sublime::Area::walkViewsInternal<Sublime::MainWindowPrivate::ViewCreator> (this=0x86d6f48, op=@0xbfeb12bc, index=0x86d7528)
    at /home/chainsaw/src/kdevelop/kdevplatform/sublime/areawalkers.h:32
#17 0xb5a190d0 in Sublime::MainWindowPrivate::viewAdded (this=0x86b15b0, index=0x86d7528, view=0x99e7048) at /home/chainsaw/src/kdevelop/kdevplatform/sublime/areawalkers.h:48
#18 0xb5a0f9a3 in Sublime::MainWindow::qt_metacall (this=0x86aec38, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0xbfeb1424)
    at /home/chainsaw/src/kdevelop/kdevplatform/build/sublime/mainwindow.moc:106
#19 0xb7c467ea in KDevelop::MainWindow::qt_metacall (this=0x86aec38, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0xbfeb1424) at /home/chainsaw/src/kdevelop/kdevplatform/build/shell/mainwindow.moc:81
#20 0xb6dcb98c in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#21 0xb6dcc5c2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#22 0xb5a00619 in Sublime::Area::viewAdded (this=0x86d6f48, _t1=0x86d7528, _t2=0x99e7048) at /home/chainsaw/src/kdevelop/kdevplatform/build/sublime/area.moc:109
#23 0xb5a047c7 in Sublime::Area::addView (this=0x86d6f48, view=0x99e7048, index=0x86d7528) at /home/chainsaw/src/kdevelop/kdevplatform/sublime/area.cpp:169
#24 0xb5a04a2f in Sublime::Area::addView (this=0x86d6f48, view=0x99e7048, after=0x0) at /home/chainsaw/src/kdevelop/kdevplatform/sublime/area.cpp:182
#25 0xb7c7b34a in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=0x8722f58, doc=0xa921a8c8, range=@0xbfeb1848, activationParams={i = 0})
    at /home/chainsaw/src/kdevelop/kdevplatform/shell/documentcontroller.cpp:330
#26 0xb7c7baec in KDevelop::DocumentControllerPrivate::openDocumentInternal (this=0x8722f58, inputUrl=@0xbfeb1854, prefName=@0xbfeb180c, range=@0xbfeb1848, activationParams={i = 0})
    at /home/chainsaw/src/kdevelop/kdevplatform/shell/documentcontroller.cpp:258
#27 0xb7c78b5d in KDevelop::DocumentController::openDocument (this=0x86ed2d8, inputUrl=@0xbfeb1854, range=@0xbfeb1848, activationParams={i = 0})
    at /home/chainsaw/src/kdevelop/kdevplatform/shell/documentcontroller.cpp:524
#28 0xaee944e7 in ProjectFileData::execute (this=0xa92019d0) at /home/chainsaw/src/kdevelop/kdevplatform/plugins/quickopen/projectfilequickopen.cpp:54
#29 0xaee931aa in QuickOpenModel::execute (this=0x8953f70, index=@0xbfeb191c, filterText=@0xbfeb1a04) at /home/chainsaw/src/kdevelop/kdevplatform/plugins/quickopen/quickopenmodel.cpp:412
#30 0xaee81b1c in QuickOpenWidget::eventFilter (this=0x8a50ec0, watched=0x8955c48, event=0xbfeb1de4) at /home/chainsaw/src/kdevelop/kdevplatform/plugins/quickopen/quickopenplugin.cpp:627
#31 0xb6db511a in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib/libQtCore.so.4
#32 0xb637566c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#33 0xb637ddf1 in QApplication::notify () from /usr/lib/libQtGui.so.4
#34 0xb70e9fca in KApplication::notify (this=0xbfeb3964, receiver=0x8955c48, event=0xbfeb1de4) at /home/jan/kdemod/testing/kdelibs/src/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#35 0xb6db5fab in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#36 0xb637656e in ?? () from /usr/lib/libQtGui.so.4
#37 0xb640fc9d in ?? () from /usr/lib/libQtGui.so.4
#38 0xb641212c in ?? () from /usr/lib/libQtGui.so.4
#39 0xb63e88c7 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#40 0xb6413bf2 in ?? () from /usr/lib/libQtGui.so.4
#41 0xb51e7d98 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#42 0xb51eb3e0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#43 0xb51eb513 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#44 0xb6de06ac in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#45 0xb6413325 in ?? () from /usr/lib/libQtGui.so.4
#46 0xb6db4559 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#47 0xb6db49aa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#48 0xb6db6e1f in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#49 0xb6375517 in QApplication::exec () from /usr/lib/libQtGui.so.4
#50 0x0804f453 in main (argc=1, argv=0xbfeb3e74) at /home/chainsaw/src/kdevelop/kdevelop/app/main.cpp:181

Reported using DrKonqi
Comment 1 Jens Bäckman 2009-08-17 17:15:55 UTC
Additional info: the KDevelop version is r1012187, compiled from source, and NOT an Archlinux package.
Comment 2 Joseph Wenninger 2009-09-12 00:30:28 UTC
From the backtrace I think it is a kdevplatform problem
Comment 3 Andreas Pakulat 2009-09-12 08:15:49 UTC
Uhm, which message box? And can you open this file with plain kate? Can you attach such a broken utf-8 file here please, as I don't have any broken editors that would allow me to create such broken files.
Comment 4 Andreas Pakulat 2009-09-12 08:16:29 UTC
waiting for info from the op.
Comment 5 Jens Bäckman 2009-09-14 10:10:10 UTC
Created attachment 36937 [details]
File that crashes KDevelop
Comment 6 Jens Bäckman 2009-09-14 10:12:22 UTC
This file triggers the crash in KDevelop trunk. Kate can open the file just fine.
Comment 7 Andreas Pakulat 2009-10-18 01:11:12 UTC
I think the root cause of this is the same as 204383, it just crashes so "late" in the call-hierarchy because no other places tries to dereference the pointer before. Closing as dupe for now, in case 204383 is fixed and this can be reproduced thereafter feel free to re-open - with a fresh backtrace.

*** This bug has been marked as a duplicate of bug 204383 ***
Comment 8 Dario Andres 2009-11-04 02:24:48 UTC
*** Bug 212965 has been marked as a duplicate of this bug. ***