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!