Bug 200054 - crashes after opening non-utf8 files
Summary: crashes after opening non-utf8 files
Status: RESOLVED DUPLICATE of bug 204383
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: sublime (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: LO crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 210898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-13 17:50 UTC by Armin Berres
Modified: 2009-10-18 01:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
file containing non-utf8 encoded text (8 bytes, text/plain)
2009-07-13 17:52 UTC, Armin Berres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Berres 2009-07-13 17:50:49 UTC
Version:            (using KDE 4.2.96)
OS:                Linux
Installed from:    Compiled From Sources

I'm currently using kdevelop r995594 and can trigger a crash like this:
a) close all open files
b) Open the attached file. You will get a message that the file is non utf8 and will be opened read-only.
c) Close the dialog
d) CRASH

The backtrace looks like this:

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

Thread 7 (Thread 0x7f59555c4950 (LWP 17357)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217
#1  0x0000003f9d46d3c7 in QWaitCondition::wait (this=<value optimized out>, mutex=<value optimized out>, time=<value optimized out>) at thread/qwaitcondition_unix.cpp:85
#2  0x00007f595c94ee6e in KDevelop::DUChainPrivate::CleanupThread::run (this=0x2778dd0) at ../../language/duchain/duchain.cpp:280
#3  0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#4  0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#5  0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f59475f7950 (LWP 17575)):
#0  0xffffffffff600132 in ?? ()
#1  0x00007fffbdbff5fb in ?? ()
#2  0x0000003e02e03f6f in *__GI_clock_gettime (clock_id=<value optimized out>, tp=<value optimized out>) at ../sysdeps/unix/clock_gettime.c:100
#3  0x0000003f9d57c75d in QTimerInfoList::getTime (this=<value optimized out>, t=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:339
#4  0x0000003f9d57c941 in QTimerInfoList::updateCurrentTime (this=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:297
#5  0x0000003f9d57e843 in QTimerInfoList::timerWait (this=<value optimized out>, tm=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:420
#6  0x0000003f9d57ad4d in timerSourcePrepare (source=<value optimized out>, timeout=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:141
#7  0x0000003e02a3cf42 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#8  0x0000003e02a3d35f in ?? () from /usr/lib/libglib-2.0.so.0
#9  0x0000003e02a3d7dc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#10 0x0000003f9d57ab9e in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#11 0x0000003f9d550d62 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#12 0x0000003f9d551134 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201
#13 0x0000003f9d4694f8 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#14 0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#15 0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#16 0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f59485f9950 (LWP 17576)):
#0  0xffffffffff600132 in ?? ()
#1  0x00007fffbdbff5fb in ?? ()
#2  0x0000003e02e03f6f in *__GI_clock_gettime (clock_id=<value optimized out>, tp=<value optimized out>) at ../sysdeps/unix/clock_gettime.c:100
#3  0x0000003f9d57c75d in QTimerInfoList::getTime (this=<value optimized out>, t=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:339
#4  0x0000003f9d57c941 in QTimerInfoList::updateCurrentTime (this=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:297
#5  0x0000003f9d57e843 in QTimerInfoList::timerWait (this=<value optimized out>, tm=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:420
#6  0x0000003f9d57ad4d in timerSourcePrepare (source=<value optimized out>, timeout=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:141
#7  0x0000003e02a3cf42 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#8  0x0000003e02a3d35f in ?? () from /usr/lib/libglib-2.0.so.0
#9  0x0000003e02a3d7dc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#10 0x0000003f9d57ab9e in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#11 0x0000003f9d550d62 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#12 0x0000003f9d551134 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201
#13 0x0000003f9d4694f8 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#14 0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#15 0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#16 0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#17 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f5947df8950 (LWP 17581)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:217
#1  0x0000003f9d46be65 in thread_sleep (ti=<value optimized out>) at thread/qthread_unix.cpp:297
#2  0x0000003f9d46bfbe in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:323
#3  0x00007f5944164961 in ?? () from /usr/lib/kde4/kdevcpplanguagesupport.so
#4  0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#5  0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f5943771950 (LWP 17582)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x0000003f9d46d3e9 in QWaitCondition::wait (this=<value optimized out>, mutex=<value optimized out>, time=<value optimized out>) at thread/qwaitcondition_unix.cpp:87
#2  0x00007f595b93dda4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x292d390, th=0x5e000e0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f595b9404eb in ThreadWeaver::WorkingHardState::applyForWork (this=0x2923dc0, th=0x5e000e0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f595b93eabf in ThreadWeaver::ThreadRunHelper::run (this=0x7f5943771080, parent=0x292d390, th=0x5e000e0) at ../../../threadweaver/Weaver/Thread.cpp:87
#5  0x00007f595b93eef9 in ThreadWeaver::Thread::run (this=0x5e000e0) at ../../../threadweaver/Weaver/Thread.cpp:142
#6  0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#7  0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#8  0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f5942f70950 (LWP 17583)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x0000003f9d46d3e9 in QWaitCondition::wait (this=<value optimized out>, mutex=<value optimized out>, time=<value optimized out>) at thread/qwaitcondition_unix.cpp:87
#2  0x00007f595b93dda4 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x292d390, th=0x5aab010) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#3  0x00007f595b9404eb in ThreadWeaver::WorkingHardState::applyForWork (this=0x2923dc0, th=0x5aab010) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#4  0x00007f595b93eabf in ThreadWeaver::ThreadRunHelper::run (this=0x7f5942f70080, parent=0x292d390, th=0x5aab010) at ../../../threadweaver/Weaver/Thread.cpp:87
#5  0x00007f595b93eef9 in ThreadWeaver::Thread::run (this=0x5aab010) at ../../../threadweaver/Weaver/Thread.cpp:142
#6  0x0000003f9d46c3f5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:188
#7  0x0000003e00e06faa in start_thread (arg=<value optimized out>) at pthread_create.c:300
#8  0x0000003e002ce29d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f595b726760 (LWP 17356)):
[KCrash Handler]
#5  0x0000003d5122b841 in QWidgetPrivate::init (this=<value optimized out>, parentWidget=<value optimized out>, f=<value optimized out>) at kernel/qwidget.cpp:1053
#6  0x0000003d5122c203 in QWidget (this=<value optimized out>, parent=<value optimized out>, f=<value optimized out>) at kernel/qwidget.cpp:953
#7  0x00007f595eaade17 in View (this=0xba5c9c, parent=0x3e0054ea80) at ../../../interfaces/ktexteditor/ktexteditor.cpp:262
#8  0x00007f5940cd1501 in KateView (this=0xba5c9c, doc=0x7f59341cd070, parent=0x5535bf0) at ../../kate/view/kateview.cpp:125
#9  0x00007f5940c3a254 in KateDocument::createView (this=0x7f59341cd070, parent=0x5535bf0) at ../../kate/document/katedocument.cpp:339
#10 0x00007f595ed500ef in KDevelop::TextDocument::createViewWidget (this=0x83e7570, parent=0x5535bf0) at ../../shell/textdocument.cpp:268
#11 0x00007f595ed508a7 in KDevelop::TextView::createWidget (this=0x8320fa0, parent=0x5535bf0) at ../../shell/textdocument.cpp:504
#12 0x00007f595c67cf46 in Sublime::View::widget (this=0x8320fa0, parent=0x3e0054ea80) at ../../sublime/view.cpp:82
#13 0x00007f595c6786d5 in Sublime::MainWindowPrivate::ViewCreator::operator() (this=0x7fffbdb5b000, index=0x288c7b0) at ../../sublime/mainwindow_p.cpp:241
#14 0x00007f595c67c1f7 in Sublime::Area::walkViewsInternal<Sublime::MainWindowPrivate::ViewCreator> (this=0x288b8d0, op=@0x7fffbdb5b000, index=0x288c7b0) at ../../sublime/areawalkers.h:32
#15 0x00007f595c678fb5 in Sublime::MainWindowPrivate::viewAdded (this=0x2816420, index=0x288c7b0, view=0x8320fa0) at ../../sublime/areawalkers.h:48
#16 0x00007f595c6711b8 in Sublime::MainWindow::qt_metacall (this=0x285e110, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffbdb5b180) at ./mainwindow.moc:106
#17 0x00007f595ed282a5 in KDevelop::MainWindow::qt_metacall (this=0xba5c9c, _c=5565056, _id=89349104, _a=0x73c3660) at ./mainwindow.moc:78
#18 0x0000003f9d567602 in QMetaObject::activate (sender=<value optimized out>, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3112
#19 0x00007f595c6636f8 in Sublime::Area::viewAdded (this=0xba5c9c, _t1=0x288c7b0, _t2=0x8320fa0) at ./area.moc:109
#20 0x00007f595c6660f3 in Sublime::Area::addView (this=0x288b8d0, view=0x8320fa0, index=0x288c7b0) at ../../sublime/area.cpp:158
#21 0x00007f595ed56a18 in KDevelop::DocumentController::openDocument (this=0x28c92a0, inputUrl=<value optimized out>, range=@0x7fffbdb5b7b0, activationParams={i = -1112164384})
    at ../../shell/documentcontroller.cpp:422
#22 0x00007f59453ea6af in ProjectFileData::execute (this=0x5840900) at ../../../plugins/quickopen/projectfilequickopen.cpp:54
#23 0x00007f59453e9253 in QuickOpenModel::execute (this=0x53c0240, index=@0x7f767b0, filterText=@0x7fffbdb5b900) at ../../../plugins/quickopen/quickopenmodel.cpp:412
#24 0x00007f59453d9bc9 in QuickOpenWidget::doubleClicked (this=0x6fb5560, index=@0x7f767b0) at ../../../plugins/quickopen/quickopenplugin.cpp:427
#25 0x00007f59453e25c4 in QuickOpenWidget::qt_metacall (this=0x6fb5560, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffbdb5ba30) at ./quickopenplugin.moc:175
#26 0x0000003f9d567602 in QMetaObject::activate (sender=<value optimized out>, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3112
#27 0x0000003d516b3735 in QAbstractItemView::doubleClicked (this=<value optimized out>, _t1=<value optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:328
#28 0x0000003d517005f2 in QTreeView::mouseDoubleClickEvent (this=<value optimized out>, event=<value optimized out>) at itemviews/qtreeview.cpp:1831
#29 0x0000003d5122796e in QWidget::event (this=<value optimized out>, event=<value optimized out>) at kernel/qwidget.cpp:7553
#30 0x0000003d51590c7b in QFrame::event (this=<value optimized out>, e=<value optimized out>) at widgets/qframe.cpp:559
#31 0x0000003d516c371b in QAbstractItemView::viewportEvent (this=<value optimized out>, event=<value optimized out>) at itemviews/qabstractitemview.cpp:1476
#32 0x0000003d516fb489 in QTreeView::viewportEvent (this=<value optimized out>, event=<value optimized out>) at itemviews/qtreeview.cpp:1266
#33 0x0000003f9d5517b8 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>)
    at kernel/qcoreapplication.cpp:726
#34 0x0000003d511d777c in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4052
#35 0x0000003d511dff5a in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:3758
#36 0x00007f595e697a1b in KApplication::notify (this=0x7fffbdb5e6b0, receiver=0x6c6c9a0, event=0x7fffbdb5c8a0) at ../../kdeui/kernel/kapplication.cpp:302
#37 0x0000003f9d55249c in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:610
#38 0x0000003d511df208 in QApplicationPrivate::sendMouseEvent (receiver=<value optimized out>, event=<value optimized out>, alienWidget=<value optimized out>, nativeWidget=<value optimized out>, 
    buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#39 0x0000003d51247d99 in QETWidget::translateMouseEvent (this=<value optimized out>, event=<value optimized out>) at kernel/qapplication_x11.cpp:4409
#40 0x0000003d51246b4f in QApplication::x11ProcessEvent (this=<value optimized out>, event=<value optimized out>) at kernel/qapplication_x11.cpp:3550
#41 0x0000003d5126ee3c in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#42 0x0000003e02a39f7a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#43 0x0000003e02a3d640 in ?? () from /usr/lib/libglib-2.0.so.0
#44 0x0000003e02a3d7dc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#45 0x0000003f9d57ab7f in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#46 0x0000003d5126e5ef in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#47 0x0000003f9d550d62 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#48 0x0000003f9d551134 in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201
#49 0x0000003f9d5533a4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#50 0x0000000000407fbf in _start ()
Comment 1 Armin Berres 2009-07-13 17:52:15 UTC
Created attachment 35279 [details]
file containing non-utf8 encoded text
Comment 2 Andreas Pakulat 2009-07-13 22:15:03 UTC
can't reproduce this here, Armin which exact KDE version are you using?
Comment 3 Armin Berres 2009-07-13 22:57:00 UTC
KDE 4.3 rc1 with kdevplatform svn revision 995594 and kdevelop svn revision 994808.
The latter two kindly built and packaged by Fathi Boudra, who can also reproduce the crash.
Comment 4 Andreas Pakulat 2009-07-26 03:03:05 UTC
Hmm, without a way to reproduce this, its basically unfixable. The backtrace doesn't provide enough information and rather looks like a problem inside either Kate or Qt. Is this reproduceable with kdelibs rc3?
Comment 5 Armin Berres 2009-07-26 15:37:51 UTC
Just tried it with rc2 and the crash still happens.
Will reproduce with rc3 ASAP.
Comment 6 Armin Berres 2009-07-27 19:07:30 UTC
So, still happens with rc3.
Can really no one reproduce it (ok, fabo could, but apart from him)?

Just close all files, open the one I attached, click ok. Crash happens immediately.
Comment 7 Andreas Pakulat 2009-07-27 19:50:59 UTC
Interesting, I actually can reproduce it, but only if I really had files open that I need to close. If kdevelop comes up with no files loaded and I then open the posted header there's no crash.

So probably yet another case of some kind of state of sublime/shell getting invalid :(
Comment 8 Andreas Pakulat 2009-10-17 20:07:37 UTC
*** Bug 210898 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Pakulat 2009-10-18 01:09:46 UTC
I think this is the same cause as bug 204383, sublime's internal bookkeeping is broken.

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