A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

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

Moderator: Dreamer

Post Reply
mudo_j
Posts: 7
Joined: Fri Feb 17, 2017 7:01 pm

A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by mudo_j » Thu Feb 15, 2018 12:54 am

Subject: XnViewMP 0.90 beta 1 (Win 64-bit): memory problem building thumbnails with colour management enabled (Win 7)
Also versions 0.84 - 0.89 (Win 64-bit)

Windows 7 PC, i5 3570 @ 3,40 GHz, 16 GB DDR3
Similar behaviour on another Windows 7 PC with 8 GB RAM
Can't reproduce on a Windows 10 laptop with 8 GB RAM
Can't reproduce on Ubuntu (on the same i5 3570 PC)

Effect: With colour management enabled, when building thumbnails, Private Bytes grabs all installed memory

To reproduce:

First run, no problems, XnView Windows 64-bit (portable), out of the box, all settings default, then Paths: Program (XnView) (also removed everything from AppData\Roaming, just in case); no databases etc. Using Process Explorer for monitoring.

Browse to a folder like D:\test, containing 1000 jpeg photos, all saved with sRGB colour profile. The program creates thumbnails.

CPU usage: up to 35 %
Private Bytes: 316 MB
Working Set: 310 MB
WS Private: 265 MB
Peak Working Set: 336 MB

Second run, problems: Again out of the box, then enabling General - ICC - Use ICC profile for monitor (selecting the system profile (from Dell) or a generic sRGB profile)

CPU usage: up to 60 %
Private Bytes: 17 GB
Working Set: 183 MB
WS Private: 140 MB
Peak Working Set: 251 MB

Actual behaviour (bug): The Private Bytes parameter quickly jumps to 4 GB and then to 17 GB. Windows may complain (suggesting to close XnViewMP), other programs can not be started.
Browsing with XnViewMP to another folder with no images releases the Private Bytes usage.

Expected behaviour: Using reasonably more RAM than without ICC enabled.

I understand, that this might be hard to reproduce, if it only happens on (some?) Windows 7 configurations. Perhaps some other user can try this. Thanks anyway, have a nice day!

User avatar
xnview
Author of XnView
Posts: 29600
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by xnview » Thu Feb 15, 2018 3:40 pm

could you send me a sample file used?
Pierre.

mudo_j
Posts: 7
Joined: Fri Feb 17, 2017 7:01 pm

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by mudo_j » Fri Feb 16, 2018 2:15 am

I have made another test with 1000 cr2 files (25 GB), everything was OK, Private Bytes usage was slightly under 1 GB, so it looks that something in my jpeg files triggers the problem. I will try to narrow this down before sending you random jpeg samples. Thanks for the patience!

mudo_j
Posts: 7
Joined: Fri Feb 17, 2017 7:01 pm

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by mudo_j » Fri Feb 16, 2018 11:53 am

I have separated my jpeg files by creator software and such, but it does no difference.
scr3.png
Any set of jpeg files with colour profiles triggers the glitch. Just in case, here is a random sample:

https://app.box.com/s/93smqi1hyecfkv6hqrqot7or69vdt07u

100 instances of this photo are more than enough to start the problem. With ICC profiles deleted from the collection (I have used ExifToolGUI), the issue is gone, building thumbnails runs normally.

I'm sorry, if this is something exotic, I don't want to waste your time.

User avatar
xnview
Author of XnView
Posts: 29600
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by xnview » Fri Feb 16, 2018 1:09 pm

i've tried, and with or without ICC profile, i have the same private memory used
Pierre.

mudo_j
Posts: 7
Joined: Fri Feb 17, 2017 7:01 pm

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by mudo_j » Fri Feb 16, 2018 8:00 pm

Thank you, Pierre. I'll be back if I find something useful.

2Gjv1VgGK
Posts: 3
Joined: Thu Sep 29, 2016 8:12 am

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by 2Gjv1VgGK » Sun Feb 25, 2018 9:08 am

Hello. I have the same problem when the option "Use ICC color profile for monitor" is turned on with Dells color profile.
Windows 7 x64, XnViewMP v0.89 x64.
Attachments
U2412M.zip
(2.51 KiB) Downloaded 8 times

User avatar
xnview
Author of XnView
Posts: 29600
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: A possible memory leak when building many thumbnails with colour management enabled (Windows 7/64)

Post by xnview » Sat Mar 10, 2018 2:08 pm

2Gjv1VgGK wrote:Hello. I have the same problem when the option "Use ICC color profile for monitor" is turned on with Dells color profile.
Windows 7 x64, XnViewMP v0.89 x64.
do you have a sample file used to reproduce the problem?
Pierre.

Post Reply