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

            Bug ID: 529249
           Summary: Memory leak from filter engine brushes with specific
                    filters every time a paint layer is made active and on
                    every brush pick
    Classification: Applications
           Product: krita
      Version First 5.3.4.1
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Brush engines
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 198758
  --> https://bugs.kde.org/attachment.cgi?id=198758&action=edit
Behavior of Method 2 of Steps to Reproduce

DESCRIPTION
Problematic filters:
- Levels
- Color adjustment
- Cross-channel color adjustment

While a filter engine brush with the filter as one of the above is selected,
switching the active layer to a non-empty paint layer is slower and leaks
memory (apparently with size similar to the memory used by that layer) that is
only released when the entire application closes.
Selecting a filter engine brush with a problematic filter when the active layer
is a non-empty paint layer also causes the same leak.
No changes in behavior when testing in Krita Plus
(krita-5.3.5-prealpha-cbd4357b84).

STEPS TO REPRODUCE
-Method 1:
1. Open or create a document in Krita
2. Ensure there's at least 2 layers, with at least one being a paint layer
3. Ensure at least one paint layer has content (preferably with a large content
size for easy visualization of the memory usage growth)
4. Ensure a filter engine brush with 'levels' as the filter is available
5. With the filter brush selected, switch the active layer between a paint
layer with content and any other layer

-Method 2:
1. Open or create a document in Krita
2. Ensure the active layer is a paint layer with content (preferably with a
large content size for easy visualization of the memory usage growth)
3. Ensure a filter engine brush with 'levels' as the filter is available
4. Switch between the filter brush and any other brush

OBSERVED RESULT
Observing the application's memory usage, the amount grows every time a
non-empty paint layer is made the active one, and every time the filter brush
is selected when a non-empty paint layer is the active one. The growth appears
to be proportional, if not equal, to the amount of memory the paint layer uses.
The memory consumed appears to never be released while the application is
running.

EXPECTED RESULT
Low or no memory usage increase when selecting a filter brush or switching
active layers with a filter brush active, or at least the later release of that
memory. 

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.8.3
KDE Frameworks Version: 6.32.0
Qt Version: 6.12.0

ADDITIONAL INFORMATION
CPU: Intel® Core™ i5-5200U
GPU: Intel® HD Graphics 5500
Kernel version: 7.3.4-zen2-2-zen (64-bit)

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

Reply via email to