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

Does Automation/Select overlaps work for you? #197

Open
slrslr opened this issue Feb 26, 2024 · 1 comment
Open

Does Automation/Select overlaps work for you? #197

slrslr opened this issue Feb 26, 2024 · 1 comment

Comments

@slrslr
Copy link

slrslr commented Feb 26, 2024

Open .srt file, menu "Automation" > Select overlaps
cause
Lua reported a runtime error on Linux, Aegisub 3.2.2
Detail
Is anyone capable to fix it, i am willing to pay for that fix. Thank you

The file:
https://github.com/TypesettingTools/Aegisub/blob/master/automation/autoload/select-overlaps.moon
(in /usr/share/aegisub/automation/autoload/select-overlaps.moon)

ChatGPT suggested this modification:

Replace:
[prepare i, line for i, line in ipairs subs when is_dialogue line]

by:
[prepare i, line for i, line in ipairs(subs) when is_dialogue(line)]

or by:
[prepare(i, line) for i, line in ipairs(subs) when is_dialogue(line)]

saying:

"The issue in the provided Lua script is with the ipairs function being used on the subs object. The error message indicates that Lua is expecting a table but received a userdata instead."

But it does not work. Do you have please idea what to try? I am trying to detect and fix subtitle overlaps in several .ass files.

An issue of the luajit and the current Aegisub version?

@arch1t3cht
Copy link
Collaborator

arch1t3cht commented Feb 26, 2024

This is an issue with Debian's Aegisub package. Aegisub needs luajit to be compiled with the Lua 5.2 compat flag, which Debian's luajit does not seem to have. This results in the __ipairs metatable entry on the subs object not being respected.

To fix this you would need to compile Aegisub yourself with --force-fallback-for=luajit.

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