# Memory leak with previous adjustment brush history



## Braders (Nov 14, 2010)

I have noticed since 3.2 the memory leaks when using the adjustment brush, but it has been tolerable until the last week or so. I have found a specific behavior in the Develop module that makes LR unusable.

Scrolling through images and making minor changes i discovered what appears as a serious memory leak.

1. Image with NO history of adjustment brush develop changes - normal.
2. Image with a history of adjustment brush develop changes - LR grinds to a halt and the dreaded "LR is not responding" appears to the point i have to force close LR.

This is repeatable with every image in my entire catalogue that has a adjustment brush develop change.lrcat optimized 3 days ago. No other applications open on the PC. Adjustment brush closed. Attaches is an example of what happens when i change from one image to another, dependent on the develop history.


----------



## Victoria Bampton (Nov 14, 2010)

Brad, do you fancy trying 3.3RC which is on labs.adobe.com? See if it solves it for you.


----------



## Braders (Nov 14, 2010)

[quote author=Victoria Bampton link=topic=11611.msg7794'#msg7794' date=1289772548]
Brad, do you fancy trying 3.3RC which is on labs.adobe.com? See if it solves it for you.
[/quote]

Not really!

I don't seem to have much luck with RC versions. Twice bitten, thrice forgataboutit.


----------



## Victoria Bampton (Nov 15, 2010)

Well it's been in RC for a few weeks now, so the proper release shouldn't be far off.


----------



## Braders (Mar 6, 2011)

Hi Victoria

I have upgraded and unfortunately this bug is worse than before.

Whether the adjustment brush is open or not, if any image in my catalog has a development adjustment brush history, when in the develop module, LR grinds to halt and is unusable. 

Here is a 3 minute example of what happens - i made some exposure -ve adjustments on 4 or 5 small areas and then came the inevitable delayed reaction. 

http://vimeo.com/20711061


----------



## Victoria Bampton (Mar 6, 2011)

Brad, can you try a clean catalog and see if you see the same.


----------



## Braders (Mar 7, 2011)

Victoria Bampton said:


> Brad, can you try a clean catalog and see if you see the same.


 
Would love to do some testing, but the creation of a new cat has opened a few other can's or worms. Half (edit - all!!) my collections are gone (any suggestions?) and interestingly, LR seems to have purged all unused keywords.

Man this software program can drive me nuts!


----------



## Braders (Mar 7, 2011)

Ok, so the memory leak and non-functioning LR has gone with a new catalog!

Only tested it on a few images and no issues - nice and fast.

Will continue testing over coming days and report back. Now to figure out the lost collections.


----------



## b_gossweiler (Mar 7, 2011)

Brad,

I guess you were re-importing your images into the new catalog? I guess Victorias advice was only to check in a new catalog with some test files so far.

To get your old data over into a new catalog, try creating another new catalog, and then import your original catalog with function "File/Import from Catalog". Under "File Handling" in the import dialog, choose "Add new photos to catalog without moving".

Beat


----------



## Victoria Bampton (Mar 7, 2011)

Ok, that at least narrows it down to the catalog, that's good.  Don't worry, you don't have to carry on with the new catalog, I just wanted to see if it was specific to the catalog.

Now, is this a catalog upgraded from 2.x?  Have you tried trashing the previews since the upgrade?  There were some reports with the early upgrades and clean previews and optimizing brought it back up to speed.


----------



## b_gossweiler (Mar 7, 2011)

Sorry for chiming in, Vic. I'll leave the field to you now 

Beat


----------



## Victoria Bampton (Mar 7, 2011)

You carry on Beat, 2 heads are better than 1!


----------



## Braders (Mar 7, 2011)

Victoria Bampton said:


> Ok, that at least narrows it down to the catalog, that's good.  Don't worry, you don't have to carry on with the new catalog, I just wanted to see if it was specific to the catalog.
> 
> Now, is this a catalog upgraded from 2.x?  Have you tried trashing the previews since the upgrade?  There were some reports with the early upgrades and clean previews and optimizing brought it back up to speed.


 
No, i upgraded to 3 not long after its arrival and 3.3 a few weeks ago.


----------



## Braders (Mar 7, 2011)

b_gossweiler said:


> Brad,
> 
> I guess you were re-importing your images into the new catalog? I guess Victorias advice was only to check in a new catalog with some test files so far.
> 
> ...


 
Cheers Beat.

Actually, this is exactly how i did it!

Have just started another one to see if the same thing happens. get back to you.


----------



## Victoria Bampton (Mar 7, 2011)

Braders said:


> No, i upgraded to 3 not long after its arrival and 3.3 a few weeks ago.


 
So it was an upgrade from 2.x to 3.0 then?  The preview system was rebuilt and some upgrades caused weird problems.

