[BRLTTY] Fwd: Orca crash with grade 2 and latest versions of brltty and liblouis

Michael Whapples mwhapples at aim.com
Thu Jul 2 17:28:04 EDT 2009


Hello,
on the liblouis stuff, if liblouis is compiled for ucs2 (I believe UCS2 
is liblouis's default) then you need a UCS2 compiled version of python. 
If you use an UCS4 compiled version of liblouis then you need an UCS4 
compiled version of python. Mixing the two (IE. UCS2 liblouis and UCS4 
python or vice versa) you will get very odd results, may be even crash 
python, and if python survives then brltty will struggle with the output 
as it is very likely that it won't be valid.

I personally believe liblouis should have a way that the bindings can 
determine whether liblouis uses UCS2 or UCS4 so they can report problems 
like this better, or may be even re-encode the unicode to make things work.

Michael Whapples
On 02/07/09 20:29, Willie Walker wrote:
> I chased this down with Pete.  Here's what I believe is happening:
>
> 1) Orca uses liblouis for contracted braille: it makes liblouis calls
> and then calls the BrlAPI write(writeStruct) method using the translated
> string.
>
> 2) I believe Pete built/installed liblouis at one time or another using
> the --disable-ucs4 option.  I verified this by doing so myself and
> reproducing the crash Pete had.  I then rebuilt/reinstalled liblouis
> using the --enable-ucs4 option.  With this as the sole change on my
> machine, Orca no longer crashed and produced contracted braille fine. I
> suspect fixing this on Pete's machine will most likely be a matter of
> doing a search and destroy of all the bad builds/installs of liblouis
> and replacing them with a good one.
>
> I tried wrapping Orca's call to 'write' in a try/except clause, but it
> appears as though the Python bindings for BrlAPI do not bubble up
> exceptions.  Instead, BrlAPI has a default exception handler that calls
> abort() and takes down the entire Python machine with it.
>
> BrlAPI provides a brlapi_setExceptionHandler method, but I'm not sure
> how to get to it from Python.  Can you BrlTTY folks offer some guidance?
>
> Will
>
> Willie Walker wrote:
>    
>>> Ok, the interesting part is
>>>
>>> Received Write request on fd 10
>>> charset UTF-8
>>> writing exception 7 to 10
>>> res != (size_t) -1 not met: invalid charset conversion
>>> exception 7 for packet type 119 on fd 10
>>> Closing connection on fd 10
>>>
>>> which means some non-UTF-8 text somehow got in.
>>>        
>> Hmmm....then this means it may possibly be Orca sending bad text.  I'm
>> puzzled why it works so well on OpenSolaris, though.  :-(
>>
>> Will
>>
>>
>>      
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
>    



More information about the BRLTTY mailing list