XnView 1.98.8 memory leak

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
DeFi
Posts: 5
Joined: Sat Mar 24, 2012 12:26 am

XnView 1.98.8 memory leak

Post by DeFi »

Hello,
recently XnView started bugging me with "out of memory" messages and crashes while browsing and rating images shot with my digital camera. I examined the problem and discovered that repeatedly opening an image in thumbnail view using the "Enter"- key or double-click and switching back to thumbnail view the same way causes XnView to occupy more and more memory until the memory limit for 32-bit programs is reached and the application shows the error message and freezes. I'm running Windows 7 64 bit and deleting the XnView Settings, disabling or enabling thumbnail caching, checking the "No multiple view for same file" setting and updating to the latest version so far did not resolve the problem. The problem seems to be related to image file sizes and strikes faster with bigger files. Another effect of the large memory consumption is an increase in time XnView needs to close the application, the more image switching occurred, the longer it takes to close XnView. Also, while closing, the XnView status bar seems to quickly display every state it ran through during the whole program session in reverse order.

Can anyone reproduce this problem or knows a fix for this?

Thanks,
DeFi
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: XnView 1.98.8 memory leak

Post by marsh »

I cannot recreate problem. Are there only two windows open (one image + browser) in: Menu... Window> window list ?
DeFi
Posts: 5
Joined: Sat Mar 24, 2012 12:26 am

Re: XnView 1.98.8 memory leak

Post by DeFi »

Yes, this can be created with only two windows open. However the rate of memory consumption gets higher when opening more than one document window over time. Closing all the document windows afterwards only releases a very small amount of memory. To reproduce I do the following:
1. get to a folder with 10+ JPEG files and open one in xnview.
2. hit enter to get to thumbnail view
3. close the first document window
4. select another image in the folder
5. hit and hold enter to watch the memory consumption explode

Steps 2 to 4 seem to be essential as the memory consumption stops at a certain level otherwise. Step 3 is only executed to show that this occurs also with only two windows open.
The following image shows the problem three times. The middle part is the result without selecting another image. Each time the memory consumption drops, xnview was closed.
Image

I just noticed: the number of GDI handles does not increase from the point of fist entering xnviews thumbnail view.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: XnView 1.98.8 memory leak

Post by marsh »

Now I can confirm it with 'no multiple view for same file'. Well spotted.
DeFi
Posts: 5
Joined: Sat Mar 24, 2012 12:26 am

Re: XnView 1.98.8 memory leak

Post by DeFi »

Yes if "no multiple view for same file" is unchecked it just keeps opening more document windows and runs into the memory limit. But those document windows can be closed to free the memory which is not possible otherwise. If additionally the option "Only on window view opened" is checked, the memory problems seem to disappear.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView 1.98.8 memory leak

Post by xnview »

right
Pierre.
Post Reply