<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>463864</bug_id>
          
          <creation_ts>2023-01-05 07:17:26 +0000</creation_ts>
          <short_desc>Discover Crashes in ResultsStream::resourcesFound() when installing a Flatpak app</short_desc>
          <delta_ts>2024-12-20 19:15:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>Discover</product>
          <component>Flatpak Backend</component>
          <version>5.26.4</version>
          <rep_platform>Debian unstable</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=467027</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=495874</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>VHI</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Unknown">null</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>4wy78uwh</cc>
    
    <cc>abd.m.jawed</cc>
    
    <cc>aleixpol</cc>
    
    <cc>aronkvh</cc>
    
    <cc>brandan.yares</cc>
    
    <cc>calanoypatrick</cc>
    
    <cc>caseycattron</cc>
    
    <cc>cenay</cc>
    
    <cc>derwesermann</cc>
    
    <cc>dimeptr</cc>
    
    <cc>EBaisleyJr</cc>
    
    <cc>fabian</cc>
    
    <cc>jacob.skoog</cc>
    
    <cc>jalil.ghavidel</cc>
    
    <cc>jgrulich</cc>
    
    <cc>kde</cc>
    
    <cc>masdrubal65</cc>
    
    <cc>nate</cc>
    
    <cc>postix</cc>
    
    <cc>travier</cc>
    
    <cc>Trevorkiprop</cc>
    
    <cc>x123456789fy</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/discover/-/commit/cc38c6c3e19c15dce8fa0dd0de30c748c363eeb7</cf_commitlink>
          <cf_versionfixedin>6.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2193314</commentid>
    <comment_count>0</comment_count>
    <who name="Unknown">null</who>
    <bug_when>2023-01-05 07:17:26 +0000</bug_when>
    <thetext>Application: plasma-discover (5.26.4)

Qt Version: 5.15.7
Frameworks Version: 5.101.0
Operating System: Linux 6.0.0-6-amd64 x86_64
Windowing System: X11
Distribution: Debian GNU/Linux bookworm/sid
DrKonqi: 5.26.4 [KCrashBackend]

-- Information about the crash:
Everytime when I was installing a Flatpak app, Discover crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Discover (plasma-discover), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fc3a34e8abd in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fc3a5713db2 in ResultsStream::resourcesFound(QVector&lt;AbstractResource*&gt; const&amp;) () from /usr/lib/x86_64-linux-gnu/plasma-discover/libDiscoverCommon.so
#6  0x00007fc3640292f2 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/flatpak-backend.so
#7  0x00007fc3a34dd770 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fc3a4762f5e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007fc3a34b17c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fc3a34b4761 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fc3a350a1d3 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fc3a1d1e7a9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fc3a1d1ea38 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fc3a1d1eacc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007fc3a35098b6 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fc3a34b024b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fc3a34b83b6 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x000055b8d3460217 in ?? ()
#19 0x00007fc3a304618a in __libc_start_call_main (main=main@entry=0x55b8d345f920, argc=argc@entry=1, argv=argv@entry=0x7ffeabc84608) at ../sysdeps/nptl/libc_start_call_main.h:58
#20 0x00007fc3a3046245 in __libc_start_main_impl (main=0x55b8d345f920, argc=1, argv=0x7ffeabc84608, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7ffeabc845f8) at ../csu/libc-start.c:381
#21 0x000055b8d3460781 in ?? ()
[Inferior 1 (process 74930) detached]

The reporter indicates this bug may be a duplicate of or related to bug 460900, bug 462011.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195077</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-01-09 20:41:05 +0000</bug_when>
    <thetext>Thank you for the bug report! Unfortunately the backtrace is incomplete and missing debug symbols for the following lines that we need to figure out exactly what&apos;s going wrong:

&gt; #6  0x00007fc3640292f2 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/flatpak-backend.so