Try this... find the catalog on the hard drive, close LR, rename the previews file.  Open LR and select all and go to Previews > Render Standard Previews (just do a chunk at a time if you like) and see if that works better.  If so, make sure that all of the previews are rebuilt and then trash the old renamed previews file.


----------



## Braders (Mar 8, 2011)

Ya know, there are times i could ring up and abuse Adobe, and today is one of those times.

It's about time they got there act together and ironed out the kinks in the program once and for all.

So, let me start from the top.

1st - Original cat - crap adjustment brush.
2nd - made a new catalog - but no collections present and all unused keywords purged in the process
3rd - trashed that and the original catalog
4th - open a back up of original cat from 3 days prior - viola, adjustment brush works great, all keywords and collection present....but!

Now i have 100's of images with the random exclamation mark 'the metadata for the image has been changes by both LR and an another application......etc"

So.2 questions. How do filter all the images with this exlcaimation and then do I 'import setting from disc' or 'overwrite from those of the Cat"???

ggrrr


----------



## Victoria Bampton (Mar 9, 2011)

Oh dear Brad, you are having a time of it.

Ok, so 3 day old backup's good.  Great.  Are you happy with the pictures in LR, that LR has the right settings?  If so, select all and overwrite the settings in the files.


----------



## Braders (Mar 10, 2011)

Victoria Bampton said:


> Oh dear Brad, you are having a time of it.
> 
> Ok, so 3 day old backup's good.  Great.  Are you happy with the pictures in LR, that LR has the right settings?  If so, select all and overwrite the settings in the files.


 
Done...back to normal.

Oh man, Adobe have got to do something to iron out the kinks in this program. Look at all the issues on all the forums!


----------



## Victoria Bampton (Mar 10, 2011)

Forum posts aren't really a great guide to how well the software works unfortunately, because all the happy people don't tend to post.  The forums are usually busy, but then, LR's pretty popular software, so it probably evens out.

Anyway, really pleased you're back to normal!


----------



## Braders (Mar 10, 2011)

Victoria Bampton said:


> Forum posts aren't really a great guide to how well the software works unfortunately, because all the happy people don't tend to post.  The forums are usually busy, but then, LR's pretty popular software, so it probably evens out.
> 
> Anyway, really pleased you're back to normal!


 
Maybe, but there just seems to be far more issues with 3. We went quite a while with a very stable 2.7 where i rarely had to visit here, and when i did the activity posting about quirky issues seems far less.

Cheers for the help as usual.


----------



## b_gossweiler (Mar 10, 2011)

Braders said:


> We went quite a while with a very stable 2.7 where i rarely had to visit here, ...



Just wait until 3.7 is out 

Visitors here are always welcome anyway, regardless of the number of bugs still in a release ...

Beat


----------



## Braders (May 12, 2011)

Hate to bring this up again, but Lr is doing the same old crash and burn.

This time however, i see a potential glitch. 

After soome significant adjustment brushes (4 pins and hundreds of strokes), LR ground to a halt, started producing not responding with white out screen at 100%cpu.

Had to stop LR after 1hr and 40 minutes! and come back the following day once i had calmed down. Upon returning to LR, specifically that image in library module, LR started again with white out screen, spinning beach balls and not responding for 18 minutes. All i did was open LR. 

Eventually, in grid view, the exclamation mark presented itself "LR metdata was changed by another program.....etc....do u want to overight from disk or the catalogue". But, i hadn't. Despite overwriting the metadta and restarting LR, when i return to this image, LR stops working and goes into freefall.

Somehow, there is a write failure to theDNG file on disc and this is boggin down LR. I swithced off Save to xmp and went into devlop and made a few spot removals, and although slow (like 5 spots/20seconds behind the clicks), LR did catch up.


----------



## LouieSherwin (May 12, 2011)

Brad,

I wonder if these delays are perhaps due to LR updating the jpeg previews in your DNG files. I came across a similar problem a long time ago using an extension to Bridge called Rapid Fixer that is similar to the quick develop in LR. When using it on DNG files with update previews turned on it caused very similar behavior to what you are describing. Every adjustment triggered a complete rewrite of the DNG file and when I tried a whole series in a row as you have described it brought my Bridge in my case to a standstill. 

You may also want to turn off update DNG previews and see if that speeds things up for you. 

-louie


----------



## Braders (May 12, 2011)

LouieSherwin said:


> Brad,
> 
> I wonder if these delays are perhaps due to LR updating the jpeg previews in your DNG files. I came across a similar problem a long time ago using an extension to Bridge called Rapid Fixer that is similar to the quick develop in LR. When using it on DNG files with update previews turned on it caused very similar behavior to what you are describing. Every adjustment triggered a complete rewrite of the DNG file and when I tried a whole series in a row as you have described it brought my Bridge in my case to a standstill.
> 
> ...


 
I think you mean rewrite of the DNG files XMP data, and not the previews?

