Bug 506086 - [5.3.0 Nightly] Safe Assert Warning containing "KisResourceCacheDb.cpp, line 2085" with 'Noto-serif Hebrew' font from Debian
Summary: [5.3.0 Nightly] Safe Assert Warning containing "KisResourceCacheDb.cpp, line ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-24 05:19 UTC by Protoniv
Modified: 2026-03-16 15:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Netosan-serif Hebrew font family from debian (369.47 KB, application/gzip)
2026-03-16 00:59 UTC, Protoniv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Protoniv 2025-06-24 05:19:58 UTC
SUMMARY

When krita startup, loading cache font database, it will popup safe assert warning which mentioned "KisResourceCacheDb.cpp, line 2085", ignore it will proceed same warning (loading another font in the same family), until krita start normally. After welcome screen, everything seems to work as expect.

Tested in Debian 12/13, still can reproduce in krita-5.3.0-prealpha-88295ba7c3
Cannot trigger the warning in OpenSUSE 15.6 (not have this certain font family)

Here is the output launching from terminal.
```
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2474 "fontregistry" "fontregistry" "Noto Serif Hebrew SemBd" "Noto Serif Hebrew SemBd" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2475 "fontregistry" "fontregistry" "Noto Serif Hebrew ExtLt" "Noto Serif Hebrew ExtLt" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2476 "fontregistry" "fontregistry" "Noto Serif Hebrew Thin" "Noto Serif Hebrew Thin" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2477 "fontregistry" "fontregistry" "Noto Serif Hebrew ExtBd" "Noto Serif Hebrew ExtBd" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2478 "fontregistry" "fontregistry" "Noto Serif Hebrew Blk" "Noto Serif Hebrew Blk" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2479 "fontregistry" "fontregistry" "Noto Serif Hebrew Light" "Noto Serif Hebrew Light" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085
Could not execute addResourceVersionImpl statement QSqlError("19", "Unable to fetch row", "UNIQUE constraint failed: versioned_resources.resource_id, versioned_resources.storage_id, versioned_resources.version") 2480 "fontregistry" "fontregistry" "Noto Serif Hebrew Med" "Noto Serif Hebrew Med" version 0
SAFE ASSERT (krita): "result" in file /builds/graphics/krita/libs/resources/KisResourceCacheDb.cpp, line 2085

```

STEPS TO REPRODUCE
1. Debian 12/13 with "font-noto-core" package from repo, start krita to build font resource cache
2. Close krita, start again, safe assert warning appears

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.12.32-amd64 (64-bit)

ADDITIONAL INFORMATION

Disable the font family "Noto-serif Hebrew" in Debian 12/13, the safe assert warning will disappear.
The font files installed in Debian seems a little different from google website, but I didn't test google version yet.
Comment 1 Protoniv 2025-09-12 12:19:24 UTC
Cannot reproduce the issue in newer build after August 31st, closing the ticket.
Comment 2 Protoniv 2025-11-21 02:32:19 UTC
The issue appears again after commit 5605f408 `Revert "Remove the FontFamily resource loader for now."`
tested on 
krita-5.3.0-prealpha-5605f40865-x86_64.AppImage (after the commit)
krita-5.3.0-prealpha-7e99c06256-x86_64.AppImage (before the commit)
Comment 3 wolthera 2026-03-10 11:11:42 UTC
Hi, I am going to need the Noto Hebrew Serif font that is on your system if I want to debug this. I cannot reproduce with my local noto hebrew, so it might just be that particular file.
Comment 4 Protoniv 2026-03-16 00:59:26 UTC
Created attachment 190698 [details]
Netosan-serif Hebrew font family from debian

