[BRLTTY] Brlapi crashes when watching parameter
Dave Mielke
Dave at mielke.cc
Tue Mar 11 19:43:48 UTC 2025
[quoted lines by Peter Lecky on 2025/03/11 at 12:46 +0100]
>My code:
>
>Parameter.WatcherHandle h=connection.getParameters().deviceModel.watch(new ParameterWatcher() {
> @Override public void onParameterUpdated(int i,long l,Object o) {
> U.i("parameterwatch","id:"+i);
> }
>});
I just executed this code successfully, i.e. I can't reproduce the problem. I also had a quick look at the underlying code and it looks right.
>the JNI crash:
[...]
> k.stopka.corvus: java_vm_ext.cc:616] JNI DETECTED ERROR IN APPLICATION:
>input is not valid Modified UTF-8: illegal continuation byte 0x7f
> k.stopka.corvus: java_vm_ext.cc:616] string: 'Ě>x'
> k.stopka.corvus: java_vm_ext.cc:616] input: '0xcc <0x7f> 0x3e 0x02 0x78'
> k.stopka.corvus: java_vm_ext.cc:616] in call to NewStringUTF
> k.stopka.corvus: java_vm_ext.cc:616] from long
>org.a11y.brlapi.ConnectionBase.watchParameter(int, long, boolean,
>org.a11y.brlapi.ParameterWatcher)
The UTF-8 is definitely bad, i.e. 0XCC can't be followed by 0X7F.
The "from long" makes no sense since the object for the primitive long type isn't involved.
I'm wondering, therefore, if there might be a serious mismatch between the jar and the shared object for the JNI that you're using.
--
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc | Ottawa, Ontario | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada K2A 1H7 |
http://mielke.cc/xmother.html (Letter from a Feminist ex-Mother)
More information about the BRLTTY
mailing list