MIDI2LR icon indicating copy to clipboard operation
MIDI2LR copied to clipboard

Plugin Options Error

Open StevenKersting opened this issue 10 years ago • 17 comments

OSX El Captian, LRCC 2015.4, 9.5

I started getting this error today. So I downloaded/installed latest version of 9.5. I removed previous version from LR, installed this version and rebooted computer.

Plug-in error log for plug-in at: /Applications/Adobe/Plug-ins/MIDI2LR-9.5/MIDI2LR.lrplugin

**** Error 1

An error occurred while attempting to run one of the plug-in’s scripts. AgObjCBridge tried to call missing selector 'cellClass' on NSView

Revert to 9.4 and the error is gone. Revert back to 9.5 and error returns.

StevenKersting avatar Feb 05 '16 14:02 StevenKersting

Interestingly 9.5.3 was running fine previously and nothing changed that I am aware of. I tried resaving options from 9.4.1 and then reloading 9.5.3

StevenKersting avatar Feb 05 '16 14:02 StevenKersting

That is very odd. You're seeing an internal Lightroom error. I don't know what to do with it, as AgObjCBridge, cellClass and NSView are all internal LR identifiers--I don't see any information that would help me identify what is causing this.

One suggestion: check the attributes of /Applications/Adobe/Plug-ins/MIDI2LR-9.5/MIDI2LR.lrplugin to see that you have write access.

rsjaffe avatar Feb 05 '16 15:02 rsjaffe

When do you get that error? When the plugin loads or somewhere in the options?

mischnic avatar Feb 05 '16 15:02 mischnic

I have read/write access to the plugin. The error occurs when accessing the options.

I can just switch between the version (9.4.1 and 9.5.3) using the plugin manager to enable/disable... No need to restart LR or anything.

StevenKersting avatar Feb 05 '16 20:02 StevenKersting

I've gone thru the hassle of uninstalling/reinstalling LR with no change... it would be nice if it said which script it was trying to run.

StevenKersting avatar Feb 05 '16 20:02 StevenKersting

Ok, I've gone thru all of the releases. The problem does not occur with any of the 9.4 versions to include the 9.5 beta (9.4.2). But it occurs with all of the 9.5 versions...

I thought I was using a 9.5 version, but it may have been the pre-release and the error started to occur when I updated.

StevenKersting avatar Feb 05 '16 21:02 StevenKersting

Renamed the LR preferences.plist... added 9.5.3 and got the message "loading defaults"... error still present.

The script that is being called and is causing the error must be in a recently changed file.

StevenKersting avatar Feb 05 '16 21:02 StevenKersting

Did the application load successfully, or was the error before application load? Can you open the options dialog?

NSView is an OSX-specific class, so something odd is happening there that won't show up on Windows computers. However, we have other OSX users and I haven't heard anything from them yet...

rsjaffe avatar Feb 05 '16 21:02 rsjaffe

I've isolated the issue down to the limits.lua file or something being called by it. If I take the file from 9.4.2 and replace the one in 9.5.3 with it, then 9.5.3 loads and I can access the options.

I tried commenting out the new import paramlist but that generated a different error and the plugin didn't load... I haven't found an easy way to do a file compare so I'm at a bit of a standstill. I also noted that several of the lua files in 9.5.x show up as being exe files but they do not in 9.4.x. In trying to diagnose the issue I extracted the files from the plugin that were changed this week and the same files from 9.4.2. Here's a screenshot of those files side by side.

screen shot 2016-02-05 at 4 53 45 pm

StevenKersting avatar Feb 05 '16 22:02 StevenKersting

Could you try copying the permissions from another lua file (e.g., Client.lua) and change Limits.lua and ClientUtilities.lua to match that set of permissions?

Here is the diff https://www.diffnow.com/?report=13brp . Not much has changed. My suggestion is to change

return f:static_text{title = 'Limits only displayed when in Develop Module.'}

to

return f:separator()

as NSView is associated with drawing things, and that's the only change in the file that relates to screen display.

rsjaffe avatar Feb 06 '16 00:02 rsjaffe

When I change it to return f:separator() I get an error relating to attempting to index a nil value. But if I change it to return nil as in the earlier version it works w/o error. The plugin loads and I can access the options dialogue.

StevenKersting avatar Feb 06 '16 02:02 StevenKersting

Another relevant consideration... the failure to load the options dialogue does not occur if the develop module is active (i.e. that return isn't called). It occurred to me to try from the develop module due to the static_text that was supposed to be displayed.

This may be the main difference I was failing to note before... my tweaking/testing was in the develop module. At some point I must have switched to the library module and got the error.

StevenKersting avatar Feb 06 '16 03:02 StevenKersting

Unfortunately return nil fails in Windows. Could you try return {visible = false}? That should work in both systems.

rsjaffe avatar Feb 06 '16 03:02 rsjaffe

So, return nil allows the options dialogue to open with any panel active (limits not displayed). Any version of return:f causes an error in any panel other than develop...

I have tried rewriting the code so that the 'Limits only displayed when in Develop Module.' was defined in a separate line as a string and calling that string for the return with no success.

StevenKersting avatar Feb 06 '16 04:02 StevenKersting

Did you try return {visible=false}

that avoids needing to use f:

rsjaffe avatar Feb 06 '16 04:02 rsjaffe

just tried it return {visible = false} works w/o error from any module.

StevenKersting avatar Feb 06 '16 04:02 StevenKersting

Great! Release https://github.com/rsjaffe/MIDI2LR/releases/tag/v0.9.5.4 is out.

rsjaffe avatar Feb 06 '16 04:02 rsjaffe