When viewing an rtf file, Okular allocates approximately 100 mb of RAM per one scrolled line of text.
Can you attach the file in question? Also, is this a true "leak"? Leaking would be if the memory continuously rises over time. If Okular allocates a lot of memory initially, but then it stays static, that's not a leak.
It works with any rtf file I try, regardless of the source. What seems to be the trigger however is hiding the panels with the thumbnails. As soon as I click on the thumbnail icon and the panel is hidden with the text taking the vast majority of the window the rate at which memory is allocated becomes truly absurd, again, scrolling by a mere line of text in either direction (even back and forth) spends a couple hundred megabytes each time. Opening the panel again stops the wastage of memory but doesn't free what has already been wasted. It seems to affect odt files as well but not pdf.
I still need you to attach the file that causes this, because I'm not able to reproduce with any of the RTFs that I have lying around. Also, could you please re-phrase in the form of a detailed Steps to Reproduce? See https://community.kde.org/Get_Involved/Bug_Reporting#Steps_to_Reproduce It's a little hard to tell what I should do to make this happen.
Created attachment 111096 [details] an example file as requested
Very well, here is an odt file produced by copying a part of a Wikipedia article into LibreOffice Write and saving it as an odt document. To reproduce the bug, open this file in Okular and hide the navigation panel by selecting Settings -> Show Navigation Panel in the main menu of the program.
That's an ODT document, not an RTF. You can reproduce the issue with this ODT file as as well as the original RTF? Even with that document, I'm unable to reproduce the issue on my KDE Neon machine with Plasma and Okular from git master. Okular only ever uses a maximum of 31 MB of RAM when I scroll through it after hiding the navigation panel as requested and using otherwise default settings. Do you have Okular's memory usage set to Greedy, out of cusiosity? (Settings > Configure Okular > Performance) Even then, I could only get Okular to consume 67 Mb of RAM with the supplied document.
Yes, I can. This is strange and concerning. I'm on Arch running Xfce. And no, the memory usage is set to Normal.
there's two different odt backends, one that comes with okular itself and one that comes with calligra, can you both check which version are you using? A way to do it is grep generator /proc/`pidof okular`/maps when you have opened the odt file with okular
Sorry but what package does the generator command come from?
Nevermind, figured it out. Looks like I'm using the calligra backend.
(In reply to qptain Nemo from comment #10) > Nevermind, figured it out. Looks like I'm using the calligra backend. Can you please paste the output of that grep command i wrote?
$ grep generator /proc/`pidof -s okular`/maps 7f8017e59000-7f8017e5c000 r-xp 00000000 08:02 144314188 /usr/lib/qt/plugins/okular/generators/okularGenerator_odt_calligra.so 7f8017e5c000-7f801805b000 ---p 00003000 08:02 144314188 /usr/lib/qt/plugins/okular/generators/okularGenerator_odt_calligra.so 7f801805b000-7f801805c000 r--p 00002000 08:02 144314188 /usr/lib/qt/plugins/okular/generators/okularGenerator_odt_calligra.so 7f801805c000-7f801805d000 rw-p 00003000 08:02 144314188 /usr/lib/qt/plugins/okular/generators/okularGenerator_odt_calligra.so
Moving to calligra
Calligra devels this is for you
Indeed, I can reproduce the issue. It only affects the okular plugin.
Fix, thanks for the report! https://invent.kde.org/office/calligra/commit/3e3b602aff077e189d2d38826f38fcc8a9e1e486