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

Closed
slrslr opened this issue Feb 26, 2024 · 3 comments
Closed

Does Automation/Select overlaps work for you? #197

slrslr opened this issue Feb 26, 2024 · 3 comments

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
Member

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.

@aniolm9
Copy link

aniolm9 commented Dec 26, 2024

Sorry for commenting after the bug was closed, but I'm the Debian Maintainer for Aegisub and I want to clarify this issue because I keep getting e-mails about this.
As I explained some years ago in Aegisub#141, the Debian version of luajit is not compiled with the Lua 5.2 compat flag, so it can't be used with Aegisub.
On the other hand, uploading a new package version to the current stable is not straightforward (see https://www.debian.org/doc/manuals/developers-reference/pkgs.html#upload-stable), so the changes I can make are minimal. What I can do is trying to build version 3.2.2 with Lua 5.2 and without luajit. If this works, I think that it could get into stable.
First I'll upload 3.4.0 to unstable (probably today or tomorrow) and then I'll try to update 3.2.2.

@CoffeeFlux
Copy link
Member

@aniolm9 I've opened #239 for discussion on the luajit 5.2 issue

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

4 participants