Hi, Wolthera! Sorry for the late reply!
I've managed to extract the font family from debian package and can reproduce the issue, but not sure which font trigger the bug, so I pack all fonts into it.
Comment 5 wolthera 2026-03-16 09:37:46 UTC
I cannot reproduce this :(

What I am seeing is that the files you sent have issues with the family-names... Maybe somehow there's a duplicate set of noto hebrew serif fonts somewhere?
Comment 6 wolthera 2026-03-16 09:55:22 UTC
Ah, installing fonts-noto-extra on kubuntu does give me the problem in question
Comment 7 wolthera 2026-03-16 13:27:58 UTC
Git commit ca312d9b40b7f6c1b4acaf72f22258c5839f53a8 by Wolthera van Hövell tot Westerflier.
Committed on 16/03/2026 at 12:56.
Pushed by woltherav into branch 'master'.

Try a little harder to get a valid datetime for a font file.

M  +8    -0    libs/flake/text/KoFFWWSConverter.cpp

https://invent.kde.org/graphics/krita/-/commit/ca312d9b40b7f6c1b4acaf72f22258c5839f53a8
Comment 8 wolthera 2026-03-16 13:28:06 UTC
Git commit 7539ab6555a99ba300f1ac765bc902b88b7f9270 by Wolthera van Hövell tot Westerflier.
Committed on 16/03/2026 at 12:50.
Pushed by woltherav into branch 'master'.

Handle WWS bit in font OS/2 table better.

The first now tries to prioritize the typographic family when there's no regular
font family, which should work better for Noto fonts.

M  +21   -3    libs/flake/text/KoFFWWSConverter.cpp

https://invent.kde.org/graphics/krita/-/commit/7539ab6555a99ba300f1ac765bc902b88b7f9270
Comment 9 wolthera 2026-03-16 13:29:56 UTC
Git commit 64c6e77de220c94e1b6953fe0c2419ba9c45e5a8 by Wolthera van Hövell.
Committed on 16/03/2026 at 13:29.
Pushed by woltherav into branch 'krita/6.0'.

Handle WWS bit in font OS/2 table better.

The first now tries to prioritize the typographic family when there's no regular
font family, which should work better for Noto fonts.


(cherry picked from commit 7539ab6555a99ba300f1ac765bc902b88b7f9270)

Co-authored-by: Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>

M  +21   -3    libs/flake/text/KoFFWWSConverter.cpp

https://invent.kde.org/graphics/krita/-/commit/64c6e77de220c94e1b6953fe0c2419ba9c45e5a8
Comment 10 wolthera 2026-03-16 13:30:14 UTC
Git commit 41295741ff03a0110403ccc5cbcb3145d2a40503 by Wolthera van Hövell.
Committed on 16/03/2026 at 13:30.
Pushed by woltherav into branch 'krita/6.0'.

Try a little harder to get a valid datetime for a font file.


(cherry picked from commit ca312d9b40b7f6c1b4acaf72f22258c5839f53a8)

Co-authored-by: Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>

M  +8    -0    libs/flake/text/KoFFWWSConverter.cpp

https://invent.kde.org/graphics/krita/-/commit/41295741ff03a0110403ccc5cbcb3145d2a40503
Comment 11 wolthera 2026-03-16 13:36:18 UTC
Ok, not 100% sure yet this works, but I've tried to handle both the family sorting a bit better as well as the modification date (which is what I suspect caused the actual bug). I'll report back with more testing.

For what it's worth, I only got the bug when the fonts are installed via a package manager, which to me suggests file-date shenanigans.
Comment 12 wolthera 2026-03-16 14:07:16 UTC
Ok, I can't reproduce this anymore locally, so I am marking this as resolved.

Protoniv, don't hesitate to reopen this if you can still reproduce!
Comment 13 Protoniv 2026-03-16 15:17:57 UTC
(In reply to wolthera from comment #11)

> For what it's worth, I only got the bug when the fonts are installed via a
> package manager, which to me suggests file-date shenanigans.

Hi, Wolthera, thank you for the fast response!
Yes, the fonts are pre-installed in debian from `fonts-noto-extra` package, which might be the same source as kubuntu.
I can no longer reproduce the issue with 5.4.0-prealpha-ca312d9b40 build containing the fix.