LightRoom 5.5 memory leak at export of photos time.

  • 1
  • Problem
  • Updated 4 years ago
  • (Edited)
i have a serious memory leak in Lightroom 5.5 after the recent upgrade through creative clou d. I can now export not more then 5 photos before i run out of memory (LR claims 1 GB+ of memory by then) then i need to close the application and perform another 5 exports. this is unworkeable when you consider i have literally hundreds of exports to do.
nothing has changed on the machine as to installations etc since the upgrade from 5.4 so what is the problem here..
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
  • frustrated as I wont be able to use a paid service any more and I am on deadlines

Posted 4 years ago

  • 1
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Are you using the 32-bit version of LR on a 32-bit version of Windows? How much memory does LR say it is using in Help / System Info both initially, and after it has run out of memory?

I've seen someone else complain that LR 5.5 uses more memory than LR 5.4 so they were now getting out-of-memory errors trying to export even just one photo, and that could be what is happening, LR just uses a little more memory, now.

If you do your 5-image export, that runs out of memory, as 5 1-image exports (restarting LR just before each so you're working from the same conditions), does it work? Obviously this is just a test to see if it makes a difference, not a viable workaround.
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
Yes it is the 32-bit version of 5.5.
When just starting it claims some where around 500 mg after the cycle of 5 single exports it ends up around 988 megs some where.

The case you are describing is very similar, maybe even the same as to this situation.
Also looking at taskmanager memory it displays the claim in memory after each export which then releases about 50 percent of that extra claim but does not fall back to the claim as before the export. So it keeps adding claims on top of each other u till it reaches 988 megs.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
I experimented with repeated exports of the same 20-images in LR 5.5 64-bit and it uses memory a little more each time until it gets up to 2GB (on an 8GB machine with less than 2GB free) and then it doesn't use any more, so it doesn't seem like there is a memory leak in the 64-bit version.

I do notice that there are multiple threads during the Exporting so maybe multiple images are being done at the same time, which could be using more but also fragmenting the memory so even if it is freed up, the next image may not fit so a new block needs to be allocated.

Develop also uses quite a bit of memory for caching intermediate results so I found that if I switch over to Library before I start the Export, it only uses about 1GB maximum.

This is all on the 64-bit version and using the same images over and over. Maybe memory management is different on the 32-bit version or if different images are used in each Export.
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
I could try the switch to library, but it still does not solve the fact that there is a flaud here. On my set it was a one per one experiment and is reproducable. Als have you tried the online help option on the menu? It crashes LR in 5.5 as well.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
LR 5.5 may use more memory and you'll always get out-of-memory errors with the images you're exporting.

Here are the 5 lines of memory-related information from LR 5.5 64-bit / Help / System Info after several Exports, where you can see it eventually stops using more memory:

Before any Exporting:
Built-in memory: 8126.3 MB
Real memory available to Lightroom: 8126.3 MB
Real memory used by Lightroom: 539.4 MB (6.6%)
Virtual memory used by Lightroom: 500.5 MB
Memory cache size: 0.0 MB

After first Export of 20 images:
Built-in memory: 8126.3 MB
Real memory available to Lightroom: 8126.3 MB
Real memory used by Lightroom: 1081.2 MB (13.3%)
Virtual memory used by Lightroom: 1047.5 MB
Memory cache size: 479.1 MB1

After second Export of the same 20 images:
Real memory available to Lightroom: 8126.3 MB
Real memory used by Lightroom: 1591.3 MB (19.5%)
Virtual memory used by Lightroom: 1562.0 MB
Memory cache size: 479.1 MB

After third Export of the same 20 images:
Built-in memory: 8126.3 MB
Real memory available to Lightroom: 8126.3 MB
Real memory used by Lightroom: 1933.2 MB (23.7%)
Virtual memory used by Lightroom: 1903.6 MB
Memory cache size: 482.2 MB

After fourth Export of the same 20 images:
Built-in memory: 8126.3 MB
Real memory available to Lightroom: 8126.3 MB
Real memory used by Lightroom: 1972.0 MB (24.2%)
Virtual memory used by Lightroom: 1941.3 MB
Memory cache size: 494.7 MB

The last two are about the same and I expect LR will not allocate any more than this, at least right now, because the Task manager says 7 out of 8GB are being used.

My idea about what is happening, here, is that LR is asking the OS for memory and the OS is giving it more up until a certain point, then it stops giving it more and LR uses what it has. I suspect this is a decision by the memory manager of the OS to stop giving more memory, rather than LR looking at the memory environment and deciding to stop asking, but I don't know. I am not experienced enough with using system-watcher apps that can spy on things a process is doing to see if memory allocation requests are being denied or not.

It may also be that the OS is giving more memory until it is close to running out then decides to do a garbage collection of the free blocks and reallocates from that consolidated memory, but garbage collection takes time so it wouldn't be the first choice of a memory manager to do that for each memory allocation request.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Repeating the same experiment with a newly installed LR 5.5 32-bit on my 64-bit Windows 7 computer with 8GB of memory...

Before any Exports:
Built-in memory: 4095.9 MB
Real memory available to Lightroom: 1228.8 MB
Real memory used by Lightroom: 350.2 MB (28.4%)
Virtual memory used by Lightroom: 331.7 MB
Memory cache size: 45.0 MB

After first Export:
Built-in memory: 4095.9 MB
Real memory available to Lightroom: 1228.8 MB
Real memory used by Lightroom: 763.6 MB (62.1%)
Virtual memory used by Lightroom: 751.2 MB
Memory cache size: 45.0 MB

After second Export:
Built-in memory: 4095.9 MB
Real memory available to Lightroom: 1228.8 MB
Real memory used by Lightroom: 1138.2 MB (92.6%)
Virtual memory used by Lightroom: 1132.2 MB
Memory cache size: 45.0 MB

After third Export - something freed up all the memory the previous two Exports had taken:
Built-in memory: 4095.9 MB
Real memory available to Lightroom: 1228.8 MB
Real memory used by Lightroom: 354.2 MB (28.8%)
Virtual memory used by Lightroom: 332.8 MB
Memory cache size: 0.0 MB

After fourth, fifth Exports the memory has stayed the same:
Built-in memory: 4095.9 MB
Real memory available to Lightroom: 1228.8 MB
Real memory used by Lightroom: 398.2 MB (32.4%)
Virtual memory used by Lightroom: 376.8 MB
Memory cache size: 3.1 MB

My thoughts are that maybe LR or the OS detected an almost out-of-memory condition or LR was initially still scanning for XMP differences during the first two exports and then after that was done the amount of memory used was constant.

Here is the memory usage pattern for the first three exports, where you can see at the beginning of the third something frees up memory and it never gets used up, again. In other words, imagine that third pattern repeated over and over for each subsequent Export, whereas the first two, something used extra memory halfway through each and memory wasn't released back at the end, right away:


From these 32-bit experiments, I'd say that LR 5.5 32-bit Export does not have a memory leak, at least when doing the same 20 pictures over and over; however, there does appear to be something that uses up most of the available memory the first few Exports and then things settle down.

I could imagine if I had larger images to render or less memory available on my system, something might actually happen within the 32-bit limitations of memory on LR 5.5 32-bit, but at least for me on this computer, with 32-bit LR 5.5, once things settle down, less then 400MB seems to be used for a many-image export.

I shut down LR 5.5 32-bit and started it back up, again, and tried the same set of Exports, and this time the first two used up memory but at the point the third one had reduced memory, nothing got reduced and they all kept running at the upper-limit of LR's memory for several in a row, even when I ran two Exports at a time, there wasn't an out-of-memory problem. Of course on this 8GB computer with a 64-bit OS there was actual ram available beyond what 32-bit LR could use, and I even saw LR's usage go above the 100% mark so something a little fishy is happening, maybe a timing problem of releasing and allocating memory where Task Manager can't quite compute the right amount at each instant.

Here is what I saw during the Exports during the second run when the 3rd and beyond were all bumping up against LR's limit:


And here is LR's System Info panel showing more than 100% usage during the final export when I was running two in parallel to try to get things to fail:
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
So this is what happened after some tinkering.
I disabled some startups and services to run hoping to clear the memory a little.
I started in the library module as suggested which workthe memory up to 2,4 gig starting at around 1,5. It took me 3 individual exports and a batch of 6 sequenced exports to reach this peak. Then the allocation suddenly drops to the 1,5 from the start as you have seen. And i can do as many exports i want and it will not alocate over 1,8 gig and drops back to 1,5 even after another batch of 6.
So far so good. Seems workeable.

Now i switch to the developer module which i have always used to export from and i see a beginning rise to 1.7 gig as a base. Now i run 3 individual exports and see the memory allocated and not freed. I then hope it will drop as with the library module, but nope. As soon as i start a batch of six it starts to peak towards 2,3 gigs i get an error message that two of the batch cant be created due to lack of memory. Then i start a batch again trying to force the memory reallocation as the memory has not dropped and all six in the batch could not be created. So i give it some time and keep it running at the now allocated memory (2,2gigs) while typing this message i de ide to try again to generate the error message and i start a batch of 6 again.
Tada the memory is once again over allocated to 2,4 gigs and yes again i receive error message (6) not enough memory.

i now switch back to the library module ( memory allocates another 50 megs) to start the export batch again and the memory drops again to 1.6 and i get an error message for only 1 pic.

Now the memory is at 1.5 again. Which would be normal to make sure the baseline is correct i once again start a batch export of 6, the memory rises up to 1.8 and i get no error messages.

Now i run through the same sequence once more in the develop module to validate the initial findings and not to my surprise it is a valid statement.

Statement is valid as:
Exporting in de develop module makes my machine run out of memory. This does not happen in the library module. I am going to export only from the library module from now on. But adobe has a bug in the develop module which was not there before version 5.5
I see two sollutions:
1) remove the export function in the develop module.
2) fix the bug which it clearly is.

