Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs on applying style via Lua API #18268

Open
1 task done
litoj opened this issue Jan 22, 2025 · 4 comments
Open
1 task done

Hangs on applying style via Lua API #18268

litoj opened this issue Jan 22, 2025 · 4 comments

Comments

@litoj
Copy link

litoj commented Jan 22, 2025

Is there an existing issue for this?

  • I checked and did not find my issue in the already reported ones

Describe the bug

When using a script to apply some style (even the default ones) automatically when importing a file, darktable consistently hangs on the very operation of dt.styles.apply.

Steps to reproduce

use fujifilm_filmmode.lua.txt as a lua script. I edited it so that it just tries to apply the first style and nothing else, but any other way of doing it didn't work either.

Expected behavior

darktable should not hang, but rather apply the style just as when applied manually

Logfile | Screenshot | Screencast

logfile for lua scripts is silent during the action.
darktable keeps using a minuscule amount of CPU and creates a random sh zombie process
Image

log at the moment of the action:

action.log

entire log:

test.log

Commit

unfortunately this is the first time I tried the lua api

Where did you obtain darktable from?

distro packaging

darktable version

5.0.0

What OS are you using?

Linux

What is the version of your OS?

Archlinux 1.0, Wayland - Sway

Describe your system?

No response

Are you using OpenCL GPU in darktable?

No

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

@wpferguson
Copy link
Member

wpferguson commented Jan 22, 2025

Can you attach the script you used (just add .txt to the filename)?

EDIT: never mind, I saw it.

@wpferguson
Copy link
Member

Can you run darktable with just the -d lua flag and try again? I saw no Lua entries in the log, so I'm not sure the script was even running. Did you start the script from scripts or did you use the luarc file?

@litoj
Copy link
Author

litoj commented Jan 23, 2025

It doesn't print anything because all the lines are commented out except the direct call to apply a style. You can put

  dt.print_log'before'
  dt.styles.apply(dt.styles[1], image)
  dt.print_log'after'

in place of just the styles.apply line. I put the script in darktable config contrib folder among the other automatically installed scripts and then enabled it in the gui.

@wpferguson
Copy link
Member

How about you uncomment the log messages and then run the script and post the log so that I have some possibility of troubleshooting this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants