The following expression fails when called from an LrExportServiceProvider script:
LrTasks.pcall (LrFileUtils.exists, ".")
It generates the error "attempt to yield across metamethod/C-call boundary". This makes my Debugging Toolkit difficult, if not impossible, to use with an export service. (The toolkit uses LrTasks.pcall() to catch errors, and it uses LrFileUtils.exists() to implement a more useful require().)
Tested in LR CC 2015.8 / OS X 10.11.5.
To reproduce the bug:
1. Start with a copy of "ftp_upload.lrdevplugin" from the "Sample Plugins" folder of the Lightroom SDK 6.0.
2. Insert these lines at the top of "FTPUploadServiceProvider.lua":
local LrFileUtils = import 'LrFileUtils'local
LrTasks = import 'LrTasks'
LrTasks.pcall (LrFileUtils.exists, ".")
3. Try to export a photo with FTP Upload. The post-processing action is never invoked.
4. Go to File > Plug-in Manager and observe that the plugin encountered an error:
5. Comment out the lines inserted in step 2 and reload the plugin in the Plug-in Manager.
6. Export a photo with FTP Upload again and observe that the post-processing action is invoked, prompting for a username and password.