https://bugs.kde.org/show_bug.cgi?id=523045
Bug ID: 523045
Summary: Gwenview freezes, leaks RAM, and triggers heavy
swap/kioworker when parsing folders with large videos
(missing front-loaded moov atom)
Classification: Applications
Product: gwenview
Version First 26.04.3
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
When opening a lightweight image (like an animated .webp or standard .png) in
Gwenview inside a directory containing a very large video file (e.g., an 8 GB
OBS screen recording), Gwenview attempts to generate a video thumbnail in the
background.
If the video's index (moov atom) is located at the end of the file rather than
the beginning—which is highly common with raw screen
recordings—Gwenview/kioworker reads or buffers massive portions of the file
into memory to find it. This results in:
1. RAM usage instantly spiking to 9+ GB (exhausting physical memory and
spilling into Swap).
2. Gwenview hitting 95% CPU usage.
3. kswapd0 hovering at 44% CPU usage trying to manage the swap storm.
4. System-wide stuttering for 20+ seconds just to open a simple adjacent image.
STEPS TO REPRODUCE
1. Create a directory containing a small image (e.g., test.webp animation) and
a very large MP4/MKV video file (e.g., an 8 GB stream recording where the
metadata index is written at the end of the file).
2. Open the image in Gwenview.
3. Observe system performance via a system monitor (btop, htop, or KSysGuard).
OBSERVED RESULT
Gwenview initiates thumbnail generation for the directory’s contents in the
background via kioworker. Because it cannot efficiently seek the video's index,
it buffers the massive video, leading to extreme memory leaks (9 GB+), intense
CPU usage by both gwenview and kswapd0, and system unresponsiveness.
EXPECTED RESULT
Gwenview should recognize if a video file exceeds a safe threshold (e.g., 100
MB or 1 GB) and:
- Either skip generating the thumbnail entirely for oversized files.
- Or employ a non-blocking, memory-capped, or fail-fast parsing strategy that
stops seeking if the index isn't immediately found at the beginning of the
file.
- At the very least, it should respect a file-size limit for background
thumbnail parsing.
SOFTWARE/OS VERSIONS
Operating System: Fedora 44 KDE
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
ADDITIONAL INFORMATION
Disabling Dolphin's "Video Files" preview setting has no effect here, proving
Gwenview's internal background thumbnailer operates independently of Dolphin's
settings.
Related bugs: https://bugs.kde.org/show_bug.cgi?id=435149
--
You are receiving this mail because:
You are watching all bug changes.