https://bugs.kde.org/show_bug.cgi?id=490786

            Bug ID: 490786
           Summary: Crash when fetching Flatpak icon for a FlatpakResource
    Classification: Applications
           Product: Discover
           Version: master
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Flatpak Backend
          Assignee: plasma-b...@kde.org
          Reporter: m...@ratijas.tk
                CC: aleix...@kde.org, jgrul...@redhat.com,
                    trav...@redhat.com
  Target Milestone: ---

SUMMARY
Discover asserts on an unexpected icon kind when loading iconCachePath() for a
Flatpak resource.

Possibly a result of a recent-ish patch:
https://invent.kde.org/plasma/discover/-/merge_requests/821#note_998288

My crash is consistently caused by a particular icon:

kind = AppStream::Icon::KindStock
name = "org.gnome.SoundJuicer"
url = QUrl("")

STEPS TO REPRODUCE
1. Open Discover
2. Go to All Application tab
3. Discover starts loading all the resources in the background, after some time
it might crash

OBSERVED RESULT
crash

EXPECTED RESULT
no crash

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.80 (git/master)
KDE Frameworks Version: 6.5.0 (git/master)
Qt Version: 6.7.2
Kernel Version: 6.10.0-arch1-2 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

Core was generated by `plasma-discover'.
Program terminated with signal SIGABRT, Aborted.

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ba1d0aa5463 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:78
#2  0x00007ba1d0a4c120 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ba1d3336ab5 in KCrash::defaultCrashHandler (sig=6) at
/home/ratijas/kde/src/kcrash/src/kcrash.cpp:597
#4  0x00007ba1d0a4c1d0 in <signal handler called> () at /usr/lib/libc.so.6
#5  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007ba1d0aa5463 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:78
#7  0x00007ba1d0a4c120 in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#8  0x00007ba1d0a334c3 in __GI_abort () at abort.c:79
#9  0x00007ba1d108c643 in qAbort () at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qglobal.cpp:136
#10 qt_message_fatal<QString&> (context=<optimized out>, message=...) at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:2052
#11 qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef
__va_list_tag __va_list_tag *)
    (msgType=msgType@entry=QtFatalMsg, context=...,
msg=msg@entry=0x7ba1d1421f90 "ASSERT: \"%s\" in file %s, line %d",
ap=ap@entry=0x7ffe40833430)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:374
#12 0x00007ba1d108cde7 in QMessageLogger::fatal
(this=this@entry=0x7ffe40833518, msg=msg@entry=0x7ba1d1421f90 "ASSERT: \"%s\"
in file %s, line %d")
    at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qlogging.cpp:889
#13 0x00007ba1d108ce3e in qt_assert (assertion=<optimized out>, file=<optimized
out>, line=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qassert.cpp:68
#14 0x00007ba199b0db61 in iconCachePath (icon=...) at
/home/ratijas/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp:53
#15 0x00007ba199b0e739 in FlatpakResource::FlatpakResource
(this=0x620123740da0, component=..., installation=0x620120cdd820
[FlatpakInstallation], parent=0x620120ddefe0)
    at
/home/ratijas/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp:88
#16 0x00007ba199b4d4df in FlatpakBackend::resourceForComponent
(this=0x620120ddefe0, component=..., source=...)
    at
/home/ratijas/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1928
#17 0x00007ba199b4a093 in
operator()(_ZZZN14FlatpakBackend6searchERKN24AbstractResourcesBackend7FiltersEENKUlP13ResultsStreamE2_clES5_ENKUlPS_S5_S1_E_clES7_S5_S1_.Frame
*)
    (frame_ptr=0x620128e19530) at
/home/ratijas/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1742
#18 0x00007ba1d3e58599 in std::__n4861::coroutine_handle<void>::resume
(this=0x6201255e8340) at /usr/include/c++/14.1.1/coroutine:137
#19 0x00007ba1d3e5931b in
QCoro::detail::TaskFinalSuspend::await_suspend<QCoro::detail::TaskPromise<void>
> (this=0x620127eeb9e0, finishedCoroutine=...)
    at /usr/local/kde/usr/include/qcoro6/qcoro/impl/taskfinalsuspend.h:28
#20 0x00007ba1d3e5811a in
CoroutineSplitter::operator()(_ZN17CoroutineSplitterclEv.Frame *)
(frame_ptr=0x620127eeb970) at
/home/ratijas/kde/src/discover/libdiscover/utilscoro.cpp:23
#21 0x00007ba1d3e58599 in std::__n4861::coroutine_handle<void>::resume
(this=0x62013201bb80) at /usr/include/c++/14.1.1/coroutine:137
#22 0x00007ba1d3e5931b in
QCoro::detail::TaskFinalSuspend::await_suspend<QCoro::detail::TaskPromise<void>
> (this=0x6201229be5a8, finishedCoroutine=...)
    at /usr/local/kde/usr/include/qcoro6/qcoro/impl/taskfinalsuspend.h:28
#23 0x00007ba1d3e5845c in
QCoro::sleepFor(_ZN5QCoro8sleepForIlSt5ratioILl1ELl1000EEEENS_4TaskIvEERKNSt6chrono8durationIT_T0_EE.Frame
*) (frame_ptr=0x6201229be530)
    at /usr/local/kde/usr/include/qcoro6/qcoro/qcorotimer.h:64
#24 0x00007ba1d11a16f7 in QtPrivate::QSlotObjectBase::call
(this=0x6201259ed7b0, r=0x6201229be580, a=0x7ffe40833ae0, this=<optimized out>,
r=<optimized out>, a=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobjectdefs_impl.h:469
#25 doActivate<false> (sender=<optimized out>, signal_index=<optimized out>,
argv=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4086
#26 0x00007ba1d11a9885 in QTimer::timeout (this=0x6201229be580, _t1=...) at
/usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qtimer.cpp:224
#27 QTimer::timerEvent (e=<optimized out>, this=0x6201229be580) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:258
#28 QTimer::timerEvent (this=0x6201229be580, e=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimer.cpp:252
#29 0x00007ba1d118bfc9 in QObject::event (this=0x6201229be580,
e=0x7ffe40833c90) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1427
#30 0x00007ba1d34fc51c in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x6201229be580, e=0x7ffe40833c90)
    at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:3287
#31 0x00007ba1d1144d28 in QCoreApplication::notifyInternal2
(receiver=0x6201229be580, event=0x7ffe40833c90)
    at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1142
#32 0x00007ba1d12c3c98 in QCoreApplication::sendEvent (receiver=<optimized
out>, event=0x7ffe40833c90) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1583
#33 QTimerInfoList::activateTimers (this=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:434
#34 0x00007ba1d13a49b1 in timerSourceDispatch (source=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:150
#35 idleTimerSourceDispatch (source=<optimized out>) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:197
#36 0x00007ba1d04acab9 in g_main_dispatch (context=0x7ba1c4000f00) at
../glib/glib/gmain.c:3344
#37 0x00007ba1d050e9e7 in g_main_context_dispatch_unlocked
(context=0x7ba1c4000f00) at ../glib/glib/gmain.c:4152
#38 g_main_context_iterate_unlocked.isra.0
(context=context@entry=0x7ba1c4000f00, block=block@entry=1,
dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217
#39 0x00007ba1d04abfc5 in g_main_context_iteration (context=0x7ba1c4000f00,
may_block=1) at ../glib/glib/gmain.c:4282
#40 0x00007ba1d13a2cbd in QEventDispatcherGlib::processEvents
(this=0x620120756f20, flags=...) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#41 0x00007ba1d114f01e in QEventLoop::processEvents (this=0x7ffe40833f70,
flags=...) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#42 QEventLoop::exec (this=0x7ffe40833f70, flags=...) at
/usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:182
#43 0x00007ba1d114934d in QCoreApplication::exec () at
/usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#44 0x00006200ea64d3f1 in main (argc=1, argv=0x7ffe40834408) at
/home/ratijas/kde/src/discover/discover/main.cpp:219

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to