PSA for Distros: Brltty should be built using Cython 0.29.x NOT Cython 3

Orca maintainer here. We have now had two distros (Arch and Fedora) in which Orca crashed due to a simple BrlApi call crashing. You can reproduce the crash without Orca. Just do the following in a terminal:

python3 -c "import brlapi; brlapi.Connection()"

You may get an error, e.g. with a traceback with messages like “Connection refused”, “Is BRLTTY really running?”, something related to keys being missing, etc. All those are fine (or at least not severe). If, however, you see this:

double free or corruption (!prev)
Aborted (core dumped)

You have the severe bug. In both cases, the fix was apparently to build Brltty using Cython 0.29.x. See here and here.

I will be doing a “gamma” release of Orca v45 so that Orca won’t crash in response to this BrlApi issue. But that fix won’t cause braille to magically work. Thus any user who depends upon braille will not be able to use your distro if you have built Brltty with Cython 3.

EDIT: Make that a “beta2” release; infrastructure didn’t like “gamma”. And the release is done.

Are you sure a double free in the bindings is something you can work around in Orca?

Yup. Already done and tested.

It’s admittedly a bit of a hack, but here’s the snippet:

    cmd = ['python3', '-c', 'import brlapi; brlapi.Connection()']
    process_result = subprocess.run(cmd, capture_output=True, text=True)
    if process_result.returncode not in known_errors:
       [...]
        _brlAPIConnectable = False

    return _brlAPIConnectable

Using subprocess to see if things would spit up before actually using the API is enough to keep Orca running and speaking.

Update: A proper solution is being discussed at [BRLTTY] Fix for the brlapi crash under Cython 3.0

Another update, the issue is fixed by Brltty commit e6707d5e094d. A 6.6.1 release is expected in the near future.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.