My sollution for now is the exports out of the library module only, but some trust in the tool functionality and reliability has been damaged on my side.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
There is no bug and Adobe is not going to remove Export from within Develop.

You can choose between limiting your Exports to Library on a system that has minimum memory usage outside of LR or upgrade your computer.

What are your computer specs: OS version 32/64-bit and RAM, and what camera model's images are you working with?
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
As we are allowed to view form a different perspective. I have not seeen prove on my configuration that there is no bug. I simply cannot determine a functioning export from the develop module like in the library module so to me this would be a bug.

I am running on a hp laptop with 3gigs on windows 7 ultimate running pictures from a canon 5d and am exporting Raw images.

What apparantly is not taken into consideration in this discussion is that this has not occured in version 5.4 and it now occurs in 5.5 after no changes at all on the box since the 5.5 install. To me that is a clear delta.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
LR 5.5 is different than LR 5.4, yes.

There is support for new cameras and lenses, which may use slightly more memory for the added coding and parameters.

The release notes describe other improvements or bugs worked around, where, again, different coding might require different amounts of memory:
http://blogs.adobe.com/lightroomjournal/

Another clue something is different, is that since LR 5.5 came out, there are complaints that some non-Adobe programs can't read the JPGs it has produced, while others are just fine. This suggests that Adobe changed something in how JPGs are produced during Export.

