Bug 388570

Summary: Some predefined brush tips show "(I18N_EMPTY_MESSAGE)" as name
Product: [Applications] krita Reporter: Nicholas LaPointe <nicholaslapointe8>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: freebox64, halla
Priority: NOR Keywords: investigated
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: (Video example)

Description Nicholas LaPointe 2018-01-05 14:33:29 UTC
Inside of the brush editor, the names for a small number of the default predefined brush tips ("3_texture", for example) will show up as "(I18N_EMPTY_MESSAGE)" when selected. The names in their tooltips are correct.
This can be seen in https://twitter.com/Krita_Painting/status/947073625416495104

I don't know the responsible commit at the moment, but it seems to work back at e3f59711da4f6edc17f14ee8d16d286c1cdfe0e6 (the newest, non-current build I have, although I may have broken it in some fashion).
Comment 1 Halla Rempt 2018-01-17 13:55:36 UTC
Hm, I cannot find any brush tip like this. Which distribution and which version of KDE Frameworks is this with?
Comment 2 mvowada 2018-01-17 22:20:48 UTC
Created attachment 109956 [details]
(Video example)

(Krita 4.0.0-beta1.1.appimage - Ubuntu 14.04)

In my case the names of those same tips do not appear at all (see video). 
(Confirming)
Comment 3 Halla Rempt 2018-01-18 14:09:33 UTC
I also see brushes without names. Plus, when the name is longer than the previous name, the brush editor grows a bit, and the other way around, it shrinks.
Comment 4 Nicholas LaPointe 2018-01-18 23:13:36 UTC
I tried the AppImage on another computer and got nameless brushes as well.

I also noticed that when using either the AppImage or my build where I see "(I18N_EMPTY_MESSAGE)", the message "Trying to convert empty KLocalizedString to QString." is printed to the terminal whenever an affected tip is selected.

(In reply to Boudewijn Rempt from comment #1)
> Hm, I cannot find any brush tip like this. Which distribution and which
> version of KDE Frameworks is this with?
Kubuntu 16.04.3, KDE Frameworks 5.18.0
Comment 5 Halla Rempt 2018-01-24 13:12:23 UTC
The nameless brushes are the ones that assert:

SAFE ASSERT (krita): "valid()" in file /home/boud/dev/krita/libs/brush/kis_brush.cpp, line 481
Comment 6 Halla Rempt 2018-01-30 09:38:53 UTC
And they cannot be used to paint with.
Comment 7 Halla Rempt 2018-01-30 10:13:55 UTC
Git commit 99c07ee6b5a4760ca1bbc81d0ab72afbdfd8ec54 by Boudewijn Rempt.
Committed on 30/01/2018 at 10:13.
Pushed by rempt into branch 'master'.

Set the name and validity of a brush when copying it

M  +0    -2    libs/brush/kis_gbr_brush.cpp
M  +0    -1    libs/brush/kis_png_brush.cpp
M  +7    -0    libs/brush/kis_scaling_size_brush.cpp
M  +1    -0    libs/brush/kis_scaling_size_brush.h
M  +7    -3    libs/brush/kis_svg_brush.cpp
M  +1    -0    libs/pigment/resources/KoResource.cpp

https://commits.kde.org/krita/99c07ee6b5a4760ca1bbc81d0ab72afbdfd8ec54