<?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>508096</bug_id>
          
          <creation_ts>2025-08-11 02:23:06 +0000</creation_ts>
          <short_desc>After finishing editing a bundle file, Krita will not launch the next time you try to launch it</short_desc>
          <delta_ts>2026-01-15 14:53:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Resource Management</component>
          <version>nightly build (please specify the git hash!)</version>
          <rep_platform>Android</rep_platform>
          <op_sys>Android 14.x</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression, release_blocker</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="AppTest">xeses16388</reporter>
          <assigned_to name="Dmitry Kazakov">dimula73</assigned_to>
          <cc>dimula73</cc>
    
    <cc>halla</cc>
    
    <cc>info</cc>
    
    <cc>lynx.mw+kde</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/34c55c0bb3f458c79f23a2b70fa36595e241e9ab</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2446420</commentid>
    <comment_count>0</comment_count>
    <who name="AppTest">xeses16388</who>
    <bug_when>2025-08-11 02:23:06 +0000</bug_when>
    <thetext>SUMMARY
See title

STEPS TO REPRODUCE
1. Go to Settings, Manage Resource Libraries, Edit Bundle
2. Make a new version of your bundle file
3. Close Krita and restart it

OBSERVED RESULT

Krita won&apos;t start, and you get the error message:

&quot;Krita: Fatal error

Could not remove storage [bundle name] from the database

Krita will quit now.&quot;

Krita quits, and the same result will occur if you try to launch it again.

EXPECTED RESULT
Krita launches

SOFTWARE/OS VERSIONS
Android 16
Krita 5.3 nightly
git 3d98e69
arm64 apk</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2454436</commentid>
    <comment_count>1</comment_count>
    <who name="Lynx3d">lynx.mw+kde</who>
    <bug_when>2025-09-15 12:06:55 +0000</bug_when>
    <thetext>This issue seems to occur when a bundle is removed from the resource folder, editing a bundle is just one way to create that situation.
It is also not OS specific, as it happens here on Linux, 5.3.0-prealpha (git 6fd2d50)

In console, I get an additional error message like this:

ERROR: deleteStorage: Failed to execute sql from file
       file: inline://delete_current_resources_for_storage
       statement: 0
       error: FOREIGN KEY constraint failed Unable to fetch row
(&quot;Could not remove storage /home/lynx/.local/share/krita/[resource_bundle_name].bundle from the database&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2460995</commentid>
    <comment_count>2</comment_count>
    <who name="Wolfgang Baer">info</who>
    <bug_when>2025-10-10 16:49:04 +0000</bug_when>
    <thetext>maybe related but observed on Windows:
https://krita-artists.org/t/5-3-new-edit-bundle-function-ux-irritating/143748</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2485191</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-01-15 14:17:59 +0000</bug_when>
    <thetext>Okay, the problem happens because when you remove the bundle, some external resources may still be linked to that. And removing the bundle will make them broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2485206</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-01-15 14:53:39 +0000</bug_when>
    <thetext>Git commit 34c55c0bb3f458c79f23a2b70fa36595e241e9ab by Dmitry Kazakov.
Committed on 15/01/2026 at 14:53.
Pushed by dkazakov into branch &apos;master&apos;.

Fix deletion of a resource storage

We should also remove all resource-tag links before the removal
of actual resources. FOREIGN KEY constraint tracks it down
correctly.

M  +7    -0    libs/resources/KisResourceCacheDb.cpp
M  +1    -0    libs/resources/sql.qrc
A  +8    -0    libs/resources/sql/delete_resource_tags_for_storage_indirect.sql

https://invent.kde.org/graphics/krita/-/commit/34c55c0bb3f458c79f23a2b70fa36595e241e9ab</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>