Could you please install debug symbols for Discover&apos;s Flatpak backend package, reproduce the crash, and attach a new symbolicated backtrace? See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Thanks again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200527</commentid>
    <comment_count>2</comment_count>
    <who name="Fabian Vogt">fabian</who>
    <bug_when>2023-01-22 09:39:33 +0000</bug_when>
    <thetext>This is probably the same use-after-free issue as I encountered and debugged in https://bugs.kde.org/show_bug.cgi?id=464517#c1 in 5.27 Beta.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2230521</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-05-15 19:11:14 +0000</bug_when>
    <thetext>*** Bug 466955 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2230523</commentid>
    <comment_count>4</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-05-15 19:11:17 +0000</bug_when>
    <thetext>*** Bug 467027 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2248024</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-08-22 20:58:25 +0000</bug_when>
    <thetext>*** Bug 473611 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2250714</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-09-05 21:00:08 +0000</bug_when>
    <thetext>*** Bug 474068 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2251586</commentid>
    <comment_count>7</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-09-07 22:00:20 +0000</bug_when>
    <thetext>*** Bug 472673 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2259405</commentid>
    <comment_count>8</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-10-16 19:48:27 +0000</bug_when>
    <thetext>*** Bug 475602 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2260779</commentid>
    <comment_count>9</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2023-10-23 10:25:32 +0000</bug_when>
    <thetext>Hit something in valgrind, it implies memory corruption in unrelated code

