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

            Bug ID: 496736
           Summary: KWin X11 memory leak after exiting a program written
                    with SDL
    Classification: Plasma
           Product: kwin
           Version: 6.2.3
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: generic-crash
          Assignee: kwin-bugs-n...@kde.org
          Reporter: emberqua...@gmail.com
  Target Milestone: ---

Created attachment 176159
  --> https://bugs.kde.org/attachment.cgi?id=176159&action=edit
Minimal SDL2 example code

SUMMARY

Every time I close my program written in C++ with SDL, KWin (the KDE window
manager) leaks memory, anywhere from 1 to 10 MB at a time. After about 1 GB has
leaked, KWin starts to get unstable, and it crashes soon thereafter.

STEPS TO REPRODUCE

1. Run "g++ -lSDL2 sdl2.cpp" to compile the attached C++ code, which is a
minimal SDL3 app
2. Run the compiled program and then close it

OBSERVED RESULT

KWin leaks memory, eventually to the point of a crash.

EXPECTED RESULT

It shouldn't leak memory.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION

This issue happens with both SDL2 and SDL3.

I often see the following error in the console after closing the program:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  40 (X_TranslateCoords)
  Resource id in failed request:  0x7e171fc
  Serial number of failed request:  560
  Current serial number in output stream:  560

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

Reply via email to