If you do indeed mean the previews, then where does one 'turn off' DNG preview updating?

Now i think about it might be both! Where the xmp date has to written to the DNG file and catalogue (not on the same drive), while updating the preview to show the develop changes.


----------



## Kiwigeoff (May 13, 2011)

I don't believe there is anything to turn off. But may be wrong!! It is a menu item to invoke the update, etc.


----------



## Braders (Nov 14, 2010)

I have noticed since 3.2 the memory leaks when using the adjustment brush, but it has been tolerable until the last week or so. I have found a specific behavior in the Develop module that makes LR unusable.

Scrolling through images and making minor changes i discovered what appears as a serious memory leak.

1. Image with NO history of adjustment brush develop changes - normal.
2. Image with a history of adjustment brush develop changes - LR grinds to a halt and the dreaded "LR is not responding" appears to the point i have to force close LR.

This is repeatable with every image in my entire catalogue that has a adjustment brush develop change.lrcat optimized 3 days ago. No other applications open on the PC. Adjustment brush closed. Attaches is an example of what happens when i change from one image to another, dependent on the develop history.


----------



## LouieSherwin (May 13, 2011)

Hi Brad,

I mean the JPEG preview that is optionally stored in the DNG file not the LR previews which are stored separately. I am not quite where to control this option since I stopped using DNG a year ago when I moved from Bridge/ACR to Lightroom 3. 

There is an option in the "File Handling" tab of the LR Preferences where you can select the JPEG preview size  for import (none, medium, full). I don't know if that will also control the how existing DNG files in you  library are handled or if there is another setting somewhere that controls the behavior. 

-louie


----------



## LouieSherwin (May 13, 2011)

Good morning Geoff,

In ACR preferences there is an option to enable/disable "Update embedded JPEG preview". Your are correct, this does not appear anywhere in LR that I can find either. This enabling this option in ACR clearly has the effect of updating the embedded preview with the latest develop settings. This is what was killing performance when I was using Rapid Fixer in Bridge. It was ACR to rewrite the whole DNG file for every click. Needless to say it was rather slow.  This was quit similar to what Brad was describing which is what got my attention.

I just reread the section "Import DNG Creation" in Martin Evenings, LR3 book (pp. 606-609) and came away with the clear understanding the LR will or won't, update or not update the preview when it you make an edit after importing and an initial preview is generated. Yes it was clear as mud. 

Maybe John Beardsworth can shed more light on the subject.

-louie


----------



## Kiwigeoff (May 13, 2011)

No worries Louie, I wallow in mud often!!!


----------



## Braders (May 13, 2011)

LouieSherwin said:


> Good morning Geoff,
> 
> In ACR preferences there is an option to enable/disable "Update embedded JPEG preview". Your are correct, this does not appear anywhere in LR that I can find either. This enabling this option in ACR clearly has the effect of updating the embedded preview with the latest develop settings. This is what was killing performance when I was using Rapid Fixer in Bridge. It was ACR to rewrite the whole DNG file for every click. Needless to say it was rather slow.  This was quit similar to what Brad was describing which is what got my attention.
> 
> ...


 
LR must render the preview you are view in the develop module on the fly, as you make changes. IN ACR, how can one see the changes made if you disable  "Update embedded JPEG preview"? Mud....

I am wondering whether there is a problem with the DNG specification. Writting data to a CR2 with an xmp file is just that, data. But, given the xmp is embedded in the DNG, i wonder whether the 'whole' DNG has to re-written with any metadata changes.


----------



## LouieSherwin (May 13, 2011)

Braders said:


> LR must render the preview you are view in the develop module on the fly, as you make changes. IN ACR, how can one see the changes made if you disable  "Update embedded JPEG preview"?



Everything is rendered to your screen in ACR as you work. This also stored in the ACR cache so when open again in ACR you can see the latest rendered version on you monitor almost immediately. LR shares the same ACR cache.

The imbedded preview is primarily there for other applications (read not ACR or LR) that cannot render the raw file with the saved settings. A lot of photographers are using Expression Media (used to be iView now is Media Pro) catalog application. Having the imbedded JPEG is the only way it can display your "developed" version of the image. 



Braders said:


> I am wondering whether there is a problem with the DNG specification. Writting data to a CR2 with an xmp file is just that, data. But, given the xmp is embedded in the DNG, i wonder whether the 'whole' DNG has to re-written with any metadata changes.



The answer is *yes*. If you turn this on the DNG file is rewritten every time you make a change to any metadata. That would be IPTC fields or changes to the develop settings. It's not a design flaw but a feature intended to do away with the need for a separate .xmp sidecar file. It makes it easier to send the raw image off in a single file that includes all your relevant metadata. But it also has this side effect. Most people who use DNG files leave the update option turned off for this reason and only update from the menu if they send the file off out side of LR.

-louie


----------

