Bug 404402 - discover implodes when opening an appstream uri
Summary: discover implodes when opening an appstream uri
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: KNewStuff Backend (show other bugs)
Version: 5.15.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
: 404357 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-15 16:29 UTC by Harald Sitter
Modified: 2019-02-19 16:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.2


Attachments
cgcicon.knsrc file for reference (1.03 KB, text/plain)
2019-02-15 16:29 UTC, Harald Sitter
Details
exhaustive qtcreator trace (12.42 KB, text/plain)
2019-02-15 16:33 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2019-02-15 16:29:50 UTC
Created attachment 118113 [details]
cgcicon.knsrc file for reference

when opening an appstream uri (through webbrowser or appstream krunner runner) the app page will briefly appear and a few seconds later discover will crash.

STEPS TO REPRODUCE
1. have /etc/xdg/cgcicon.ksnrc [bogus ksnrc]
2. run `plasma-discover appstream://org.kde.kamoso.desktop`

OBSERVED RESULT

crash

EXPECTED RESULT

no crash
SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 5.15
(available in About System)
KDE Plasma Version: 5.15
KDE Frameworks Version: 5.55
Qt Version: 5.12


Only using two backends still crashes

plasma-discover appstream://org.kde.kamoso.desktop --backends packagekit-backend,kns-backend

Only using pk backend does not crash

plasma-discover appstream://org.kde.kamoso.desktop --backends packagekit-backend

Working theory is that somehow the invalid ksnrc causes the crash. It's unclear how. Moving the file away  makes discover not crash, moving it back makes it crash again. Backtracing is unfortunately fairly meh because of qml. Jonathan Riddell can also confirm the crash with that file in place.
Comment 1 Harald Sitter 2019-02-15 16:31:56 UTC
This is the trace with QML_DISABLE_OPTIMIZER=1 set

(gdb) t a a bt

Thread 14 (Thread 0x7fffa5dd3700 (LWP 1988)):
#0  0x00007fffef481ed9 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff330eac6 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007ffff330ee25 in QWaitCondition::wait(QMutex*, unsigned long) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff330c5dd in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 13 (Thread 0x7fffa65d4700 (LWP 1987)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d15b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 12 (Thread 0x7fffa77fe700 (LWP 1981)):
#0  0x00007fffef4819f3 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff330eb4b in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007ffff330ee59 in QWaitCondition::wait(QMutex*, unsigned long) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff6990da8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#4  0x00007ffff69911da in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#5  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 11 (Thread 0x7fffa7fff700 (LWP 1980)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 10 (Thread 0x7fffb99b3700 (LWP 1977)):
#0  0x00007fffef481ed9 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007ffff330eac6 in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007ffff330ee25 in QWaitCondition::wait(QMutex*, unsigned long) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff330c5dd in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#6  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 9 (Thread 0x7fffba1b4700 (LWP 1976)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 8 (Thread 0x7fffbbfff700 (LWP 1974)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 7 (Thread 0x7fffc08fa700 (LWP 1973)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df8d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffc2956026 in  () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fffed307105 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 6 (Thread 0x7fffc10fb700 (LWP 1972)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffed2df691 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fffed307105 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7fffcc5c3700 (LWP 1971)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff690b1c6 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#7  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 4 (Thread 0x7fffdc9d2700 (LWP 1970)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff42e42e5 in QQmlThreadPrivate::run() (this=0x5555559699f0) at qml/ftw/qqmlthread.cpp:148
#7  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7fffdd1d3700 (LWP 1969)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffed2df539 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fffed2df64c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff353d13f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff34de64a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff330641a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff56c5015 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7fffe5171700 (LWP 1968)):
#0  0x00007ffff2bfabf9 in poll () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fffeca14747 in  () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fffeca1636a in xcb_wait_for_event () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fffe7d33d4a in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007ffff3307bc2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fffef47b6db in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffff2c0788f in clone () at /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7ffff7f91800 (LWP 1963)):
#0  0x00007ffff42334fe in QQmlData::createQQmlData(QObjectPrivate*) (priv=0x7ffff3984980 <QObject::staticMetaObject>) at qml/qqmlengine.cpp:2008
#1  0x00007ffff4189645 in QQmlData::get(QObject const*, bool) (create=true, object=0x55555817f6c0)
    at ../../include/QtQml/5.12.0/QtQml/private/../../../../../src/qml/qml/qqmldata_p.h:254
