Memory leak (closing image editor)

*** Please report new bugs here! ***

Moderators: xnview, Dreamer

nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Memory leak (closing image editor)

Post by nji9 »

I cannot tell where/ when exactly mem leak happens...
but it happens doing this:

Start XnViewMP
Category Filter: choose to de-select (Alt-Leftmouse) some category.
Have a look at the result pane.
Open an image here and there.
From time to time check/ decheck some category of some image
in category filter sets pane.
That's OK for some time (Some dozens images).
Then mem consumption slowly starts rising whenever an image is opened.
A screenshot short after closing MP:
Clipboard_02-15-2026_01.jpg
Recently I had the effect that MP didn't react anymore at some point
- I had to kill it. The mem consumption was at max then.
Maybe it was exactly that cause?

XnViewMP 1.9.10 @ Win7-64
You do not have the required permissions to view the files attached to this post.
Last edited by nji9 on Tue Feb 17, 2026 10:27 am, edited 2 times in total.
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak (when category filter is de-checked)

Post by xnview »

if you don't open image in edit mode, same problem?
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (when category filter is de-checked)

Post by nji9 »

If I do not open image in edit mode (but still assign/ unassign categories in category set pane): No mem leak.

If I do open (and afterwards close) image by image in image mode (and don't do any category assign): Mem leak.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (opening/ closing image editor)

Post by nji9 »

Even simpler:

To get the effect you don't need to have a Category filter active.

==> Mem leak is from opening images in edit mode (mem not released when closed again?).
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak when closing image editor

Post by nji9 »

Additional info:

I checked on 14MP JPG images; i.e. mem for each: 41.45 MB.

Whenever I open an image to the image editor, XnViewMP uses abt. 47 MB more mem.
When I close the image without having done anything ... (guess! :) )... the mem isn't given back.
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak when closing image editor

Post by xnview »

from browser i've tried to open a large JPEG but memory stays the same. Please send us the sample file?
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (closing image editor)

Post by nji9 »

Sorry, I do not understand what you mean.

From browser you opened a large JPEG to image editor, right?
==> memory usage of MP should increase by its uncompressed size.
Does it for you?
(If not I would like to buy your computer :) )

Now closing the image editor again.
==> memory usage of MP should decrease to about the former size.
Does it for you?

What kind of "sample file" are you asking for?
It won't be some image...
... as that won't make any sense (The effect is for arbitrary images).
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak (closing image editor)

Post by xnview »

nji9 wrote: Tue Feb 17, 2026 5:11 pm From browser you opened a large JPEG to image editor, right?
==> memory usage of MP should increase by its uncompressed size.
Does it for you?
(If not I would like to buy your computer :) )

Now closing the image editor again.
==> memory usage of MP should decrease to about the former size.
Does it for you?
yes normal, you have not that?
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (closing image editor)

Post by nji9 »

xnview wrote: Wed Feb 18, 2026 6:33 am
nji9 wrote: Tue Feb 17, 2026 5:11 pm From browser you opened a large JPEG to image editor, right?
==> memory usage of MP should increase by its uncompressed size.
Does it for you?
(If not I would like to buy your computer :) )

Now closing the image editor again.
==> memory usage of MP should decrease to about the former size.
Does it for you?
yes normal, you have not that?
Maybe you occassionally haven't read my post above:
nji9 wrote: Tue Feb 17, 2026 10:20 am Additional info:

I checked on 14MP JPG images; i.e. mem for each: 41.45 MB.

Whenever I open an image to the image editor, XnViewMP uses abt. 47 MB more mem.
When I close the image without having done anything ... (guess! :) )... the mem isn't given back.
Actually that's the wit about the bug... :shock:
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak (closing image editor)

Post by xnview »

nji9 wrote: Wed Feb 18, 2026 9:05 am Actually that's the wit about the bug... :shock:
i can't reproduce. Send us a sample file used and how to reproduce...
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (closing image editor)

Post by nji9 »

xnview wrote: Wed Feb 18, 2026 9:07 am i can't reproduce. Send us a sample file used and how to reproduce...
From MP browser double-click an image (raw mem: 48MB) to open the image editor.
Mem usage of MP increases by about that 48MB.
Now (without having done anything in editor) close image editor.
Would expect MP's mem usage to drop 48MB again.
But does not!
Opening the same file again: No additional mem usage.
Open a different file: Additional mem usage.
(Again and again for every different image, until MP's freeze).

It happens for every image.
But as you asked for it, here some arbitrary images..
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak (closing image editor)

Post by xnview »

can't reproduce. Do you use settings>Misc>Cache? and in Settings>View>Zoom out/in?
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (closing image editor)

Post by nji9 »

Do you mean? Settings>View>Misc>Cache?
I can't remember ever having touched this.
However "Keep.." and "Read.." both were activated.

If I de-activate "Keep..."... the effect of cummulative mem usage when closing image editor remains.
(But even with "Keep..." activated, MP shouldn't accumlate mem until freeze I might think).

If I additional deactivate "Read.."... the effect stays the same.

I do not know what you mean by Settings>View>Zoom out/in.
Do you mean Settings>View>Anti-aliasing: Zoom out/ Zoom in?
As before I can't remember having ever touched that.
However my settings are "Bilinear" and "none".
If I change "Bilinear" to "none"... the mem effect does not change.

If I use MP only for single image view (i.e. no browser etc.) mem usage does not accummulate.

BTW:
As you can't reproduce: As mentioned in my first post, it's @ Win7-64.
You will have tested?
However other apps at Win7-64 do not accummulate mem usage:
GIMP, PSP, IrfanView.
Conclusion: The bug is of XnViewMP.
User avatar
xnview
Author of XnView
Posts: 47521
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Memory leak (closing image editor)

Post by xnview »

tried on Win7 with default settings, and all is ok, open and close image file in edit mode, stay around 72Mb and 22Mb if deselect it in browser...
Pierre.
nji9
Posts: 221
Joined: Wed May 13, 2020 10:33 am
Location: Germany

Re: Memory leak (closing image editor)

Post by nji9 »

xnview wrote: Wed Feb 18, 2026 3:11 pm tried on Win7 with default settings, and all is ok, open and close image file in edit mode, stay around 72Mb and 22Mb if deselect it in browser...
Deselect it in the browser?
Selection status in browser doesn't has any effect on mem usage (at least with me).
Last edited by nji9 on Wed Feb 18, 2026 3:28 pm, edited 1 time in total.