I know that some Sony Bravia TVs can't read the higher-quality JPGs produced by LR because they use 4:4:4 chroma subsampling, whereas the lower quality JPGs use 4:2:2 or 4:2:0 subsampling and those seem to work ok with Sony TVs:
https://forums.plex.tv/index.php/topi...

With the 32-bit computer you have, now, if it is possible to add another GB of memory, then you'd likely get a few hundred MB more memory available. You wouldn't get the full 1GB more because most of the top 1GB is used for device address space, video memory, disk I/O memory and such.

There is some hope that whatever Adobe changed in JPG Export output is actually a bug and might be undone for the next version of LR. If not and it was done to fix something else, then you're likely stuck using LR 5.4 until you have access to a 64-bit computer with at least 4GB of memory.
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
Im going to hope for the JPG export fix and will be using the Library module only for the exports.

What I find curious is that Adobe support directed me to this site but it doenst seem to be affiliated with Adobe? Feels like getting the run around from Adobe a little even though I have received good advice.

Is my assumption correct?
Photo of Dave Deen

Dave Deen

  • 7 Posts
  • 0 Reply Likes
Never mind my assumption off course it isnt, I was told though this would be wehre the developers would be of assistance. Are you a developer Steve?
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
feedback.photoshop.com is an Adobe site and is actually the official place to report bugs and other feedback, as Adobe reps supposedly read every initial message. It turns into a user-to-user help forum most of the time, but occasionally Adobe will reply directly or mark something as Under Consideration or Acknowledged.

The other user-to-user help site is forums.adobe.com and may or may not be read by Adobe personnel although the Cloud-related forums seems to be responded to reasonably frequently by the support reps in India. Other forum sections, less so.

I think the Photoshop.com domain was created a few years back at the point Adobe wanted everyone to know what Photoshop was, and at the same time they started calling their Lightroom product Photoshop Lightroom. With Photoshop Elements versions 7 through 10, Photoshop.com was a place that would host images for people, for free, but I think that got out of hand when people put too much there, so they switched it to Revel.com.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
I am a software developer by profession, but only with a local company where I live, and not affiliated with Adobe.

My intersection with Adobe is that I am a photohobbyist and use Lightroom and Photoshop for maybe a decade to develop my own raw photos, so try to understand and figure things out the best I can.
Photo of Keith Ky

