MIDI2LR v0.8.0 Crashes Lightroom CC 2015.3
The latest release of the plugin crashes Lightroom CC 2015.3 on my Windows 10 64-bit computer consistently. Generally this takes 5-10 minutes, but sometimes as much as 30 minutes while editing. It usually crashes when I advance to the next photo, but I'd have to test that further. The previous version (0.7.0 didn't crash Lightroom, but it had other issues and didn't work well with my BCF2000).
I've just installed v0.8.0 and had 2 crashes within 10 minutes.
I'm on Lightroom 6.1.1, not the CC version.
Is the crash associated with any particular command?
Lightroom "sandboxes" the plugins, so it should be very hard to negatively affect LR. On the other hand, I've already encountered a few obscure LR bugs, so this is a possibility.
The other thing to consider is that using some of the "experimental" controls may be causing it. Look in the wiki--any control marked with a "^" is experimental, as it is undocumented by Adobe. If you stop using any of those, does the crashing go away?
And, are you using "paste settings"? It's undocumented as well.
I'm not using "paste settings" or any experimental commands. I looked into this error further. I can duplicate it on my system with 0.8.0 and 0.8.2 as follows:
-
Enable MIDI2LR.
-
Go to any folder containing many photos in either Library or Develop
-
Press the right arrow key a bunch of times (or hold it down). With MIDI2LR enabled, Lightroom is VERY slow at advancing to the next photo in Library module. This should not be the case. You'll see on the Lightroom title bar that MIDI2LR is quickly switching to Develop module and then back to Library every time I advance to the next photo. This does not occur without the plugin enabled and I don't remember it occurring in 0.7.0. That quick cycle to Develop and back to Library definitely didn't happen in Paddy, which I've used extensively in the past so I wonder if the crashes are related to that behavior.
-
Crash occurs after a minute or so of advancing through photos. Memory usage reaches about 1.6 GB on my PC. When MIDI2LR is not enabled, LR never uses more than 1 GB of RAM during this exercise, but 0.7.0 does reach about 1.6 GB without crashing. However, my test of 0.7.0 may be incomplete because that version is no longer working with my BCF2000...maybe I need to send my BCF2000 the old bcf2000.txt file in BC Manager to get it working again.
Note: This crash applies to Lightroom CC 2015.3, not the MIDI2LR executable itself. However, there is still an issue with MIDI2LR that causes it to crash if I click "Rescan MIDI devices", but that's a separate issue.
Thanks. Now this is clearer. It's related to #116. You're just seeing the same phenomenon, but so frequently that some memory leak in Lightroom is killing it.
I think the following may fix it. Could you try the following patch and see if that removes the crash?
Open the file MIDI2LR_Client.lua in notepad, and add the line:
if LrApplicationView.getCurrentModuleName() ~= 'develop' then return end
immediately after the the lin
function sendChangedParams( observer )
so that
function sendChangedParams( observer )
for _, param in ipairs(DEVELOP_PARAMS) do
if(observer[param] ~= LrDevelopController.getValue(param)) then
MIDI2LR.SERVER:send(string.format('%s %g\n', param, develop_lerp_to_midi(param)))
observer[param] = LrDevelopController.getValue(param)
MIDI2LR.LAST_PARAM = param
end
end
end
becomes
function sendChangedParams( observer )
if LrApplicationView.getCurrentModuleName() ~= 'develop' then return end
for _, param in ipairs(DEVELOP_PARAMS) do
if(observer[param] ~= LrDevelopController.getValue(param)) then
MIDI2LR.SERVER:send(string.format('%s %g\n', param, develop_lerp_to_midi(param)))
observer[param] = LrDevelopController.getValue(param)
MIDI2LR.LAST_PARAM = param
end
end
end
Make sure to restart Lightroom after making these edits.
You can also download the latest version at https://github.com/rsjaffe/MIDI2LR/releases/tag/v0.8.2. That has the fix included.
v0.8.2 seems to have fixed the problem for me. Thank you!!!