Bug 412432

Summary: Krita crash when setting dx scale to negative value in particle brush preset
Product: [Applications] krita Reporter: nikola <nikola.knezevic.mne>
Component: Brush enginesAssignee: Tiar <tamtamy.tymona>
Status: RESOLVED FIXED    
Severity: crash CC: b_helton, ghevan, tamtamy.tymona
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Attachments: settings from step 3
crash backtrace

Description nikola 2019-09-29 01:17:33 UTC
Created attachment 122928 [details]
settings from step 3

STEPS TO REPRODUCE
1. open Edit brush settings docker
2. create particle brush
3. in Brush Size adjustments drag slider of dx scale to negative values

OBSERVED RESULT
slider accepts new value but Krita crash.


SOFTWARE/OS VERSIONS
Windows: 10 64 pro
Krita: 4.3.0-prealpha (git a94d1a8)
Comment 1 vanyossi 2019-09-29 02:01:50 UTC
Created attachment 122929 [details]
crash backtrace

Crash easily reproduced. Setting to confirmed
Comment 2 Tiar 2019-10-01 21:17:40 UTC
*** Bug 412521 has been marked as a duplicate of this bug. ***
Comment 3 Tiar 2019-10-02 00:13:08 UTC
Git commit 835ca2e4d5195a50b46a8d6c0e2c252983b877e6 by Agata Cacko.
Committed on 02/10/2019 at 00:12.
Pushed by tymond into branch 'master'.

Fix crash with negative dx in Particle Brush

This commit adds a check in particle brush
so it doesn't try to paint in locations near infinity.
Before this commit Krita would crash as soon as you
set up negative dx in Particle Brush engine since
it already tries to paint (because of preview) in infinite
positions.

M  +13   -2    plugins/paintops/particle/particle_brush.cpp

https://invent.kde.org/kde/krita/commit/835ca2e4d5195a50b46a8d6c0e2c252983b877e6
Comment 4 Tiar 2019-10-02 10:43:24 UTC
Git commit 342deb0f58359dca7db274cdcc937f7a093adc58 by Agata Cacko.
Committed on 02/10/2019 at 10:28.
Pushed by tymond into branch 'krita/4.2'.

Fix crash with negative dx in Particle Brush

This commit adds a check in particle brush
so it doesn't try to paint in locations near infinity.
Before this commit Krita would crash as soon as you
set up negative dx in Particle Brush engine since
it already tries to paint (because of preview) in infinite
positions.

M  +13   -2    plugins/paintops/particle/particle_brush.cpp

https://invent.kde.org/kde/krita/commit/342deb0f58359dca7db274cdcc937f7a093adc58