Skrooge designer plugin crashes #573

Open
antonio-rojas opened this Issue Jun 23, 2017 · 22 comments

Comments

Projects
None yet
7 participants

Qt Designer crashes at startup when using this version of qtwebkit

Application: designer (designer), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f069d165500 (LWP 1926))]

Thread 10 (Thread 0x7f05c6ffd700 (LWP 2847)):
#0 0x00007f069a0df6cc in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1 0x00007f069a629018 in QWaitConditionPrivate::wait_relative(unsigned long) (time=30000, this=0x7f05ec003df0) at thread/qwaitcondition_unix.cpp:133
#2 0x00007f069a629018 in QWaitConditionPrivate::wait(unsigned long) (time=30000, this=0x7f05ec003df0) at thread/qwaitcondition_unix.cpp:141
#3 0x00007f069a629018 in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x7f05ec0013e0, mutex=mutex@entry=0x1971000, time=30000) at thread/qwaitcondition_unix.cpp:215
#4 0x00007f069a624424 in QThreadPoolThread::run() (this=0x7f05ec0013d0) at thread/qthreadpool.cpp:133
#5 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x7f05ec0013d0) at thread/qthread_unix.cpp:368
#6 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#7 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f05c7fff700 (LWP 2844)):
#0 0x00007f069a0df6cc in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1 0x00007f069a629018 in QWaitConditionPrivate::wait_relative(unsigned long) (time=30000, this=0x7f05f0003b70) at thread/qwaitcondition_unix.cpp:133
#2 0x00007f069a629018 in QWaitConditionPrivate::wait(unsigned long) (time=30000, this=0x7f05f0003b70) at thread/qwaitcondition_unix.cpp:141
#3 0x00007f069a629018 in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x7f05f0003220, mutex=mutex@entry=0x1971000, time=30000) at thread/qwaitcondition_unix.cpp:215
#4 0x00007f069a624424 in QThreadPoolThread::run() (this=0x7f05f0003210) at thread/qthreadpool.cpp:133
#5 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x7f05f0003210) at thread/qthread_unix.cpp:368
#6 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#7 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f05f57fb700 (LWP 2841)):
#0 0x00007f06994aa530 in __dcigettext () at /usr/lib/libc.so.6
#1 0x00007f06994fe038 in strerror_r () at /usr/lib/libc.so.6
#2 0x00007f069a60ed96 in qt_error_string(int) (errorCode=9) at global/qglobal.cpp:3166
#3 0x00007f069a76fd74 in QFSFileEnginePrivate::readFdFh(char*, long long) (this=this@entry=0x7f05c00027c0, data=data@entry=0x7f05c0135278 "\026]?\311\375*\203R\224\367@a\240", len=len@entry=16384) at io/qfsfileengine.cpp:637
#4 0x00007f069a78e19e in QFSFileEnginePrivate::nativeRead(char*, long long) (this=0x7f05c00027c0, data=0x7f05c0135278 "\026]?\311\375*\203R\224\367@a\240", len=16384) at io/qfsfileengine_unix.cpp:343
#5 0x00007f069a72042b in QFileDevice::readData(char*, long long) (this=this@entry=0x7f05f57facc0, data=0x7f05c0135278 "\026]?\311\375*\203R\224\367@a\240", len=len@entry=16384) at io/qfiledevice.cpp:463
#6 0x00007f069a729221 in QIODevicePrivate::read(char*, long long, bool) (this=0x7f05c035fd60, data=0x7f05f57faca0 "", maxSize=maxSize@entry=8, peeking=peeking@entry=false) at io/qiodevice.cpp:1111
#7 0x00007f069a729708 in QIODevice::read(char*, long long) (this=, data=, maxSize=maxSize@entry=8) at io/qiodevice.cpp:1035
#8 0x00007f069a70be47 in QDataStream::readBlock(char*, int) (this=this@entry=0x7f05f57face0, data=data@entry=0x7f05f57faca0 "", len=len@entry=8) at io/qdatastream.cpp:767
#9 0x00007f069a70bfda in QDataStream::operator>>(long long&) (this=0x7f05f57face0, i=@0x7f05f57faca0: 0) at io/qdatastream.cpp:891
#10 0x00007f064c7ae3f9 in () at /usr/lib/marble/plugins/libCachePlugin.so
#11 0x00007f065f146aab in () at /usr/lib/libmarblewidget-qt5.so.27
#12 0x00007f069a6241e1 in QThreadPoolThread::run() (this=0x7f05e40013d0) at thread/qthreadpool.cpp:99
#13 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x7f05e40013d0) at thread/qthread_unix.cpp:368
#14 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#15 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f05f67fd700 (LWP 2838)):
#0 0x00007f069a0df6cc in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1 0x00007f069a629018 in QWaitConditionPrivate::wait_relative(unsigned long) (time=30000, this=0x7f05e8003990) at thread/qwaitcondition_unix.cpp:133
#2 0x00007f069a629018 in QWaitConditionPrivate::wait(unsigned long) (time=30000, this=0x7f05e8003990) at thread/qwaitcondition_unix.cpp:141
#3 0x00007f069a629018 in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x7f05e8002f10, mutex=mutex@entry=0x1971000, time=30000) at thread/qwaitcondition_unix.cpp:215
#4 0x00007f069a624424 in QThreadPoolThread::run() (this=0x7f05e8002f00) at thread/qthreadpool.cpp:133
#5 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x7f05e8002f00) at thread/qthread_unix.cpp:368
#6 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#7 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f064eb0d700 (LWP 2019)):
#0 0x00007f0695666a69 in g_mutex_lock () at /usr/lib/libglib-2.0.so.0
#1 0x00007f0695621d08 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#2 0x00007f069a85af0b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) (this=0x7f06400008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#3 0x00007f069a80128a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) (this=this@entry=0x7f064eb0cdf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#4 0x00007f069a62347a in QThread::exec() (this=) at thread/qthread.cpp:515
#5 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x16c1810) at thread/qthread_unix.cpp:368
#6 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#7 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f064f30e700 (LWP 2014)):
#0 0x00007f069a0e289d in read () at /usr/lib/libpthread.so.0
#1 0x00007f0695665730 in () at /usr/lib/libglib-2.0.so.0
#2 0x00007f06956216eb in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3 0x00007f0695621bb0 in () at /usr/lib/libglib-2.0.so.0
#4 0x00007f0695621d1c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5 0x00007f069a85af0b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) (this=0x7f06480008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#6 0x00007f069a80128a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) (this=this@entry=0x7f064f30ddf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#7 0x00007f069a62347a in QThread::exec() (this=) at thread/qthread.cpp:515
#8 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x16825d0) at thread/qthread_unix.cpp:368
#9 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f0658d80700 (LWP 1960)):
#0 0x00007f069a0df39d in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1 0x00007f0699dffccc in __gthread_cond_wait (__mutex=, __cond=__cond@entry=0x7f065eacc928 <bmalloc::PerProcessbmalloc::Heap::s_memory+3080>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:864
#2 0x00007f0699dffccc in std::condition_variable::wait(std::unique_lockstd::mutex&) (this=this@entry=0x7f065eacc928 <bmalloc::PerProcessbmalloc::Heap::s_memory+3080>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
#3 0x00007f065dff4197 in std::_V2::condition_variable_any::wait<std::unique_lockbmalloc::Mutex >(std::unique_lockbmalloc::Mutex&) (__lock=..., this=) at /usr/include/c++/7.1.1/condition_variable:251
#4 0x00007f065dff4197 in std::_V2::condition_variable_any::wait<std::unique_lockbmalloc::Mutex, bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>::threadRunLoop()::{lambda()#1}>(std::unique_lockbmalloc::Mutex&, bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>::threadRunLoop()::{lambda()#1}) (__p=..., __lock=..., this=) at /usr/include/c++/7.1.1/condition_variable:260
#5 0x00007f065dff4197 in bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>::threadRunLoop() (this=0x7f065eacc920 <bmalloc::PerProcessbmalloc::Heap::s_memory+3072>) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/bmalloc/bmalloc/AsyncTask.h:126
#6 0x00007f065dff42d9 in bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::
)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>) (asyncTask=) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/bmalloc/bmalloc/AsyncTask.h:106
#7 0x00007f0699e0600f in std::execute_native_thread_routine(void*) (__p=0x100ac90) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:83
#8 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#9 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f067de03700 (LWP 1943)):
#0 0x00007f069955f24d in poll () at /usr/lib/libc.so.6
#1 0x00007f0695621c09 in () at /usr/lib/libglib-2.0.so.0
#2 0x00007f0695621d1c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3 0x00007f069a85af0b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) (this=0x7f06780008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4 0x00007f069a80128a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) (this=this@entry=0x7f067de02dc0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5 0x00007f069a62347a in QThread::exec() (this=this@entry=0x7f0692378d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:515
#6 0x00007f0692105455 in QDBusConnectionManager::run() (this=0x7f0692378d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#7 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0x7f0692378d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#8 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#9 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f068f57e700 (LWP 1937)):
#0 0x00007f069955f24d in poll () at /usr/lib/libc.so.6
#1 0x00007f06934a38e0 in () at /usr/lib/libxcb.so.1
#2 0x00007f06934a5679 in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3 0x00007f06927fa629 in QXcbEventReader::run() (this=0xc1ff60) at qxcbconnection.cpp:1322
#4 0x00007f069a627d2d in QThreadPrivate::start(void*) (arg=0xc1ff60) at thread/qthread_unix.cpp:368
#5 0x00007f069a0d9297 in start_thread () at /usr/lib/libpthread.so.0
#6 0x00007f06995691ef in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f069d165500 (LWP 1926)):
[KCrash Handler]
#5 0x00007f065cd8946b in WebCore::createMarkup(WebCore::Range const&, WTF::Vector<WebCore::Node*, 0ul, WTF::CrashOnOverflow, 16ul>, WebCore::EAnnotateForInterchange, bool, WebCore::EAbsoluteURLs) (range=..., nodes=nodes@entry=0x0, shouldAnnotate=shouldAnnotate@entry=WebCore::DoNotAnnotateForInterchange, convertBlocksToInlines=convertBlocksToInlines@entry=false, shouldResolveURLs=shouldResolveURLs@entry=WebCore::DoNotResolveURLs) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/WebCore/editing/markup.cpp:672
#6 0x00007f065cdcbea7 in WebCore::Range::toHTML() const (this=) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/WebCore/dom/Range.cpp:910
#7 0x00007f065c0be769 in QWebPageAdapter::selectedHtml() const (this=this@entry=0x1c36ae0) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:393
#8 0x00007f068c11767e in QWebPage::selectedHtml() const (this=0x162d3b0) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WidgetApi/qwebpage.cpp:2308
#9 0x00007f068c11f395 in QWebView::selectedHtml() const (this=) at /tmp/makepkg/qt5-webkit-debug/src/qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WidgetApi/qwebview.cpp:486
#10 0x00007f068c11f98e in QWebView::qt_static_metacall(QObject
, QMetaObject::Call, int, void**) (_o=, _c=, _id=, _a=) at /tmp/makepkg/qt5-webkit-debug/src/build/Source/WebKit/WebKitWidgets_autogen/include/moc_qwebview.cpp:249
#11 0x00007f068c11ff2b in QWebView::qt_metacall(QMetaObject::Call, int, void**) (this=0x1b8ed20, _c=QMetaObject::ReadProperty, _id=4, _a=0x7ffee07bdc80) at /tmp/makepkg/qt5-webkit-debug/src/build/Source/WebKit/WebKitWidgets_autogen/include/moc_qwebview.cpp:314
#12 0x00007f0655721505 in SKGWebView::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib/qt/plugins/designer/libskgbaseguidesigner.so
#13 0x00007f069a81037a in QMetaProperty::read(QObject const*) const (this=, object=0x1b8ed20) at kernel/qmetaobject.cpp:3039
#14 0x00007f069c61c4b1 in (anonymous namespace)::QDesignerMetaProperty::read(QObject const*) const (this=, object=) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/lib/shared/qdesigner_introspection.cpp:112
#15 0x00007f069c5d02a6 in QDesignerPropertySheet::metaProperty(int) const (this=this@entry=0x1d73ca0, index=) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/lib/shared/qdesigner_propertysheet.cpp:1072
#16 0x00007f069c5d3954 in QDesignerPropertySheet::property(int) const (this=0x1d73ca0, index=) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/lib/shared/qdesigner_propertysheet.cpp:1035
#17 0x00007f069c6119bd in qdesigner_internal::WidgetDataBase::defaultPropertyValues(QString const&) (this=this@entry=0xfbca60, name=...) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/lib/shared/widgetdatabase.cpp:442
#18 0x00007f069c611c36 in qdesigner_internal::WidgetDataBase::grabDefaultPropertyValues() (this=0xfbca60) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/lib/shared/widgetdatabase.cpp:454
#19 0x00000000004366e6 in QDesignerWorkbench::QDesignerWorkbench() (this=0xfbc670) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/designer/qdesigner_workbench.cpp:180
#20 0x000000000042f6c7 in QDesigner::parseCommandLineArguments() (this=this@entry=0x7ffee07be220) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/designer/qdesigner.cpp:251
#21 0x000000000041de96 in main(int, char**) (argc=, argv=) at /tmp/makepkg/qt5-tools-debug/src/qttools-opensource-src-5.9.0/src/designer/src/designer/main.cpp:45

