3 Replies Latest reply on May 24, 2009 2:32 AM by john beardsworth

    Internal error aString!-nil

    john beardsworth Adobe Community Professional & MVP

      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

        • 1. Re: Internal error aString!-nil
          escouten Adobe Employee

          [Deleted private e-mail response...]

          • 2. Re: Internal error aString!-nil
            escouten Adobe Employee

            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.

            • 3. Re: Internal error aString!-nil
              john beardsworth Adobe Community Professional & MVP

              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