memory never released when switching to a different image. only when xviewer is shut down.

Open
#234 12 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c

Research direction

Reproduce the leak in xviewer 3.4.16 by opening several 1–2 MB JPGs and cycling with the arrow key, including a full loop. No source file or test is named; trace image switching and cleanup, then verify that memory is released when changing images and does not grow when revisiting them.

Written by the indexing model from the issue text.

Description

I have a folder with a bunch of 1 to 2 MB jpg images.

Opening one of them makes xviewer take 64 MB of ram. using the arrow key to load the next image doubles that. and every additional picture afterwards increases it by 20 to 32 MB. if you go through all the images in a folder it will loop back to the first one, but looping still wastes ram as if it is a new picture and not a repeat of a previously loaded picture.

As a result, if you do not shut down xviewer occasionally but are constantly scrolling through images, it will eventually consume all RAM and hard freeze linux mint. necessitating a hard reset because nothing is responding.

==version==
xviewer 3.4.16
mint: 22.3 x64

Dominant language
C
Stars
92
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/xviewer

All issues in linuxmint/xviewer

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.