• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Internal error aString!-nil

Community Expert ,
May 20, 2009 May 20, 2009

Copy link to clipboard

Copied

A plug-in that works correctly on PC is generating an error on the Mac. The plug-in adds a menu command and launches a dialog box, but running it on the Mac produces this error dialog:

Internal error has occurred - Invalid parameter not satisfying :  aString!-nil .

After that error occurs, the PlugIn Manager is unavailable (similar error message) and only becomes accessible after a restart. The plugin is shown to be running, but any subsequent attempt to run the menu item causes the error.

To eliminate the menu command's code, I have removed almost all the code, but the same problem happened. I have also replaced its code with code from another plug-in that does work on the Mac. Again no solution. I have also changed the LrToolkitIdentifier and plug-in name.

By now, I recognise enough of the messages to suspect that this is an odd one. Any thoughts?

John

TOPICS
SDK

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 22, 2009 May 22, 2009

Copy link to clipboard

Copied

[Deleted private e-mail response...]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 22, 2009 May 22, 2009

Copy link to clipboard

Copied

John sent me a copy of his plug-in and I've just had a chance to look at it.

The problem was that his LibraryMenuItem.lua file was encoded as UTF-8 and had the UTF-8 byte-order-mark (EF BB BF) at the start of the file.

Though Lightroom's APIs are expressed in terms of UTF-8, that is a choice made by the Lightroom team. Lua itself has no knowledge of UTF-8 and doesn't know what to do with these odd bytes at the start of the file.

Solution: Re-save the file as plain ol' ASCII.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2009 May 24, 2009

Copy link to clipboard

Copied

LATEST

Well spotted Eric.I've now isolated the problem to using the most recent version of ExtendScript ToolKit on the Mac and not noticing ESTK3's new preference for the UTF-8 signature. Its default is "Always write signature" which does exactly what it says on the tin - saving the file with the default preference results in the error, switching it to "Never" resolves it.

The Mac-PC thing is not a case of LR handling UTF-8 encoded files differently on different OS's. It's simply the result of initially writing the plug-in an earlier version of ETSK which doesn't have this preference.

Thanks for your help

John

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines