Bug 505519 - Ghostwriter makes Xorg leak/hog memory
Summary: Ghostwriter makes Xorg leak/hog memory
Status: REPORTED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.3
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2025-06-12 11:08 UTC by Riccardo Robecchi
Modified: 2025-10-07 19:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2025-06-12 11:08:51 UTC
SUMMARY
Ghostwriter appears to make the Xorg process leak/hog memory. Leaving Ghostwriter open for a long time makes the Xorg process's memory consumption go up, to the point where it takes more than 1 GB of RAM. Closing Ghostwriter immediately makes Xorg release the memory and get back to ~85 MB.
This seems to indicate that there is something wrong with how video memory is managed in Ghostwriter.
If this can help diagnosing the issue, I do not ever open the preview frame.

STEPS TO REPRODUCE
1. Open Ghostwriter
2. Keep it open for a while (a few days?)

OBSERVED RESULT
Xorg memory goes up to multiple hundred gigabytes, or even more than 1 GB.

EXPECTED RESULT
Xorg memory does not go up.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-06-20 03:43:05 UTC
Hi - just checking, does an analogous issue occur for you in a Wayland session?
Comment 2 Riccardo Robecchi 2025-06-20 08:10:29 UTC
I don't know as I don't use Wayland on this computer due to various issues, and this bug presents itself over a long period of time which makes it impossible for me to reproduce with just a quick test on the Wayland session.
Comment 3 Asten Valentinus 2025-10-07 19:35:10 UTC
I don't know whether this is the same issue, but:

In the Preview Options, giving e.g. pandoc an invalid command line option (or path) makes Ghostwriter gobble up memory. Every time it reruns pandoc (after changing the the command line option box) its memory usage increases. (I'm using KDE System Monitor to verify that Ghostwriter is the culprit).

In one instance, (I don't know what caused it) I think Ghostwriter was continually updating in the background, which meant its memory usage went through the roof (over 10 GB, no limit). I had to close it after programs were being OOM killed.
Comment 4 Asten Valentinus 2025-10-07 19:35:34 UTC
(In reply to Asten Valentinus from comment #3)
> I don't know whether this is the same issue, but:
> 
> In the Preview Options, giving e.g. pandoc an invalid command line option
> (or path) makes Ghostwriter gobble up memory. Every time it reruns pandoc
> (after changing the the command line option box) its memory usage increases.
> (I'm using KDE System Monitor to verify that Ghostwriter is the culprit).
> 
> In one instance, (I don't know what caused it) I think Ghostwriter was
> continually updating in the background, which meant its memory usage went
> through the roof (over 10 GB, no limit). I had to close it after programs
> were being OOM killed.

Also; I'm on Wayland.