Bug 445922

Summary: when I try to use layers styles, espetialy the one that give a shadow ( called ''ombre porté'' in french), krita crash. I tried it on nightly and beta builds using all the most recent relese and it still does it
Product: [Applications] krita Reporter: Sara <saramlemire>
Component: layer stylesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: crash CC: ahab.greybeard, dimula73, freebox64, oktopuse
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: small video that show the crash
the log
the actual crash log

Description Sara 2021-11-22 15:22:06 UTC
SUMMARY
***
the beta and nightly builed carsh when trying to use layer styles


STEPS TO REPRODUCE
1. open krita and open a new file 
2. draw something on a second trensparent layer
3. right clic on the layer you drew on, select layer style
4. click on "ombre porté'' (maybe its called drop shadow in english, im not sure)
5. krita should crash and close down. It seem to be faster when the picture is bigger but it still does it whit something as small as 400x500

OBSERVED RESULT
krita freeze and close down

EXPECTED RESULT
having a drop shadow under the drawn line on the layer  where the style was activated

SOFTWARE/OS VERSIONS
Windows: windows 10 on a surface go

ADDITIONAL INFORMATION
it works as intended on krita 4.4.8
Comment 1 Ahab Greybeard 2021-11-26 18:51:37 UTC
@Sara Using the 5.0.0-beta2 and Nov26 5.1.0-prealpha (git 4a272ff) appimages on Debian 10, I don't see any problem when using the 'Drop Shadow' or 'Inner Shadow' layer styles.

For clarification, can you attach a screenshot of the Layer Styles window, with the style selected so as to show the options.?

Also, can you find and post the crash log associated with this event?
Comment 2 Ahab Greybeard 2021-11-26 20:52:37 UTC
@Sara Please respond by using the Additional Comments section of the bug reporting system, not by using an email address.
You can add files as Attachments using the 'Add an attachment' link which is above the Additional Comments box.

This will allow other people (especially the developers) to be sent a notification and to see the information that you provide.
Comment 3 Sara 2021-11-27 13:37:26 UTC
Created attachment 144000 [details]
small video that show the crash
Comment 4 Sara 2021-11-27 13:38:10 UTC
Created attachment 144001 [details]
the log
Comment 5 Ahab Greybeard 2021-11-27 15:29:05 UTC
@Sara I'm unable to reproduce this on Windows 10.

The log that you've attached is the session log, not the crash log.

The crash log should be at --/AppData/Local/kritacrash.log
Please attach that if you can find it.
I'll set this report back to Reported and hope someone else can have a look at it.
Comment 6 Sara 2021-11-27 16:44:04 UTC
Created attachment 144004 [details]
the actual crash log
Comment 7 Dmitry Kazakov 2021-12-16 10:20:55 UTC
Hi, Sara!

Could you please if you can still get this crash with Krita 5.0 Beta 5? I have fixed a few related issues in the layer styles recently, so I have a feeling that this bug should have been fixed as well. 

Here is the link:
https://krita.org/en/item/krita-5-0-0-beta-5-released/
Comment 8 Bug Janitor Service 2021-12-31 04:35:02 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Sara 2021-12-31 17:14:37 UTC
Somehow I got it fixed. I did a fresh install and deleted all of the file in Appdata/krita  and it worked after. I backed all the things Iwanted to keep in an other folder and made a bundle of my stuff befor deleting everything.
Comment 10 Bug Janitor Service 2022-01-01 04:35:11 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 11 mvowada 2022-01-02 09:21:40 UTC
Hi Sara, glad the issue has been fixed by devs. 
I'm going to close this report as "fixed" for now, feel free to reopen it in case, ok?
Thanks for reporting
Comment 12 Sara 2022-01-06 03:37:50 UTC
Well it worked for a while but now its doing it again... I do not know what to try anymore :\
Comment 13 mvowada 2022-01-06 10:36:06 UTC
Hi Sara, 

does the crash happen again without having imported your previously saved resources? (you wrote "I backed all the things Iwanted to keep in an other folder and made a bundle of my stuff befor deleting everything")

