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

Plugin disables, "attempt to yield across metamethod/C-call boundary"

Engaged ,
Jul 12, 2020 Jul 12, 2020

Copy link to clipboard

Copied

Any idea what this means: I'm calling LrSockey.bind() followed by a never-ending while loop inside a callWithContext() inside astartAsyncTask(). The error occurs, and the plugin is disabled, after it's been running for a while, usually overnight.

 

Plug-in error log for plug-in at: /Users/kimaldis/Documents/Dev/lightroom dev/Beetle/Beetle.lrdevplugin

**** Error 1

An error occurred while attempting to run one of the plug-in’s scripts.
attempt to yield across metamethod/C-call boundary

**** Error 2

An error occurred while attempting to start the plugin.
attempt to yield across metamethod/C-call boundary

**** Error 3

Could not add a menu item for this plug-in.
attempt to yield across metamethod/C-call boundary

TOPICS
SDK

Views

299

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
LEGEND ,
Jul 12, 2020 Jul 12, 2020

Copy link to clipboard

Copied

Many of the API functions and methods must be called from a task started by LrTasks. If you try to call one of these (e.g. photo:getDevelopSettings() from the main task, you get that error. You'll also get that error if you call one of those functions from within pcall() rather than LrTasks.pcall().  Does your plugin use pcall()?   Maybe after running for a while, your plugin is calling one of those functions from the main task or within pcall().

 

Are you using my Debugging Toolkit by any chance, and if so, which version? An older version would trigger such errors.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

 

 

 

 

 

 

Votes

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
Engaged ,
Jul 12, 2020 Jul 12, 2020

Copy link to clipboard

Copied

The LrSocket in the plugin just sits there waiting for data on a socket, does nothing until it receives something. The error is there when I open the laptop first thing in the morning. Nothing should have happened overnight, it would have been in its wait state all night.

The plugin expects Lua code on the socket which it executes in an LrTasks.pcall(), but this wouldn't have happened overnight, no sender is active during that time.

I'm not using pcall(), only LrTasks.pcall()

 

 

Votes

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
Engaged ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

LATEST

this error  seems to be associated with LrInitPlugin. If I start the socket listen loop using LrForceInitPlugin = true, LrInitPlugin = 'Init.lua', then it crashes out after a few hours. If the loop is started from the Plugin Extras menu, it runs, as far as I can tell, forever.

 

 

 

Votes

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