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

Pattern of errors when translating with en-ueb-g2 #52

Open
morrisonsign opened this issue Dec 29, 2022 · 1 comment
Open

Pattern of errors when translating with en-ueb-g2 #52

morrisonsign opened this issue Dec 29, 2022 · 1 comment

Comments

@morrisonsign
Copy link

I'm receiving an error when translating from en-ueb-g2 to en-us-brf in certain letter/number combinations using the latest build-no-tables-utf32.js with on demand table loading. This is similar to the errors in this other issue, but it still occurs with the utf32 build.

Here's one of the errors:
abort() at Error at jsStackTrace (http://localhost:3000/lib/build-no-tables-utf32.js:1104:13) at stackTrace (http://localhost:3000/lib/build-no-tables-utf32.js:1121:12) at Object.abort (http://localhost:3000/lib/build-no-tables-utf32.js:68839:44) at _abort (http://localhost:3000/lib/build-no-tables-utf32.js:1726:22) at _free (http://localhost:3000/lib/build-no-tables-utf32.js:65850:7) at asm._free (http://localhost:3000/lib/build-no-tables-utf32.js:68505:19) at LiblouisEasyApi.translateString (http://localhost:3000/lib/easy-api.js:233:13) at LiblouisEasyApi.translateString (http://localhost:3000/lib/easy-api.js:484:24) at port.onmessage (http://localhost:3000/lib/braille.js:10:21)

I've noticed some patterns of letter/number combinations will throw this error, notably when a pair of letters or numbers contains one or more capital letters, or when switching from letters to numbers. But I can't quite figure out what is causing this to happen.

Translating the following throws an error:
Ab
aBBb
AbCd
AbcD
ABCD
AbcDef
aBcdEf
AbcdeF
ABCDEF
A1
A1b1
A1B1
A111
AB.123

Translating the following works just fine:
ab
aB
ABC
aBbB
Abcd
abcD
Abcdef
ABCDE
ABCDEFGH
a1
A1b
A1B
A11
ab.123

I had the same issue previously with the utf16 build but with different combinations (as noted in issue 50). Any idea of what could cause this?

@bertfrees
Copy link
Member

Hi @morrisonsign. I have no idea how to interpret the stack trace. Perhaps a small test program to reproduce the issue would be helpful, but even then I don't know if I would be able to find the problem. I don't know how to debug this. It's complicated because the C code is transpiled to JavaScript.

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