#2  0x00007ffff4189645 in QV4::QObjectWrapper::wrap_slowPath(QV4::ExecutionEngine*, QObject*) (engine=0x555555964df0, object=0x55555817f6c0) at jsruntime/qv4qobjectwrapper.cpp:588
#3  0x00007ffff42be982 in QV4::QObjectWrapper::wrap(QV4::ExecutionEngine*, QObject*) (object=<optimized out>, engine=<optimized out>)
    at ../../include/QtQml/5.12.0/QtQml/private/../../../../../src/qml/jsruntime/qv4qobjectwrapper_p.h:218
#4  0x00007ffff42be982 in QmlListWrapperOwnPropertyKeyIterator::next(QV4::Object const*, QV4::Property*, QV4::PropertyAttributes*) (this=0x55555a9cc100, o=0x7fffd71b16e0, pd=0x7fffd71b16f0, attrs=0x7fffffff66b6)
    at qml/qqmllistwrapper.cpp:161
#5  0x00007ffff417bd62 in QV4::ForInIteratorObject::nextProperty() const (this=0x7fffd71b1638)
    at jsruntime/qv4objectiterator.cpp:176
#6  0x00007ffff417beba in QV4::ForInIteratorPrototype::method_next(QV4::FunctionObject const*, QV4::Value const*, QV4::Value const*, int) (b=<optimized out>, thisObject=<optimized out>) at jsruntime/qv4objectiterator.cpp:152
#7  0x00007ffff421006b in QV4::FunctionObject::call(QV4::Value const*, QV4::Value const*, int) const (argc=<optimized out>, argv=<optimized out>, thisObject=<optimized out>, this=0x7fffd71b16d0) at jsruntime/qv4functionobject_p.h:202
#8  0x00007ffff421006b in QV4::FunctionObject::call(QV4::JSCallData const&) const (data=..., this=<optimized out>)
    at jsruntime/qv4jscall_p.h:112
---Type <return> to continue, or q <return> to quit---
#9  0x00007ffff421006b in QV4::Runtime::method_iteratorNext(QV4::ExecutionEngine*, QV4::Value const&, QV4::Value*) (engine=0x555555964df0, iterator=..., value=0x7fffd71b1688) at jsruntime/qv4runtime.cpp:783
#10 0x00007fffc8077970 in  ()
#11 0x0000000000000000 in  ()
Comment 2 Harald Sitter 2019-02-15 16:33:59 UTC
Created attachment 118114 [details]
exhaustive qtcreator trace

I am also attacking a trace generated by qtcreator when trying to make it also fetch a qml trace, this may or may not be more useful. It's certainly no qml trace, so I am not sure qtcreator can be trusted ;)
Comment 3 Aleix Pol 2019-02-19 02:28:31 UTC
*** Bug 404357 has been marked as a duplicate of this bug. ***
Comment 4 Aleix Pol 2019-02-19 02:28:42 UTC
Git commit f5e10f7676fa1d4663fa8343d0ad6305ad83c2de by Aleix Pol.
Committed on 19/02/2019 at 02:24.
Pushed by apol into branch 'Plasma/5.15'.

ApplicationPage: Fix crash when the sources model gets refreshed

M  +1    -1    discover/qml/ApplicationPage.qml

https://commits.kde.org/discover/f5e10f7676fa1d4663fa8343d0ad6305ad83c2de