Android - Accessibility crashes (various OS / devices)

Hi folks,

I’ve seen a few crash reports come in like this:

libc.so
0xea4245b4 + 439732
libc.so
0xea421a50 + 428624
libc.so
0xea3dcf68 + 147304
libc.so
0xea3d59ec + 117228
libart.so
0xe7c0c5e4 + 4384228
libart.so
0xe78c2fac + 937900
libjuce_jni.so
_JNIEnv::CallObjectMethod(_jobject*, _jmethodID*, ...) jni.h:618
libjuce_jni.so
juce::sendAccessibilityEventImpl(juce::AccessibilityHandler const&, int, int) juce_android_Accessibility.cpp:782
libjuce_jni.so
juce::AccessibilityHandler::AccessibilityHandler(juce::Component&, juce::AccessibilityRole, juce::AccessibilityActions, juce::AccessibilityHandler::Interfaces) juce_android_Accessibility.cpp:832
libjuce_jni.so
std::__ndk1::__unique_if<juce::AccessibilityHandler>::__unique_single std::__ndk1::make_unique<juce::AccessibilityHandler, juce::Component&, juce::AccessibilityRole>(juce::Component&, juce::AccessibilityRole&&) memory:3003
libjuce_jni.so
<name omitted> juce_Component.cpp:3236
libjuce_jni.so
juce::findEnclosingHandler(juce::Component*) juce_Component.cpp:3252
libjuce_jni.so
juce::AccessibilityHandler::getChildren() const::$_1::operator()(juce::Component*, std::__ndk1::vector<juce::AccessibilityHandler*, std::__ndk1::allocator<juce::AccessibilityHandler*> >&) const juce_AccessibilityHandler.cpp:216
libjuce_jni.so
juce::AccessibilityHandler::getChildren() const juce_AccessibilityHandler.cpp:234
libjuce_jni.so
juce::AccessibilityNativeHandle::populateNodeInfo(_jobject*) juce_android_Accessibility.cpp:251
libjuce_jni.so
juce::AndroidComponentPeer::populateAccessibilityNodeInfoJni(_JNIEnv*, _jobject*, long, int, _jobject*) juce_android_Windowing.cpp:838

and like this (clearly related!)

libc.so
0xea4245b4 + 439732
libc.so
0xea421a50 + 428624
libc.so
0xea3dcf68 + 147304
libc.so
0xea3d59ec + 117228
libart.so
0xe7c0c5e4 + 4384228
libart.so
0xe78c2fac + 937900
libart.so
0xe7a29b6c + 2407276
libart.so
0xe7b07fcc + 3317708
libjuce_jni.so
_JNIEnv::NewObject(_jclass*, _jmethodID*, ...) jni.h:573
libjuce_jni.so
juce::AndroidComponentPeer::populateAccessibilityNodeInfoJni(_JNIEnv*, _jobject*, long, int, _jobject*) juce_android_Windowing.cpp:838

Seen in Android 7 / 10 / 11 / 12, so not specific to Android version. Seen on a range of different devices.

Can anybody advise?

I’m using the latest copy of juce_android_Windowing.cpp

Best wishes,

Pete

See also Android - accessibility crashes - #3 by peteatjuce - looks like the issues there still aren’t fully resolved!

Pete

FYI: just received reports of more of these crashes on Android 7.0, with Galaxy S6 and Galaxy S6 edge.

Best wishes, Pete

Thanks for your patience. I’ve spent a bit of time debugging the accessibility implementation for Android on the simulator and on a Pixel 3a running Android 12. I discovered a handful of crashes, which should be fixed now:

Please try updating and let us know if you still observe accessibility-related crashes.

1 Like

Hi @reuk,

Thank you very much, will do!

Best wishes,

Pete

Hi @reuk,

Just to say that we’ve seen no crashes in this area since applying your patch.

So - many thanks :slight_smile:

Best wishes,

Pete

Hi @reuk!

I’ve seen a handful of crashes Ian this area in the past few weeks; all I have in the call stack is this:

SIGSEGV /SEGV_MAPERR

libjuce_jni.so
juce::AccessibilityNativeHandle::populateNodeInfo(_jobject*) juce_android_Accessibility.cpp:235
libjuce_jni.so
juce::AndroidComponentPeer::populateAccessibilityNodeInfoJni(_JNIEnv*, _jobject*, long, int, _jobject*) juce_android_Windowing.cpp:844

Devices:
Nokia X100 and P30 Pro

OS versions: 11 and 10

HTH! Pete

I just tried loading up the DemoRunner in an Android 10 emulator with TalkBack enabled. I’m able to navigate around and interact with clickable elements, and I don’t see any crashes. I’ve also spent some time reading through the populateNodeInfo implementation, and I don’t see anything obviously wrong there.

Unfortunately, without some steps to reproduce the problem, or a more detailed crash report, there’s not much more I can do at the moment.

1 Like

OK, thanks for checking @reuk!

Best wishes, Pete

Just got this on a release that’s few days on Play Store -

[split_config.arm64_v8a.apk!libjuce_jni.so] juce::AccessibilityNativeHandle::populateNodeInfo(_jobject*)

Sadly not enough to reproduce or understand what’s the cause.