Owner

annulen commented Jun 24, 2017

Is backtrace complete? It's weird that trace for thread 1 starts from frame 5

Yes, that seems to be a weirdness of the KDE crash handler. In gdb I get the same backtrace, but starting from #0

Owner

annulen commented Jun 24, 2017

Do you mean WebCore::createMarkup is #0?

Owner

annulen commented Jun 28, 2017

Could you check with QtWebKit built by GCC 7.1.1, or GCC 6?

happens regardless of the gcc version

This is triggered by skrooge (https://skrooge.org/), which installs a designer plugin. Removing it fixes the crashes, but rebuilding skrooge against qtwebkit 5.212.0 doesn't make any difference.

Owner

annulen commented Jul 1, 2017

Thanks for the info!

@annulen annulen added the regression label Jul 2, 2017

@annulen annulen changed the title from designer crashes to Skrooge designer plugin crashes Jul 2, 2017

Busimus commented Jul 2, 2017

I've never installed Skrooge and I still have the same issue with 5.212.0.

kdesignerplugin also triggers this. It also installs a designer plugin that links to qtwebkit.

Busimus commented Jul 2, 2017

Yep, that was it. I uninstalled it and everything is working fine now, thanks!

lupinix commented Jul 23, 2017

What is the current status here?

mitya57 commented Sep 17, 2017

The same crash happens for me with qobjectxmlmodel example.

#0  WebCore::createMarkup () at ../Source/WebCore/editing/markup.cpp:672
#1  0x00007ffff3972b27 in WebCore::Range::toHTML () at ../Source/WebCore/dom/Range.cpp:910
#2  0x00007ffff2ce98a9 in QWebPageAdapter::selectedHtml () at ../Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:393
#3  0x00007ffff7bbaac1 in QWebPage::selectedHtml () at ../Source/WebKit/qt/WidgetApi/qwebpage.cpp:2308
#4  0x00007ffff7bc18e5 in QWebView::selectedHtml () at ../Source/WebKit/qt/WidgetApi/qwebview.cpp:486
#5  0x00007ffff7bc1ede in QWebView::qt_static_metacall () at Source/WebKit/WebKitWidgets_autogen/include/moc_qwebview.cpp:249
#6  0x00007ffff7bc2493 in QWebView::qt_metacall () at Source/WebKit/WebKitWidgets_autogen/include/moc_qwebview.cpp:314

rapgro commented Sep 17, 2017

IMHO related to #627

@annulen annulen added this to the v5.212.0-alpha3 milestone Oct 9, 2017

kkofler commented Oct 23, 2017

Ping? Is there any fix that we can apply in distros yet?

mitya57 commented Oct 30, 2017

I have just got a bug report about this in Debian. @annulen What do you think about Kevin’s patch? Is it a correct fix?

Owner

annulen commented Oct 30, 2017

Probably so, I'll check & merge it soon. Hope to fix other bugs in API tests as well

kkofler commented Oct 30, 2017

For the record, "my" patch only implements @rapgro's suggestion from issue #627.

mitya57 commented Oct 30, 2017

Great, thanks.

The bug was reported not about the tests, but about a Qt Designer crash.

rapgro commented Oct 30, 2017

The patch of @kkofler works great in Fedora, tested with package psi-plus using qtwebkit for messages list and dynamic context menu for individually selected stuff (text or clickable links). We've already applied it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment