Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2014-08-28 04:12:05

chris.palmer
Member
From: Guildford, UK
Registered: 2014-07-19
Posts: 56

Publisher hang when using LUA

Has anyone run up against a problem publishing galleries that use LUA in the Caption? I can set the Caption (in the Publisher Setup) to something like {Caption} {Exposure} and it works fine (after uploading the template and republishing the gallery). If however I use any LUA construct instead, even something very simple like {LUA=return Exposure}, Lightroom hangs when publishing the gallery. No errors in the web server logs. I can cancel the publishing ok but then have to restart Lightroom before it works properly again. On the server the gallery is left with no images.

It seems very similar to a problem reported once with CE2 (http://community.theturninggate.net/top … -updating/) but no solution was posted that I can find and of course that was quite a while ago.

Using Win7 64-bit, Lightroom 5.6, CE4, Publisher 2.1.2, Gallery 6.0.5b, TTG-BE 2.0.2.

Any clues as to where to start looking would be greatly appreciated.

Thanks
Chris

Offline

#2 2014-08-28 08:55:43

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Publisher hang when using LUA

Hi Chris, unfortunately I have never able to replicate the problem in order to fix it.

Offline

#3 2014-08-29 17:30:37

chris.palmer
Member
From: Guildford, UK
Registered: 2014-07-19
Posts: 56

Re: Publisher hang when using LUA

Hi Ben

I've started doing some investigation. Results so far:

  • Installed a new backend with default settings - no difference.

  • Installed the publisher plugin in LR on another workstation also on Win7-64, pointing at new backend. It worked.

  • Re-installed and re-loaded Publisher plugin on original workstation - no difference. Nor does restarting LR or rebooting help.

  • Deleted LR from original workstation, including Lightroom Settings. Reinstalled and restored settings saved from before experimenting with LUA. Created galleries in new backend with LUA. It worked.

  • Tried to republish galleries in the old backend (the publisher settings for this hadn't been cleared down when I re-installed). Failed. And now I can't even publish galleries using LUA to the new backend either.

  • Re-installed LR again, this time without clearing down the preferences. No difference.

  • Re-installed again, and cleared down prefs. Can again publish to new backend. Tried publishing the same couple of photos repeatedly to new galleries, same template. On the third time it failed, and now can't publish anything with LUA again. I don't think I went near the original backend publisher instance but can't be sure.

  • On the second workstation tried repeatedly publishing. 8 times worked ok. Now it's late at night.

It also makes no difference whether I am republishing the photos or just the metadata.

I'll keep at it but there does seem to be a certain random element involved. Wondering if it is some sort of timing window?? Workstation with the trouble is a pretty high spec, the second one is a modest laptop.

Alternatively there is some corruption in publisher info for the original instance, or something that is causing corruption. I'm on the point of blowing away absolutely everything to do with LR and Publisher on the original workstation, and starting again. On the bright side, the LUA script I had written worked first time....

Any ideas, or info from anyone else, would be greatly appreciated.

Thanks
Chris

Offline

#4 2014-09-01 03:06:58

chris.palmer
Member
From: Guildford, UK
Registered: 2014-07-19
Posts: 56

Re: Publisher hang when using LUA

I've completely given up on LUA now. It's ok on some machines and not others, and even then it sometimes self-destructs when just repeating the same operations. Sometimes a reinstall revives it, and sometimes it doesn't. And sometimes it works when concurrent publish operations are running and sometimes it doesn't. I'm completely beaten.

I've got some staticly generated ones that are acceptable so sticking with those for now. If anyone ever does figure this out please post how!

Chris

Offline

#5 2014-09-01 10:35:58

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Publisher hang when using LUA

Hi Chris,  Thanks for going to all the effort in trying to work out a cause.  I still haven't been able to replicate any errors, which doesn't help.  Can you provide me with the Outlet information that you're trying to use?  e.g. {LUA=return Caption}

The code that handles outlets wasn't written by us.  We adapted the code to work with Publisher.  The code is quite straightforward for all of the tokens, other than for LUA, which is a large and complicated function.  If I could replicate the error, then I would at least have a chance of working out where in that function it was failing.  Another option would be if I add log statements after every line of the function and pass you a Publisher build to try out.  Then by looking at the log file, we should at least be able to work out the last line that has been reached before the function hangs.

Offline

#6 2014-09-01 17:39:07

chris.palmer
Member
From: Guildford, UK
Registered: 2014-07-19
Posts: 56

Re: Publisher hang when using LUA

Hi Ben

For the testing I was using the simplest LUA I could - {LUA=return Caption} as the Caption outlet. I'd be happy to run a diagnostic version of Publisher with logging if you could supply it.

Something else that might be relevant, especially as there do seem to be timing issues. As I was recreating everything from scratch I had to republish a lot. I have noticed that once I get above about 100 images in a gallery that they sometimes don't all publish. I get left with a few still in the to-be-published state. Hitting the publish button again pushes them out. This was noticeable when I was only pushing metadata updates, even one gallery at a time.

I also noticed, when I did the big publish-everything-from-scratch (with about 15 galleries publishing simultaneously) that a random selection (maybe 20%?) of the published photos lacked the Caption metadata. In this case Caption was constructed from Caption, Exposure etc just as normal tokens, not using LUA.

I'm starting to suspect some form of unsafe multi-threading happening, which would tend to be consistent with the randomness and greater probability on higher-end workstations. It might even be possible that a fault like that could be aggravating the LUA problem if their code is not thread-safe but is being called in a threaded environment without appropriate locking.

All speculation of course. As I said, happy to help diagnose where I can.

Thanks
Chris

Offline

Board footer

Powered by FluxBB