• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

P: SDK: waitForRender() returnes error in "Publish" (regression)

Explorer ,
Nov 29, 2022 Nov 29, 2022

Copy link to clipboard

Copied

calling waitForRender() in postProcessRenderedPhotos generates an error ("An unknown error occurred. This photo was not rendered") when called in a "Publish" setting. The same code works just fine in "Export" setting. The same code used to run just fine in the past for several years, this issue is new, a regression.
 
I also was able to reproduce the issue using the creatorfilter.lrdevplugin sample plug-in that is supplied with the SDK.
 
You can download a sample plugin demonstrating the issue from here: http://eyalredler.com/stuff/lightroom_bug.lrplugin.zip
 
To reproduce:
1. Add the plugin in "Plugin Manager"
2. Add the plugin (named "Publish Bug Demo") to an export and export - all should be well
3. Add the plugin to a publish and publish - "An unknown error occurred. This photo was not rendered" is presented for each image
 
Here's the plugin code (2 files):

 

 

 

--[[----------------------------------------------------------------------------
DemoFilterProvider.lua
------------------------------------------------------------------------------]]

-- Lightroom SDK

local LrLogger = import 'LrLogger'
local myLogger = LrLogger( 'libraryLogger' )


myLogger:enable( "print" ) -- or "logfile"


--============================================================================--

local DemoFilterProvider = {}

function DemoFilterProvider.sectionForFilterInDialog(f, p)
	return {
		title = 'Demo Plugin',
		f:row {
			place = "overlapping",
			f:static_text {
						width = leftSideWidth,
						alignment = "center",
						size = 24,
						title = "Demo Plugin"
					}
		}
	}
end

-------------------------------------------------------------------------------

function DemoFilterProvider.postProcessRenderedPhotos( functionContext, filterContext )
	local renditionOptions = {
		plugin = _PLUGIN,
		renditionsToSatisfy = filterContext.renditionsToSatisfy,
		filterSettings = function( renditionToSatisfy, exportSettings )
		end,
	}
			
	
	for sourceRendition, renditionToSatisfy in filterContext:renditions(renditionOptions) do
		local success, pathOrMessage = sourceRendition:waitForRender()

		if success then
-- 		perform some magic
		end
	end
end


function DemoFilterProvider.shouldRenderPhoto( exportSettings, photo )
	return true
end



-------------------------------------------------------------------------------

return DemoFilterProvider
​
--[[----------------------------------------------------------------------------

Info.lua

--------------------------------------------------------------------------------



------------------------------------------------------------------------------]]

return {

	LrSdkVersion = 3.0,
	
	LrSdkMinimumVersion = 2.0,

	LrPluginName = "Publish Bug Demo",
	
	LrToolkitIdentifier = 'com.yourcompany.yourproduct.lrpi',
	
	LrExportFilterProvider = {
		title = "Publish Bug Demo",
		file = 'DemoFilterProvider.lua',
	},
	
	LrPluginInfoUrl = "http://www.yourcompany.com",
	VERSION = { major=1, minor=2, revision=3, build=4, },
}

 

 

 

 
Bug Fixed
TOPICS
SDK

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Pinned Replies

Adobe Employee , Jan 12, 2023 Jan 12, 2023

adding missing status

Status Investigating

Votes

Translate

Translate
Adobe Employee , Feb 13, 2023 Feb 13, 2023

Greetings all,

 

Updates for Adobe Photography products have been released.  The February 2023  updates contain a fix for this issue. 

If you do not see the update in your Creative Cloud Application, you can refresh it by hitting [Ctrl/Cmd]+[Alt/Opt]+[ R ].

Note: It may take up to 24 hours for your update to be available in your Creative Cloud app.

 

Thank you for your patience.

Status Fixed

Votes

Translate

Translate
6 Comments
LEGEND ,
Nov 29, 2022 Nov 29, 2022

Copy link to clipboard

Copied

I see the error too. I'm unfamiliar with publish services so don't have much insight.  When I started LR with the -tracebacks command line switch, I saw these errors appear:

2022-11-29 13:51:11.714 Adobe Lightroom Classic[37140:3253401] 
AgExportRendition:recordRemotePhotoId: can not be called by an export filter
    0: global   assert              - C
    1: method   recordRemotePhotoId - 1692336380:2886+12
    2: method   renditionIsDone     - 1692336380:632+191
    3:          [unnamed]           - 1692336380:2826+6
    4:          [unnamed]           - 179812414:2266+12

Maybe that will give a clue as to the source of the problem or a workaround.

Votes

Translate

Translate

Report

Report
Explorer ,
Nov 30, 2022 Nov 30, 2022

Copy link to clipboard

Copied

Thanks for replying, I'm not familiar with the feature you used to get the log lines, how did you do it?

Votes

Translate

Translate

Report

Report
LEGEND ,
Nov 30, 2022 Nov 30, 2022

Copy link to clipboard

Copied

I saved a copy of Adobe engineer Dan Tull's post from a decade ago (long-since deleted) describing -tracebacks:

 

johnrellis_4-1669827652390.png

dantull

Employee  • 166 Messages  • 3K Points  10 years ago

 

The "unknown error occurred." message is typically something that can be diagnosed with a logging switch I added in 3.0 for just this purpose. Another example issue that tracebacks is good at diagnosing is the dreaded error switching modules message.

 

You need to pass -tracebacks to the executable as a command line argument. On windows, you can tweak the shortcut to pass this parameter. On the Mac, you could either make a .command which passes the extra parameter or run LR from Terminal.app directly.

 

On Windows, these messages can be viewed if you attach WinDbg or run DebugView (note these need to be running _before_ you elicit the error to capture the messages). On the Mac, Console.app can be used to view the traceback output.

 

Note that not all output from this command corresponds to a bug. It logs each time a Lua "throw". Some of these are errors, but some are throws used to cancel an operation and unroll the call stack.

 

I've used it enough at this point that I'm thinking I may try to make it easier to use this mode in some future version.

 

There's additional logging that can be enabled, but it's noisier and more subsystem specific in terms of its use.

 

https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

adding missing status

Rikk Flohr: Adobe Photography Org
Status Investigating

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

Greetings all,

 

Updates for Adobe Photography products have been released.  The February 2023  updates contain a fix for this issue. 

If you do not see the update in your Creative Cloud Application, you can refresh it by hitting [Ctrl/Cmd]+[Alt/Opt]+[ R ].

Note: It may take up to 24 hours for your update to be available in your Creative Cloud app.

 

Thank you for your patience.

Rikk Flohr: Adobe Photography Org
Status Fixed

Votes

Translate

Translate

Report

Report
LEGEND ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

LATEST

I confirmed that the test plugin above now executes without error when used with the Hard Drive publishing service.

Votes

Translate

Translate

Report

Report