https://bugs.kde.org/show_bug.cgi?id=429619

            Bug ID: 429619
           Summary: Clicking "Add Preset" twice causes a crash in
                    KisCanvasResourceProvider
           Product: krita
           Version: git master
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Brush engines
          Assignee: krita-bugs-n...@kde.org
          Reporter: dconner....@gmail.com
  Target Milestone: ---

SUMMARY

I believe the cause is an uncaught null pointer.

kis_canvas_resource_provider.cpp:178 

```
Q_ASSERT(preset->valid());
```

STEPS TO REPRODUCE
1. Open/create a new document in Krita
2. Open the preset/brush editor
3. Click the (<) button, then click the (+) button to begin working on a new
brush. I had the "Pixel Engine selected"
4. Draw something on the scratchpad to change the state of the new preset.
5. Toggle the widget's focus state (e.g. click "auto" then "pre-defined" then
"auto")
6. Now an "invalid preset" indicator should be shown. If so, when you click the
(+) to add a new brush preset, Krita will crash.

For some reason if I am debugging the app in CLion, then this crash will kill
my KDE/Plasma session except for the mouse. I must then restart. Regardless, I
triggered the bug multiple times. This does not happen if I am not debugging.

The CLion debugger did flag the line causing the problem.

I tried submitting a report in the crash response dialog. I believe this was
Dr. Konqi, but I did not find a corresponding bug in bugs.kde.org.


OBSERVED RESULT

Krita crashes.

EXPECTED RESULT

An error message halting the Q_ASSERT check before it blows up or a teardown of
the new (but invalid) brush preset.

SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
Linux/KDE Plasma: Garuda Linux (arch) with linux 5.9.10-zen1-1-zen
(available in About System)
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to