Skip to content

DependencyControl fails to load on Windows if Aegisub's automation path contains special characters #458

@arch1t3cht

Description

@arch1t3cht

Could also be seen as a DependencyControl or requireffi issue, but I'll open it here for better visibility.

ffi.load internally uses LoadLibraryExA, which uses the locale's narrow encoding while requireffi (like all Lua scripts) will always pass UTF-8 paths. This causes a mismatch when the path contains special characters, which causes DependencyControl dependencies like PreciseTimer to fail to load.

This doesn't seem to be easily fixable, the options are mostly

  • Add even more hacks to requireffi and call LoadLibraryExW directly
  • Set the process code page to UTF-8 (which will be done eventually, but hasn't been done so far since it requires a semi-recent Windows version and needs a very thorough audit to make sure it doesn't break anything)
  • Get rid of the DependencyControl modules entirely and replace them with first-party APIs in Aegisub (also a long-term plan, but won't be implemented any time soon).

So this is unlikely to be fixed in the near future, I'm just opening the issue to track the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions