Bug 344437 - Some brushes create NAN colors in 16bit floating point
Summary: Some brushes create NAN colors in 16bit floating point
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color models (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-22 00:19 UTC by wolthera
Modified: 2018-10-09 11:44 UTC (History)
3 users (show)

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


Attachments
Nan colours are the pixelly black ones to the right. (3.23 MB, application/x-krita)
2015-02-22 00:20 UTC, wolthera
Details
This brush creates nan-colours at it's start... (11.59 KB, image/png)
2015-02-22 00:23 UTC, wolthera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wolthera 2015-02-22 00:19:37 UTC
Uhm... so, this is a thing I managed to do...

Reproducible: Always

Steps to Reproduce:
1. make a 16bit float krita file
2. Use either a) gaussian blur on objects, or b) the brush I will attach.
3. Gaussian blur will result in a black blobby mess that while reported as black, doesn't actually act like black(smudge it)
Comment 1 wolthera 2015-02-22 00:20:49 UTC
Created attachment 91207 [details]
Nan colours are the pixelly black ones to the right.
Comment 2 wolthera 2015-02-22 00:23:05 UTC
Created attachment 91208 [details]
This brush creates nan-colours at it's start...
Comment 3 romuluspb 2015-04-17 20:34:23 UTC
I was able to go around the problem by using some specific brushes from shadow system:

Hatch_cross_small
Hatch_diag_fat
Hatch_diag_S

appear to sane the pixels, tried working in the area again and apparently is all ok
Comment 4 Halla Rempt 2015-04-18 16:00:38 UTC
Hah, that probably means that the hatch brush uses 8 bit colors internally... Not good!
Comment 5 joupent 2017-12-11 16:10:22 UTC
Git commit 2f888b32d70f91a206addaf43a2eea94d1b26909 by Jouni Pentikäinen.
Committed on 11/12/2017 at 16:09.
Pushed by jounip into branch 'master'.

Fix NaN values from hairy brushes

A hairy brush with ink deplation enabled for opacity, without
weights, would use unitialized data from Bristle::m_inkAmount
which would later get converted from double to float.

Bristle members are now always initialized, and intermediary
values clamped to correct range.

M  +6    -19   plugins/paintops/hairy/bristle.cpp
M  +9    -9    plugins/paintops/hairy/bristle.h
M  +6    -7    plugins/paintops/hairy/hairy_brush.cpp

https://commits.kde.org/krita/2f888b32d70f91a206addaf43a2eea94d1b26909
Comment 6 joupent 2018-10-09 11:44:51 UTC
Since there have been no new sightings of this bug, I can only assume the fix to the hairy brushes has resolved it.