==35441== Thread 1:
==35441== Invalid read of size 8
==35441==    at 0x76C2875: get (qscopedpointer.h:112)
==35441==    by 0x76C2875: qGetPtrHelper&lt;QScopedPointer&lt;QObjectData, QScopedPointerDeleter&lt;QObjectData&gt; &gt; &gt; (qtclasshelpermacros.h:79)
==35441==    by 0x76C2875: d_func (qobject.h:95)
==35441==    by 0x76C2875: get (src/qtbase/src/corelib/kernel/qobject_p.h:153)
==35441==    by 0x76C2875: void doActivate&lt;false&gt;(QObject*, int, void**) (src/qtbase/src/corelib/kernel/qobject.cpp:3903)
==35441==    by 0x4A85CE2: ResultsStream::resourcesFound(QList&lt;StreamResult&gt; const&amp;) (moc_AbstractResourcesBackend.cpp:187)
==35441==    by 0x21D55041: FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2::operator()() const (src/kde/workspace/discover/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1630)
==35441==    by 0x21D54855: QtPrivate::FunctorCall&lt;QtPrivate::IndexesList&lt;&gt;, QtPrivate::List&lt;&gt;, void, FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2&gt;::call(FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2&amp;, void**) (qobjectdefs_impl.h:137)
==35441==    by 0x21D547F0: void QtPrivate::Functor&lt;FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2, 0&gt;::call&lt;QtPrivate::List&lt;&gt;, void&gt;(FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2&amp;, void*, void**) (qobjectdefs_impl.h:339)
==35441==    by 0x21D5473D: QtPrivate::QCallableObject&lt;FlatpakBackend::search(AbstractResourcesBackend::Filters const&amp;)::$_2, QtPrivate::List&lt;&gt;, void&gt;::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:522)
==35441==    by 0x76B76F6: QObject::event(QEvent*) (src/qtbase/src/corelib/kernel/qobject.cpp:1437)
==35441==    by 0x506B8A3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (src/qtbase/src/widgets/kernel/qapplication.cpp:3295)
==35441==    by 0x506C734: QApplication::notify(QObject*, QEvent*) (src/qtbase/src/widgets/kernel/qapplication.cpp:0)
==35441==    by 0x76717B2: QCoreApplication::notifyInternal2(QObject*, QEvent*) (src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1119)
==35441==    by 0x767284B: sendEvent (src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1537)
==35441==    by 0x767284B: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1899)
==35441==    by 0x78D6E02: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (src/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:243)
==35441==  Address 0x1f570f38 is 8 bytes inside a block of size 16 free&apos;d
==35441==    at 0x484412F: free (vg_replace_malloc.c:974)
==35441==    by 0x88501C6: g_datalist_clear (gdataset.c:277)
==35441==    by 0xB2BB05C: as_image_finalize (as-image.c:65)
==35441==    by 0xB3508B3: UnknownInlinedFun (gobject.c:3941)
==35441==    by 0xB3508B3: g_object_unref (gobject.c:3805)
==35441==    by 0x883849D: ptr_array_free (garray.c:1942)
==35441==    by 0xB2D3333: as_screenshot_finalize (as-screenshot.c:89)
==35441==    by 0xB3508B3: UnknownInlinedFun (gobject.c:3941)
==35441==    by 0xB3508B3: g_object_unref (gobject.c:3805)
==35441==    by 0x883849D: ptr_array_free (garray.c:1942)
==35441==    by 0xB2A73BF: as_component_finalize (as-component.c:491)
==35441==    by 0xB3508B3: UnknownInlinedFun (gobject.c:3941)
==35441==    by 0xB3508B3: g_object_unref (gobject.c:3805)
==35441==    by 0x84BBFFF: AppStream::ComponentData::~ComponentData() (component.cpp:91)
==35441==    by 0x84BC416: QSharedDataPointer&lt;AppStream::ComponentData&gt;::~QSharedDataPointer() (qshareddata.h:56)
==35441==  Block was alloc&apos;d at
==35441==    at 0x4841848: malloc (vg_replace_malloc.c:431)
==35441==    by 0x8879712: g_malloc (gmem.c:130)
==35441==    by 0xB342B37: g_object_notify_queue_freeze.lto_priv.0 (gobject.c:303)
==35441==    by 0xB3507D6: UnknownInlinedFun (gobject.c:3890)
==35441==    by 0xB3507D6: g_object_unref (gobject.c:3805)
==35441==    by 0x883849D: ptr_array_free (garray.c:1942)
==35441==    by 0xB2D3333: as_screenshot_finalize (as-screenshot.c:89)
==35441==    by 0xB3508B3: UnknownInlinedFun (gobject.c:3941)
==35441==    by 0xB3508B3: g_object_unref (gobject.c:3805)
==35441==    by 0x883849D: ptr_array_free (garray.c:1942)
==35441==    by 0xB2A73BF: as_component_finalize (as-component.c:491)
==35441==    by 0xB3508B3: UnknownInlinedFun (gobject.c:3941)
==35441==    by 0xB3508B3: g_object_unref (gobject.c:3805)
==35441==    by 0x84BBFFF: AppStream::ComponentData::~ComponentData() (component.cpp:91)
==35441==    by 0x84BC416: QSharedDataPointer&lt;AppStream::ComponentData&gt;::~QSharedDataPointer() (qshareddata.h:56)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2260784</commentid>
    <comment_count>10</comment_count>
    <who name="Fabian Vogt">fabian</who>
    <bug_when>2023-10-23 11:17:10 +0000</bug_when>
    <thetext>(In reply to David Edmundson from comment #9)
&gt; Hit something in valgrind, it implies memory corruption in unrelated code

See comment #2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2261060</commentid>
    <comment_count>11</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2023-10-24 08:05:27 +0000</bug_when>
    <thetext>Yeah, I found other instances of the network cache being 0 for the same root cause. I&apos;ve now plugged all of them and have local asserts on my Qt builds.

I&apos;ll backport those fixes, and we&apos;ll consider this closed until new information shows otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2261061</commentid>
    <comment_count>12</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-10-24 08:07:19 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/675</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2266046</commentid>
    <comment_count>13</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-11-15 20:49:58 +0000</bug_when>
    <thetext>*** Bug 476999 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2273352</commentid>
    <comment_count>14</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-12-12 17:19:12 +0000</bug_when>
    <thetext>*** Bug 478394 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2275511</commentid>
    <comment_count>15</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-12-21 01:23:23 +0000</bug_when>
    <thetext>*** Bug 478757 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2278258</commentid>
    <comment_count>16</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2024-01-05 08:59:16 +0000</bug_when>
    <thetext>*** Bug 479421 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2286613</commentid>
    <comment_count>17</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-02-06 21:16:38 +0000</bug_when>
    <thetext>*** Bug 480830 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2286779</commentid>
    <comment_count>18</comment_count>
    <who name="Fabian Vogt">fabian</who>
    <bug_when>2024-02-07 07:45:20 +0000</bug_when>
    <thetext>(In reply to David Edmundson from comment #11)
&gt; I&apos;ll backport those fixes, and we&apos;ll consider this closed until new
&gt; information shows otherwise.

I think all those new duplicates require a reopening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2289419</commentid>
    <comment_count>19</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-02-16 15:30:18 +0000</bug_when>
    <thetext>This should be fixed with https://invent.kde.org/plasma/discover/-/merge_requests/751. Unfortunately it was a large refactor and had to be merged for Plasma 6.1 only, not 6.0.

We&apos;re also investigating targeted fixes we can make for 6.0, but no guarantees on that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2293211</commentid>
    <comment_count>20</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-03-01 06:43:03 +0000</bug_when>
    <thetext>*** Bug 482073 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2332825</commentid>
    <comment_count>21</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-06-27 20:05:32 +0000</bug_when>
    <thetext>*** Bug 489305 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2352475</commentid>
    <comment_count>22</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-09-09 06:50:18 +0000</bug_when>
    <thetext>*** Bug 492767 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2383021</commentid>
    <comment_count>23</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-12-20 19:15:02 +0000</bug_when>
    <thetext>*** Bug 497702 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>