Bug 467928 - Huge memory leaks when using ghostwriter
Summary: Huge memory leaks when using ghostwriter
Status: RESOLVED WORKSFORME
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-29 15:57 UTC by Chromer
Modified: 2023-05-28 03:45 UTC (History)
0 users

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


Attachments
System Activity screenshot of ghostwriter process (149.25 KB, image/jpeg)
2023-03-29 15:57 UTC, Chromer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chromer 2023-03-29 15:57:43 UTC
Created attachment 157692 [details]
System Activity screenshot of ghostwriter process

SUMMARY
Ghostwriter has a bug which cause a huge memory leak, it's unlimited and continues to make the system freeze, as you can see in the screenshot, in my case it reached to 811 mb of ram usage and if i continue to write it will goes on...

Previously a bug on this was reported and author said that it's the qt-webengine issue not the ghostwriter, but you can see in screenshot that it's main process of ghost writer and not webengine's one, also i'm not using the preview pane.

Tested with all backends and same leak :
- multimarkdown
- cmark
- cmark-gfm

for reproducing the bug you need to write the note yourself and go on, the leak happening while writing the note.
My note's language is in Persian.


STEPS TO REPRODUCE
1. Open ghostwriter and start writing more than 1000 words
2. Monitor the ram usage.
3. ghostwriter gradually will use all the system's ram and makes OS freeze.

OBSERVED RESULT
Ghostwriter's memory usage continuously increases until it reaches 811 MB or more, causing the system to freeze.

EXPECTED RESULT
Ghostwriter should not consume all the system's RAM, and the system should not freeze.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104
Qt Version: 5.15.8
Ghostwriter : 2.1.6

ADDITIONAL INFORMATION
Comment 1 Chromer 2023-03-29 16:05:29 UTC
For a easier reproduction , open a markdown file with more than 10,000 words and start writing at the end...
Monitor the RAM usage and observe the leak.
Comment 2 megan.conkle 2023-04-19 17:03:34 UTC
I cannot replicate this on the latest on the master branch.  Please build from there and let me know if the problem persists.  Otherwise I will assume the issue is fixed.  Thanks!
Comment 3 Chromer 2023-04-28 18:51:43 UTC
After some tests, i figured out this bug only occures when the text context is in Arabic/Persian language, with Latin language like English and German it's OK , but with persian and arabic the bug persists.
Comment 4 Bug Janitor Service 2023-05-13 03:46:03 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2023-05-28 03:45:29 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!