Bug 447692

Summary: The Chinese brush bundle cannot be imported correctly under Linux.
Product: [Applications] krita Reporter: Eranthis stellata Maxim <1012468643>
Component: Resource ManagementAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: dimula73, halla, tomtomtomreportingin
Priority: NOR    
Version First Reported In: 5.0.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The brush bundle that triggered the bug.

Description Eranthis stellata Maxim 2021-12-30 12:52:10 UTC
Created attachment 144963 [details]
The brush bundle that triggered the bug.

SUMMARY
The Chinese brush bundle cannot be imported correctly under Linux.

I made a brush bundle in krita5.0.0 (windows10 simplified Chinese).
After importing in krita-5.0.0-x86_64.appimage, those brushes cannot be seen, but the tags are visible. 


STEPS TO REPRODUCE
1. Download "菟葵自用.bundle".
2. Use krita-5.0.0-x86_64.appimage to import it. 

OBSERVED RESULT

Only the newly-added tags are visible, but the newly-added brushes are not visible. 

EXPECTED RESULT

Import the brush bundle normally.
There are 8 brushes under the tabs "基本_菟葵" and "菟葵".
Comment 2 Dmitry Kazakov 2022-01-08 14:33:01 UTC
I can partially reproduce the problem on Windows. After importing the bundle:

1) Resource Manager shows 8 brushes under both tags of the bundle
2) The preset chooser shows only 3 brushes under tag "基本_菟葵" and zero brushes under tag "菟葵"
3) All 8 brushes are available under "All" tag
4) Visual inspection of the database doesn't show any issues. All tag-resource links look correct there. 

Most probably, the problem is in the string comparison function in the filtering routine in KisTagResourceModel.
Comment 3 Halla Rempt 2022-01-08 15:06:41 UTC
That's something different, because importing the bundle using the appimage gives this on the commandline:

Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-勾线-0方.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-勾线-石墨流量.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-勾线-铅笔质感.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-压力变化炭笔.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-密树枝炭笔.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-方头笔.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-炭笔刻画.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-炭笔大涂抹.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-炭笔颗粒.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-塑造-神笔53流量.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-形状-毛发替代.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-形状-色块小三角.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-混合-柔和.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-背景-前后背景.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-背景-头发肌理.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-背景-手绘笔触(粗).kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-背景-手绘笔触(细).kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-过渡-头发丝.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b) Odzuki-过渡-高斯.kpp" "/home/halla/.local/share/krita/Odzuki3.0.bundle"

And the resources aren't the database
Comment 4 Eranthis stellata Maxim 2022-01-08 15:30:16 UTC
(In reply to Dmitry Kazakov from comment #2)
> I can partially reproduce the problem on Windows. After importing the bundle:
> 
> 1) Resource Manager shows 8 brushes under both tags of the bundle
> 2) The preset chooser shows only 3 brushes under tag "基本_菟葵" and zero
> brushes under tag "菟葵"
> 3) All 8 brushes are available under "All" tag
> 4) Visual inspection of the database doesn't show any issues. All
> tag-resource links look correct there. 
> 
> Most probably, the problem is in the string comparison function in the
> filtering routine in KisTagResourceModel.

If you check it immediately after loading the Chinese bundle under Windows, the situation you said will appear.

But after restarting krita it loads normally.
Comment 5 tomtomtomreportingin 2022-06-21 16:04:39 UTC
Is this still an issue in 5.1? Odzuki brushes from https://krita-artists.org/t/photoshop-ps-common-brush-transfer-with-original-brush/34694/16 seem to load nowadays.