Android - accessibility crashes

Hi JUCE devs,

Seen a small number of crash reports via our automated crash reporting systems:

juce::AccessibilityNativeHandle::populateNodeInfo(_jobject*) jni.h:841
… no additional call stack around this, I’m sorry to say. Seen on Redmi Note 4, Android 6.0

And also seen on Redmi Note 4, Android 6.0 …:
juce::areAnyAccessibilityClientsActive() jni.h:841
juce::AccessibilityHandler::AccessibilityHandler(juce::Component&, juce::AccessibilityRole, juce::AccessibilityActions, juce::AccessibilityHandler::Interfaces) juce_android_Accessibility.cpp:830
std::__ndk1::__unique_if<juce::AccessibilityHandler>::__unique_single std::__ndk1::make_unique<juce::AccessibilityHandler, juce::Component&, juce::AccessibilityRole>(juce::Component&, juce::AccessibilityRole&&) memory:3003
juce::Component::createAccessibilityHandler() juce_Component.cpp:3167
juce::findEnclosingHandler(juce::Component*) juce_Component.cpp:3183
juce::AccessibilityNativeHandle::populateNodeInfo(_jobject*) juce_AccessibilityHandler.cpp:200
juce::AndroidComponentPeer::populateAccessibilityNodeInfoJni(_JNIEnv*, _jobject*, long, int, _jobject*) juce_android_Windowing.cpp:763

Hoping this is of some help…


I was unable to reproduce any crashes using the Android Studio emulator with a device running Android 6, but from the limited stack trace you’ve got it looks like it might be due to a null app context pointer. I’ve pushed a potential fix to develop here so please let me know if you see any more similar crashes with these changes and I’ll take another look:

Hi @ed95 many thanks! I’ll be sure to use that update in the next release, and will let you know if we see any new (or the same) crashes. NB the crashes I reported seem super-rare, but of course as you have many developers, and not all use automated crash reporting, I thought it best to let you know :slight_smile:

We always appreciate crash reports!

1 Like

Hi @ed95, I’ve rolled-out that update - just this morning.

Alas, the app is still crashing. Crash reports already in!


Both from Galaxy Tab S2 9.7, Android 7.0

Hoping we can fix this soon :slight_smile:

Best wishes,


I’ve pushed a few more Android accessibility fixes to the develop branch, hopefully these should make things more stable:


Many thanks @ed95 , I’ll check them out!


Hi @ed95

This has resolved a lot of issues, thank you. However, I’ve just seen this:
0x99be6a20 + 440864
0x99be3ea4 + 429732
0x99b9f350 + 148304
0x99b97d6c + 118124
0x9600d5fc + 4384252
0x95cc3f2c + 937772
0x9602e344 + 4518724
0x9602935c + 4498268
0x9604313c + 4604220
0x9603bac0 + 4573888
0x9603b02c + 4571180
0x96019894 + 4434068
0x9600d528 + 4384040
0x95cc3f2c + 937772
0x95e2ab9c + 2407324
0x95f08ffc + 3317756
_JNIEnv::NewObject(_jclass*, _jmethodID*, ...) jni.h:573
juce::AndroidComponentPeer::populateAccessibilityNodeInfoJni(_JNIEnv*, _jobject*, long, int, _jobject*) juce_android_Windowing.cpp:764
0x8a3909cc + 27084

Interesting that it goes quite deep into libart (and then into librc)…

Galaxy Tab S2 9.7, Android 7.0

Best wishes,