(There are some compatibility issues between version 4 and 5 https://krita.org/en/krita-5-0-release-notes/)
Comment 14 Sara 2022-01-06 21:15:44 UTC
(In reply to mvowada from comment #13)
> Hi Sara, 
> 
> does the crash happen again without having imported your previously saved
> resources? (you wrote "I backed all the things Iwanted to keep in an other
> folder and made a bundle of my stuff befor deleting everything")
> 
> (There are some compatibility issues between version 4 and 5
> https://krita.org/en/krita-5-0-release-notes/)


It seem to be working befor I imported my saved resources. But it keept working after I imported them too.
I'm starting to think it as something to do with my resources still but what I observed is that all my things work until I start creating new brushes. But I could be wrong, I did not test this that much because I need my brushes to work :/ (I make DnD brush set to help my boyfriend create map for his game on tableflop)
Comment 15 Sara 2022-01-06 21:19:03 UTC
(In reply to Sara from comment #14)
> (In reply to mvowada from comment #13)
> > Hi Sara, 
> > 
> > does the crash happen again without having imported your previously saved
> > resources? (you wrote "I backed all the things Iwanted to keep in an other
> > folder and made a bundle of my stuff befor deleting everything")
> > 
> > (There are some compatibility issues between version 4 and 5
> > https://krita.org/en/krita-5-0-release-notes/)
> 
> 
> It seem to be working befor I imported my saved resources. But it keept
> working after I imported them too.
> I'm starting to think it as something to do with my resources still but what
> I observed is that all my things work until I start creating new brushes.
> But I could be wrong, I did not test this that much because I need my
> brushes to work :/ (I make DnD brush set to help my boyfriend create map for
> his game on tableflop)

''tableplop'' not ''tableflop''
Comment 16 Dmitry Kazakov 2022-01-07 12:53:22 UTC
Hi, Sara!

Do you have any patterns imported into Krita, perhaps in some unusual formats?

There seem to be two weird patterns in your resource folder, could you share them with me? Either in this bug or privately via mail (dimula73 at gmail dot com):

* patterns/krita_AjsiFp.pat
* patterns/krita_fpTNav.pat

Could you also share your resources database file? It should be placed in `%appdata%\krita\resourcecache.sqlite`

The reason of the crash is that the
Comment 17 Dmitry Kazakov 2022-01-07 13:12:51 UTC
Okay, I can reproduce the issue it seems. Here are the steps to reproduce:

1) In the global pattern chooser create a new tag, don't add any patterns to that, activate the tag
2) See that the pattern selector doesn't have a any resources in it
3) Open the Layer Styles dialog. Click on the bevel style. See the crash.
Comment 18 Bug Janitor Service 2022-01-07 13:46:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1287
Comment 19 Sara 2022-01-09 14:11:25 UTC
(In reply to Dmitry Kazakov from comment #16)
> Hi, Sara!
> 
> Do you have any patterns imported into Krita, perhaps in some unusual
> formats?
> 
> There seem to be two weird patterns in your resource folder, could you share
> them with me? Either in this bug or privately via mail (dimula73 at gmail
> dot com):
> 
> * patterns/krita_AjsiFp.pat
> * patterns/krita_fpTNav.pat
> 
> Could you also share your resources database file? It should be placed in
> `%appdata%\krita\resourcecache.sqlite`
> 
> The reason of the crash is that the

I'll e-mail a bundle with my stuff and the file since they are too heavy for the website, hope it will help
Comment 20 Sara 2022-01-26 18:41:47 UTC
anything new since?
Comment 21 Dmitry Kazakov 2022-02-09 14:00:52 UTC
Git commit f23f9a6d990ee978803deb3e3dcaa1e482b1f9af by Dmitry Kazakov.
Committed on 09/02/2022 at 14:00.
Pushed by dkazakov into branch 'master'.

Fix a crash when opening LS dialog with all patterns filtered-out

If the currently (globally) active tag filters out all the resources,
then the selectors may fail to activate a resource from the user's
preset/style and end up returning a null pointer.

This patch just moves the concept of a "hidden" selection from
KisResourceItemChooser to KisPatternChooser.

Steps to reproduce:

1) In the global pattern chooser create a new tag, don't add any patterns to that, activate the tag
2) See that the pattern selector doesn't have a any resources in it
3) Open the Layer Styles dialog. Click on the bevel style. See the crash.

M  +3    -3    libs/ui/dialogs/kis_dlg_layer_style.cpp
M  +6    -3    libs/ui/widgets/kis_pattern_chooser.cc
M  +1    -1    libs/ui/widgets/kis_pattern_chooser.h
M  +4    -3    plugins/generators/pattern/kis_wdg_pattern.cpp
M  +3    -3    plugins/paintops/libpaintop/kis_texture_option.cpp

https://invent.kde.org/graphics/krita/commit/f23f9a6d990ee978803deb3e3dcaa1e482b1f9af
Comment 22 Sara 2022-02-23 05:31:16 UTC
just downloaded the latest nightly build and now everything seem to work juste fine :)
Comment 23 Dmitry Kazakov 2022-02-23 08:49:37 UTC
Git commit 2153baf0a9762b3a56391dac76459ef4853f76e5 by Dmitry Kazakov.
Committed on 23/02/2022 at 08:48.
Pushed by dkazakov into branch 'krita/5.0'.

Fix a crash when opening LS dialog with all patterns filtered-out

If the currently (globally) active tag filters out all the resources,
then the selectors may fail to activate a resource from the user's
preset/style and end up returning a null pointer.

This patch just moves the concept of a "hidden" selection from
KisResourceItemChooser to KisPatternChooser.

Steps to reproduce:

1) In the global pattern chooser create a new tag, don't add any patterns to that, activate the tag
2) See that the pattern selector doesn't have a any resources in it
3) Open the Layer Styles dialog. Click on the bevel style. See the crash.

M  +3    -3    libs/ui/dialogs/kis_dlg_layer_style.cpp
M  +6    -3    libs/ui/widgets/kis_pattern_chooser.cc
M  +1    -1    libs/ui/widgets/kis_pattern_chooser.h
M  +4    -3    plugins/generators/pattern/kis_wdg_pattern.cpp
M  +3    -3    plugins/paintops/libpaintop/kis_texture_option.cpp

https://invent.kde.org/graphics/krita/commit/2153baf0a9762b3a56391dac76459ef4853f76e5
Comment 24 Dmitry Kazakov 2022-02-28 13:50:33 UTC
*** Bug 448296 has been marked as a duplicate of this bug. ***