Export plugin on Macintosh not honoring LrTasks.startAsyncTask ?

Hi -- I need some help again!
I'm writing an export plugin for my own application. 
On Windows, everything works as expected -- I can start the export and then go back to doing other tasks in Lightroom while my application does its own thing.
But on Macintosh, Lightroom hangs with the rotating "busy" icon until my application quits.
I am baffled by this behavior because I think I've wrapped everything I'm doing in calls to LrTasks.startAsyncTask.
Apparently I'm missing something about how asynchronous tasks work in Lightroom, or at least in Lightroom on Macintosh.
Do you have any suggestions about how I can get the Mac version to keep Lightroom responsive while my exported-to application does its thing?
Thanks!
--Rik
For further information...
Mac OS X 10.9, Lightroom 4.2
Here is the current structure of my ExportToMA.lua file
local myLogger        = LrLogger("myLogger")
myLogger:enable("logfile")
ExportToMA = {}
ExportToMA.outputToLog = function(param)
  myLogger:trace(param)
end
LrTasks.startAsyncTask( function()
    myLogger:trace("Entering outer LrTasks.startAsyncTask function")
    LrTasks.startAsyncTask( function()
        myLogger:trace("Entering inner LrTasks.startAsyncTask function")
        local activeCatalog = LrApplication.activeCatalog()
        local frameSet     = activeCatalog.targetPhotos
        local exportSession = LrExportSession( {
            exportSettings = {
                LR_exportServiceProvider       = "net.mydomain.MAloader",
                LR_exportServiceProviderTitle  = "My Application",
                LR_format                      = "TIFF",
                LR_tiff_compressionMethod      = "compressionMethod_None",
                LR_export_bitDepth             = 16,
                LR_export_colorSpace           = "sRGB",
                LR_minimizeEmbeddedMetadata    = false
            photosToExport = frameSet,
        myLogger:trace("Before doExportOnCurrentTask()")
        exportSession:doExportOnCurrentTask()       
        myLogger:trace("After doExportOnCurrentTask()")
        myLogger:trace("Exiting inner LrTasks.startAsyncTask function")
    end )
    myLogger:trace("Exiting outer LrTasks.startAsyncTask function")
end )
When run on Windows, the log file contains a sequence of messages like this:
12/30/2013 10:36:48 TRACE    Entering outer LrTasks.startAsyncTask function
12/30/2013 10:36:48 TRACE    Exiting outer LrTasks.startAsyncTask function
12/30/2013 10:36:48 TRACE    Entering inner LrTasks.startAsyncTask function
12/30/2013 10:36:48 TRACE    Before doExportOnCurrentTask()
12/30/2013 10:36:49 TRACE    After doExportOnCurrentTask()
12/30/2013 10:36:49 TRACE    Exiting inner LrTasks.startAsyncTask function
   <meanwhile my application continues to run while Lightroom stays responsive>
But when run on Macintosh, this is what happens:
2013-12-30 19:01:50 +0000, TRACE    Entering outer LrTasks.startAsyncTask function
2013-12-30 19:01:50 +0000, TRACE    Exiting outer LrTasks.startAsyncTask function
2013-12-30 19:01:50 +0000, TRACE    Entering inner LrTasks.startAsyncTask function
2013-12-30 19:01:50 +0000, TRACE    Before doExportOnCurrentTask()
  <indefinitely long pause while my application runs>
2013-12-30 19:02:44 +0000, TRACE    After doExportOnCurrentTask()
2013-12-30 19:02:44 +0000, TRACE    Exiting inner LrTasks.startAsyncTask function
Ideas?

> I'm confused by your application: if you already have a renditions loop, then why are you starting another export
I apologize for the confusion. 
In each case I've exercised, there is only one export and one renditions loop. 
The code I've been showing you is what gets executed to service a menu entry in File > Plug-In Extras.  I'm focusing attention on that case because it seems more transparent.  Notably, I get to specify which task the export happens on. 
The renditions loop in my processRenderedPhotos function is in another script.  The renditions loop gets called in two places: 1) from File > Plug-In Extras via the explicit doExportOnCurrentTask (now doExportOnNewTask), and 2) from Lightroom's internal processing of File > Export... and File > Export with Preset.
> did you try doExportOnNewTask?
I tried it just now.  It did not change the behavior.
I also added some more diagnostics.  Here is what happens on the Mac:
2013-12-31 01:09:31 +0000, TRACE    Entering outer LrTasks.startAsyncTask function
2013-12-31 01:09:31 +0000, TRACE    Exiting outer LrTasks.startAsyncTask function
2013-12-31 01:09:31 +0000, TRACE    Entering inner LrTasks.startAsyncTask function
2013-12-31 01:09:31 +0000, TRACE    Before doExportOnNewTask()
2013-12-31 01:09:31 +0000, TRACE    After doExportOnNewTask()
2013-12-31 01:09:31 +0000, TRACE    Exiting inner LrTasks.startAsyncTask function
2013-12-31 01:09:31 +0000, TRACE    MyApplicationUploadTask.processRenderedPhotos prefs.maPath: /Users/myaccount/Desktop/MyApplication.app/Contents/MacOS/JavaApplicationStub
2013-12-31 01:09:31 +0000, TRACE    tempPath: /var/folders/4n/2lxf6v593x5_c3lmx_jghgnw0000gn/T/temp_lre_ma_1230170931
2013-12-31 01:09:31 +0000, TRACE    nPhotos = 2
2013-12-31 01:09:32 +0000, TRACE    source path/Users/myaccount/Desktop/jpeg-8d/testorig.jpg
2013-12-31 01:09:32 +0000, TRACE    destination path: /var/folders/4n/2lxf6v593x5_c3lmx_jghgnw0000gn/T/6F05FC8E-126C-47E0-AD51-C545CE0DA66D/tes torig.tif
2013-12-31 01:09:32 +0000, TRACE    source path/Users/myaccount/Desktop/jpeg-8d/testprog.jpg
2013-12-31 01:09:32 +0000, TRACE    destination path: /var/folders/4n/2lxf6v593x5_c3lmx_jghgnw0000gn/T/6F05FC8E-126C-47E0-AD51-C545CE0DA66D/tes tprog.tif
2013-12-31 01:09:32 +0000, TRACE    just before LrShell.openFilesInApp
   <long pause here, while I let my application run for a while>
2013-12-31 01:10:00 +0000, TRACE    just after LrShell.openFilesInApp
The LrShell.openFilesInApp call happens after my renditions loop, at the very bottom of my processRenderedPhotos function, which is now separated by 3 levels of asynchronous tasks from whatever task initially serviced the menu entry.
Nonetheless, on Macintosh only, as soon as LrShell.openFilesInApp is called, Lightroom comes to a grinding halt heralded by a spinning beach ball. 
It's as if, deep under the covers, LrShell.openFilesInApp (on Macintosh only!) is telling the rest of Lightroom to wait until the spawned application terminates. 
I know, it sounds crazy to me too, and I've been programming for close to 45 years.
At the moment, the only way I see to work around this problem is to provide a separate "application" that is actually a spawn-and-terminate, so that LrShell.openFilesInApp will see a rapid termination of the thing that it launches.  That seems like a lot of trouble for what I've been hoping is a simple misunderstanding on my part.
The one thing I can see different between my app and anybody else's is that mine is written in Java, so the thing that gets launched by LrShell.openFilesInApp is the JavaApplicationStub.
Any other ideas?
--Rik
PS.
> Do you have this problem with hard drive export too?
I doubt it, but I don't know for sure.  On my test Mac, at the moment, there are not enough files to keep hard drive export running long enough to notice.

Similar Messages

  • Pages '08 Export does not honor the "Hide extension" checkbox

    I have noticed that Pages '08, even with the latest update (3.0.3), does not honor the state of the "Hide extension" checkbox in the Export save dialog (or "sheet" that slides out from the title bar). Specifically, I have seen this happen when exporting to Word. When un-checking the "Hide extension" checkbox, the filename is displayed in the dialog with the .doc extension, but the file appears in the save folder (anywhere in the file system) without the .doc extension until I do a Get Info on the file and un-check Hide Extension in the Name & Extension section.
    This is really annoying because I hate automatic hiding of file extensions in general, and I find it unacceptable with any kind of MS Office docs because my Windows-using colleagues can't seem to cope without a file extension they recognize.
    Also note that this does not seem to affect the Save or Save As dialogs in Pages '08, only the Export save dialog. I can create a regular Pages document, do a Save As, uncheck Hide Extension, and I'll see the document show up in the file system with the .pages extension.
    Is this a known bug in Pages '08? I can't find any mention of it in the forums. I also want to know if this is fixed in Pages '09. I've been looking for a way to report this as a bug, but am not having much luck.

    LionMage wrote:
    Is this a known bug in Pages '08?
    Yes. just add the extension manually in the Finder.
    I can't find any mention of it in the forums.
    It has been mentioned many times but not lately.
    I also want to know if this is fixed in Pages '09.
    No.
    I've been looking for a way to report this as a bug, but am not having much luck.
    +Menu > Pages > Provide Pages Feedback+
    Peter

  • Lightroom Export Plugins not on the Website?

    Hi!
    I was directed to this portion of the Adobe website:
    http://www.adobe.com/products/photoshop-lightroom/plugins-presets.edu.html#export-plugins
    I have found a few plugins that I would like to experiment with, namely the Costco one and the Blog one, however everytime I click on one of them I just get a page that says "We're sorry we've encountered an error processing your request" I am on Google Chrome on a PC, anyone know how I can actually get to these plugins where I can try to get them installed into Lightroom 5??

    Thanks, I tried again this time using IE and was able to download them. For anyone paying attention at Adobe you might have an issue with some of those pages refrenced above with Google Chrome.

  • How to get the destination path in an photoshop sdk export plugin when using a batch action?

    Hello,
    I've written an exporter plugin (not save-as) that exports a given file to a custom format.
    I was able to open a file selector dialog and choose a path that is then transported to the saving location.
    Now my problem is: Another intended use is batch exporting many files. The user records an action with the export step and then applies a batch on it.
    The PS batch window allows you to select the destination to be a directory where the exporter should write the data. Fine.
    Now how do I get this path? When running in batch mode the silent flag is set for my plugin so I do not spawn a file selector dialog to annoy the user.
    But I am also unable to obtain the path which was selected by the user in the batch window.
    The SDK automation plugin Getter has some code to retrieve the path of the file and even that fails as it cannot obtain anything.
    PropertyUtils.h has some PIGetWorkPathIndex and PIGetPathName functions but I always get 0 when asking PIGetNumberPaths, and get -1 with PIGetWorkPathIndex.
    I would be thankful if somebody could hint me how I can retrieve directories.
    It even seems impossible for me to get the path where the file is actually saved. The filter plugin called Propertizer utilizes a function called PIGetDocumentName but this only outputs the file name, not the full path.
    (Just to be sure: The file on which the tests run is already saved to disk, if that matters)
    Another fun part is: When I record an export step, what is the directory I am exporting into?

    Ok, after lots of reading the sdk sample outbound I've realized that or plugin is broken.
    When recording an action the outbound plugin stores the current path to gAliasHandle which is then recorded as a scripting parameter. Now when I execute the action I get the alias handle.
    However how is this supposed to work with an export plugin and batch processing with a "destination" set to a target? Is this even possible or do I need to double click the export step in the action and "reset" the location even if that causes the entire exporter to run again?

  • Play from an Export plugin?

    Hi,
    From a complete novice at Photoshop plugins...
    I am wondering if there is any underlying reason why I can't call sPSActionControl->Play() from an Import or Export plugin.
    I have a very simple import and export plugin pair to port from Windows to Mac, and both call a third Listener plugin to keep track of open images. The Windows code creates a hidden window (HWND) in the Listener and messages that from Import and Export. I was thinking that I could replace this by calling Play to send a custom event to the Listener, but can't get it to work.
    In fact any call to sPSActionControl fails. [The actual failure is sSPBasic->AcquireSuite in PIUSuites.h returns error 'Parm' when called for the sPSActionControl suite. sSPBasic has been set up, looks ok and sSPBasic->AcquireSuite works when called for sPSActionDescriptor suite].
    As a test (to remove other sources of error), I pasted the following lines into the PluginMain function of the History plugin in the SDK sample code and this fails in the same way:
    // TEMP code to test use of SPActionControl.
    SPErr error = kSPNoError;
    DescriptorTypeID typeID;
    error = sPSActionControl->StringIDToTypeID("Save Prestige Image dictionary", &typeID);
    So I'm wondering (a) is there some underlying reason why this doesn't work, or (b) is there some extra bit of initialisation or setup I need to do before calling sPSActionControl functions?
    Tearing out what little hair I have left!! Any help or suggestions most welcome.
    Thanks
    Terry Smyth
    PS Is there another way (apart from Play) to communicate from one plugin to another?

    Yes, there are many reasons.
    But the biggest reason is that it's an export plugin, and not an automation plugin.

  • Any Flickr Export plugin available for Aperture 3?

    I was happy to see Flickr included in Aperture 3, but to say the least, it really *****.
    The worst thing is that it applies my own keywords to all the uploaded images. I don't want the (full) names of peoples in my pictures to display at Flickr and having my local-language keywords on my images probably doesn't help Flickr where most users are speaking english (compared to my local language).
    Basically I wish the Flickr export feature would allow me to either "not sync keywords" or modify my keywords to determine if I want them exported or not - like Lightroom does.

    Thanks for the warning Martin. I already know from iPhoto's flickr export that you gotta be careful. I guess the iPhoto/Aperture flickr export is great for those wanting REAL simplicity, but if you want to adjust just one or two settings, it's a no-go and it kinda *****
    I hope there's an AP3 flickr export plugin out there? I would be willing to spend $10 on it.

  • Upgraded to CS4 and now no FLV export plugin in Quicktime

    When using CS3 Master Collection (on Mac 10.5.6) I could use Quicktime or Apple Compressor (uses QT) to export .mov files to .flv files. Then I upgraded to CS4 Master Collection and everything still worked. Then I got tired of having all the CS3 programs still on my computer so I used the CS3 disc to uninstall CS3. Later I noticed the Flash export within Quicktime was gone. So I put back CS3 install disc and just installed the Flash export components and then the .flv export was back on Quicktime. Though I solved the problem, shouldn't CS4 (upgrade) have that plugin as well? Did I do something wrong? Are other things going to be missing or go wrong since I uninstalled CS3? Let me know what you think. Thanks

    Hi Todd, I bet you upgraded from a PPC machine.
    The real problem here is that Flash 8 is/was not a universal binary (i.e. an app that is supported on both the PPC and the Intel Macs).
    So the included "FLV Exporter" QuickTime component does not show up in the export dialog even if it's installed as it just does not get loaded.
    (Should be in "NameOfSystemHD/Library/QuickTime").
    If you update to Flash 9/CS3 you get a universal binary app and QT exporter component and it will work again on your (Intel) Mac Pro.
    Btw., the Flash support that was in QuickTime had nothing to do with export - especially not with FLV - but with playback of Flash content.
    Addionally, AE 7 isn't a universal binary either, so you will suffer some pretty serious performance losses.
    Best regards, Oliver

  • Flash Video Exporter plugin for FInal Cut Pro

    Does anybody know how to install the Flash Video Exporter
    plugin for Final Cut Pro so it shows up as an option in FCP?
    I want to create FLVs directly from FCP.
    Thanks

    http://www.adobe.com/devnet/flash/articles/flv_exporter_03.htm
    Scroll Down - its about mid page
    This is on the intro page:
    Note: You must have Flash MX Professional 2004 installed on
    your machine to use the Flash Video Exporter with your video
    editing application. The only exception is using the exporter in
    Demo Mode.

  • LR3 Flickr export plugin. Is the export without ICC profile available?

    Hey guys,
    I want to use the new integrated Flickr export plugin in LR3 to publish my picture on my photostream.
    Since I want my pictures to look the same accross all browsers I want to convert them to sRGB and I don't want to embed the ICC profile.
    I haven't seen any option in LR3 that allows me to do so. I have to do it in photoshop (save for the webs without profile) and then import it manually using Flickr update webpage. In my opinion, it is kind of weird that Adobe didn't think about that. Is there an option somewhere, a workaround?
    Thank you,
    jean bapt

    Bob_Peters wrote:
    jean bapt wrote:
    Ohhhh my godddddd!!!
    Here is the problem:
    http://www.carlchapman.com/colour-management/new-safari-4-browser-color-manageme nt-error/
    Safari 4 color manager is bugged!!!! And guess what I was using? Safari 4... I just upgraded to Safari 5 and now the color of the tagged images look great. They look exactly like in CS4 and FF 3.6.
    Everything I could read or everything you explained didn't make sense with this stupid Safari bug as it was displaying crazy colors; But now it does. I do understand now why I don't need to strip the profile.
    Thank you very much for taking the time to help me. I really appreciated your patience.
    Have a good weekend
    JB
    At the risk of raining on your parade...
    I just opened the files again in CS4 and in Safari 4.0.5 and the all look the same, just as they did in Safari 5.0.
    Safari 4.0.5 displays the files as I would expect, at least on my MacPro and MacBook Pro.  You may have found a solution but I'm afraid you don't really know what the problem was.
    Sorry, JB.  Safari does know how to correctly display images.
    Ah ah! You are not raining on my parade. From the comments on the page I have mentioned, it seems that not everybody has this issue. Could it be an issue with another Safari version (4.0.??). I don't remember exactly which version I had. Could it be a compatibility issue with some driver or ...?
    Even though I am not sure what the problem was, don't you think I can assume that the problem was not with my files or my calibration?

  • Kindle Export plugin No image resize

    Hi there,
    I do all my formatting in inDesign and export to ePub or mobi using the built in ePub export or the Kindle export plugin from amazon.
    I've pretty much got the whole ePub thing sorted out but have come across a problem when it comes to exporting the mobi file. If i have images in the book they all seem to do their own thing with regards to size. I find that most of the images scale down and display a lot smaller than i would prefer on the kindle.
    I've tried playing with the export settings, optimise vs original vs formatted, not formatted and nothing really changes. Also i've physically change the size of the image in the inDesign docuement and still, no change.
    I'm hear as a last resort before I lose my mind. Anyone out there that can help?

    The advise I got from the Kindle people when I had the same issue was to use Images/Copy Images/Original. Remember that users will have the ability to zoom out the images.

  • Removal of plugin that is not wanted

    hi gang....i recently bought a plugin for logic pro...(virtual guitarist 2)...unfortunately i am displeased with it..i want to remove it from my hard drive and from logic pro....there is no uninstall on the VG2 disk..how do i remove it?...it seemed to have cause a unwanted problem with wave burner...so how do i get it off my puter with its license program?....thanks

    The plug-in itself will reside in one or more of the following directories:
    ~/Library/Audio/Plugins/Components
    ~/Library/Audio/Plugins/VST
    Macintosh HD/Library/Audio/Plugins/Components
    Macintosh HD/Library/Audio/Plugins/VST
    (Note...the tilde ~ character represents your user home directory.) Delete anything named Virtual Guitarist (or something similar) from these directories.
    As far as I know, Steinberg also uses a dongle with this software, so you'll need to find out where their dongle driver is installed and remove that as well. I don't use Steinberg products, so I can't tell you where that is, but if it's not in their manual, their tech support should be able to help you.
    However, before you throw out the software, I'd try getting their tech support to help you resolve the issue. Dongle drivers are often a source of system conflicts, so it may be a simple matter of getting an updated dongle driver from Steinberg, to get yourself back on track.

  • Pixelpost export plugin for Aperture

    I found an export plugin for Aperture to send photos to Pixelpost blogs. I'm posting this here in case someone searches the discussion forums looking for one. The link is:
    http://www.pixelpost.org/extend/addons/aperture-pixelpost-plugin/
    or from the developer's site:
    http://www.macroni.be/index.php?x=plugin
    His comments:
    "APP (Aperture Pixelpost Plugin) uploads the selected picture from your Aperture library to you pixelpost blog without having to export the picture first, and then uploading it manually."
    I've tested it with APP v 1.3, Aperture v 2.1.4, OS X 10.6.1, Pixelpost v 1.7.3. The plugin does work, but when you export more than one photo, they all have identical metadata information. You'll have to rename and retag in the Pixelpost control panel. The plugin also does not remember your Pixelpost login information between sessions. In spite of these problems, it is a useful plugin for us Pixelpost users.

    Hey - I downloaded it and sent $ the day he put up the note EXCELLENT implementation, flawless installation and FAST uploading. Do yourself a favor if you're a Smugger. As said above, a marriage of two great products!!
    david
    MP, PB12   Mac OS X (10.4.8)  

  • Watch me write an export plugin

    I have started blogging my experience writing an export plugin for Aperture:
    http://homepage.mac.com/bagelturf/cocoa/rwok/rwok.html
    It's actually pretty straightforward, but then I'm not very far along yet. The idea behind the plugin is that it exports images and gives them random names. Later I will add other randomness. I am calling it Random Wok.

    The only way to do that would be with a script or automation plugin.
    An export plugin assumes that you are going to be doing the file format writing (without calling back to Photoshop file IO).

  • Premier 7 Export Plugin Migration

    For the last couple years our company has developed a plugin for Premier Elements 7 that we use to create video content for our product.  We will need to move to the latest version of Premier as 7 is no longer available.  But from what I can tell the Export plugin support is no longer supported in Premier 9.  What is the process for migrating export plugins to the latest versions of Premier?
    Thanks if advance for any help.

    Welcome to the forum.
    You pose a good question.
    I do not know if any of the regulars here can help much, but perhaps an Adobe employee can stop by, and give you an answer.
    I do not know of an SDK for PrE, but that does not mean that one is not available. I know that a few 3rd party developers DO write plug-ins for PrE, such as NewBlue FX, ProDAD, SmartSound and some more. They obviously have input from Adobe to help in their development process.
    One consideration for a plug-in developer, is that as of PrE 10, there are both 32-bit and 64-bit versions of the program, and that usually means two different plug-ins, one for 32-bit, and one for 64-bit. When PrPro (there IS an SDK for it) went to 64-bit only, with CS5, it took a little time for developers to rewrite their plug-ins, CODEC's, etc., for 64-bit programs. Most were able to do that fairly quickly.
    Wish that I had someone, or somewhere to direct you, but I do not. Maybe Steve Grisetti knows who/where you can get the necessary info?
    Good luck,
    Hunt

  • Delete Export Plugin?

    I have some old Export Plugins in Aperture. How do I delete them so that they do not show up under my export command in Aperture?
    Kevin

    Delete them via Finder. They are in either
    /Library/Application Support/Aperture/Plug-Ins
    or
    ~/Library/Application Support/Aperture-Plug-Ins

Maybe you are looking for