Keith Ky

  • 3 Posts
  • 0 Reply Likes
I have a similar memory leak issue after recent upgrade to LR 5.5 from 5.4. My Windows 7 Pro x64 states I am low on memory and to close the app. I have not changed anything else on the system. It's a desktop with 12GB of RAM running in 2560x1600. I normally work on 24MP raws from my Sony a7 and export them to Flickr.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Does LR 5.6 continue to have the same issue?
Photo of Keith Ky

Keith Ky

  • 3 Posts
  • 0 Reply Likes
Is LR 5.6 beta or final release? I can try it but I didn't see an upgrade notification.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
It's been final since July 31st.

If you have the serial-number version then you can get it from here:
http://www.adobe.com/downloads/updates

If you have the cloud version then you'll need to use the cloud app to update it.
Photo of Tigran Shmis

Tigran Shmis

  • 2 Posts
  • 0 Reply Likes
Yes it is. I experience the same on my Win7 32 bit with quad core and 8Gb memory.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
A Windows 32-bit system can only use 3.something gig of memory across all applications and 4.something of your 8 gig is going to waste. You need a 64-bit operating system to use more than that.
Photo of Tigran Shmis

Tigran Shmis

  • 2 Posts
  • 0 Reply Likes
It works though when I go to library mode. I thinks it is still a bug which needs to be fixed.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
You're on the borderline of running out of memory so using Library helps, but that still doesn't mean LR has a bug, necessarily, just the Develop uses for memory than Library.

Is there a particular reason you have a 32-bit OS but 8GB of memory?
Photo of Carl Traub

Carl Traub

  • 3 Posts
  • 0 Reply Likes
I'm seeing problems with memory as well when attempting to export a single 25MB RAW file to JPEG. I'm running 5.6 64 bit on a system with 16Gig. When I attempt to export, there is often no indication that anything is being processed (ie: the progress bar at the top), but the memory that Lightroom is using continues to grow until Norton warns me that it is using excessive amounts of RAM. Checking Windows Task Manager, LR was using over 12 gig and continuing to grow. I restarted LR several times and I still could not export.
I finally restarted my computer and was able to export twice, but a third export failed. I did not notice this problem prior to 5.6.

The image I'm trying to export has the most edits to an image I've ever done - I don't know that if that's part of the problem

Below is the LR System output info.
(My system has an AMD A8 7600 3.8 GHz processor, but LR 5.6 shows it as 3.0GHz.)

Lightroom version: 5.6 [974614]
License type: Perpetual
Operating system: Windows 7 Ultimate Edition
Version: 6.1 [7601]
Application architecture: x64
System architecture: x64
Logical processor count: 4
Processor speed: 3.0 GHz
Built-in memory: 15299.8 MB
Real memory available to Lightroom: 15299.8 MB
Real memory used by Lightroom: 8779.9 MB (57.3%)
Virtual memory used by Lightroom: 8762.4 MB
Memory cache size: 303.0 MB
Maximum thread count used by Camera Raw: 4
System DPI setting: 96 DPI
Desktop composition enabled: Yes
Displays: 1) 1680x1050
Photo of Keith Ky

Keith Ky

  • 3 Posts
  • 0 Reply Likes
So I did upgrade to LR 5.6 and still have issue of running out of memory when I'm working in Develop, however I did have about 3000+ pics in JPG and RAW, as well as a few videos (but I didn't edit the videos). After working with about 40-50 ptchics, I can see LR starts to crawl and it helps if I close other apps (Dropbox, Google Drive, etc), but only for maybe 3-4 more pics until the app has to close down. If I work with a smaller batch it's not a problem. But I think LR needs a better job of "flushing" the memory more often or allow user to adjust it.

If I haven't mention before, my system is Win7 x64 latest Service Pack, Intel Xeon quad-core 3.6ghz, 12gb ram, 256gb SSD (no page file), ATI Radeon 6950 2gb, I'm running 2 monitors: 2560x1600 and 1200x1600.
Photo of Carl Traub

Carl Traub

  • 3 Posts
  • 0 Reply Likes
I researched further. My memory use had nothing to do with saving files. Just starting LR 5.6 and leaving alone, it would grow to 12.5 gig of RAM use. This would take about 10-15 minutes. During this time I could chose File->Export and select an output, but nothing would happen. After that long delay, memory growth would stop, and the files would finally get exported.

I backed up the LR catalog and restarted LR. This time the memory grew slowly to 7.3 Gig where it has stopped. This is still not acceptable.