1 Reply Latest reply on Jan 7, 2017 10:51 AM by LoweMo.photo

    Plug-in code works on mac but fails on windows

    Beholder003

      Some good guys are trying to get a open sourced plug-in to run under Windows, which works perfectly fine under Mac:

      Plugin Fails on Windows. An internal error has occurred. · Issue #11 · musselwhizzle/Focus-Points · GitHub

       

      If anyone here has any experience with scripting lightroom under Windows and can help to find/fix the initial version there that would be greatly appreciated.

      Just to get over the initial Windows hurdle.

       

      It just seems so strange that some things work on a Mac but not on Windows.

        • 1. Re: Plug-in code works on mac but fails on windows
          LoweMo.photo Level 1

          Since I'm not running on Windows, I doubt I can supply any support, other than say that I've experienced the same thing from both directions. There are a couple of plugins I've helped extend, one originally developed on Mac, which I think only works on Mac (at this point, I'm not sure, since I have fixed a couple of things that might have been involved in the Windows incompatibility), and another developed on Windows, which took a while to figure out why it wasn't working on Mac—it turned out to be a prefs-panel formatting option whose value should have been numeric, but was being provided as "true" (boolean). Somehow, that worked on Windows, but made the whole prefs panel (Plugin Manager options) fail to render on Mac, which meant that I couldn't begin to contribute the planned functionality until the lead developer had found a Mac to test on and had located the issue. That particular bug meant that the plugin would have to be removed to even be able to re-open the Plugin Manager. Sometimes it's very minor errors that pass on one system and completely fail on another. And in some (other) cases, it seems that parts of the SDK may have been written by Adobe developers who failed to properly test that the use was fully cross-platform. It's frustrating, to say the least, since most of us only have Lightroom installed under one OS and, when writing a plugin, we have to assume that the SDK provides full support for both platforms.

           

          The debugging toolkit by johnrellis may help identify some code issues that *might* be involved in this problem: Debugging Toolkit for Lightroom SDK

           

          That said, the fact that most Lightroom code is not released on Github, and that many developers are re-inventing a lot of the same wheels for their own plugins (and compiling their Lua source code so that nobody else can see good, working examples of a particular SDK implementation) makes things harder. I think it can help to find other open-source Lightroom plugins (there are not many) which are known to work on both Windows and Mac, and search within those plugins whenever you are attempting to add a new feature to your own plugin, just to be sure you aren't botching syntax in a way that (somehow, inexplicably) only passes on your local OS.

           

          Having now perused the issue, itself, I am guessing that the issue may be outside of the LR SDK and be an issue with how Exiftool is used. There are a few other plugins written by Windows-based LR developers which use the Exiftool, so perhaps looking at any of those (that happen to have published source code) may provide a good example of an implementation that works nicely on both platforms.