Exception: callbacks must set the bounds of parent objects in populateNodeForVirtualViewId ()

The Android Application Crash Reporting Service has reported many cases:

java.lang.RuntimeException: Callbacks must set parent bounds in populateNodeForVirtualViewId() at iv.a(SourceFile:56) at iw.a(SourceFile:716) at hq.a(SourceFile:112) at hw.createAccessibilityNodeInfo(SourceFile:42) at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:724) at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:147) at android.view.AccessibilityInteractionController.access$300(AccessibilityInteractionController.java:49) at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:971) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5140) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611) at dalvik.system.NativeStart.main(Native Method) 

Feels connected to accessibility issues that I really didn't care about, but how can I fix this? call stack doesn't point me in any direction

I tried adding the xml contentDescpription tag to all the places in my code that lint told me about it, but that didn't help

Edit: Found a problem, an accident occurred when I displayed a StreetViewPanoramaFragment object over a map fragment when touch (talkback?) Was detected.

I don’t know what caused this, I think I will open a separate, more focused question

+8
android runtimeexception
source share
5 answers

A problem was detected, a crash occurred while displaying a StreetViewPanoramaFragment object over a map fragment when touch (talkback?) Was detected.

I don’t know what caused this, I think I will open a separate, more focused question

+3
source share

Well, the question is: β€œHow can I start fixing this?”, So I would say: start looking for the code for the frame.

I could track that createAccessibilityNodeInfo() is actually from View.createAccessibilityNodeInfo() .

Also searching "Callbacks should set parent boundaries in populateNodeForVirtualViewId ()" I found that this is called on line 395 in the ExploreByTouchHelper.java class.

I cannot say more without knowing your code, but this is a good starting point for your quest.

+1
source share

This may be a bug in v4 lib support when launched on Android versions older than ICS. Runtime exception thrown by ExploreByTouchHelper

 393 node.getBoundsInParent(mTempParentRect); 394 if (mTempParentRect.isEmpty()) { 395 throw new RuntimeException("Callbacks must set parent bounds in " 396 + "populateNodeForVirtualViewId()"); 397 } 

This call to node.getBoundsInParent implemented in the implementation of the AccessibilityNodeInfoImpl based on the Android version where the code is executed, as you can see in AccessibilityNodeInfoCompat

 755 static { 756 if (Build.VERSION.SDK_INT >= 19) { // KitKat 757 IMPL = new AccessibilityNodeInfoKitKatImpl(); 758 } else if (Build.VERSION.SDK_INT >= 18) { // JellyBean MR2 759 IMPL = new AccessibilityNodeInfoJellybeanMr2Impl(); 760 } else if (Build.VERSION.SDK_INT >= 16) { // JellyBean 761 IMPL = new AccessibilityNodeInfoJellybeanImpl(); 762 } else if (Build.VERSION.SDK_INT >= 14) { // ICS 763 IMPL = new AccessibilityNodeInfoIcsImpl(); 764 } else { 765 IMPL = new AccessibilityNodeInfoStubImpl(); 766 } 767 } 768 769 private static final AccessibilityNodeInfoImpl IMPL; 

And it seems that AccessibilityNodeInfoStubImpl is an empty stub, so you can try to run something <14 in the emulator and see if an exception is thrown.

+1
source share

how can i fix this?

The first step is to retrain your stacktrace

java.lang.RuntimeException: Callbacks should set the boundaries of the parent populateNodeForVirtualViewId () on iv.a (SourceFile: 56) at iw.a (SourceFile: 716) in hq.a (SourceFile: 112) in hw.createAccessibilityNodeInfo (SourceFile: 42 ) at android.view.AccessibilityInteractionController $ AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos (AccessibilityInteractionController.java:724)

0
source share

For reference, I get this stack trace, which looks like a de-confusing version:

 java.lang.RuntimeException: Callbacks must set parent bounds in populateNodeForVirtualViewId() at android.support.v4.widget.EdgeEffectCompat$EdgeEffectImpl.newEdgeEffect(SourceFile:56) at android.support.v4.widget.EdgeEffectCompat$EdgeEffectLollipopImpl.a(SourceFile:717) at android.support.v4.view.accessibility.AccessibilityNodeProviderCompatKitKat.a(SourceFile:112) at android.support.v4.view.accessibility.AccessibilityRecordCompat$AccessibilityRecordImpl.createAccessibilityNodeInfo(SourceFile:42) at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfVirtualNode(AccessibilityInteractionController.java:1092) at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1002) at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:998) at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:799) at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:155) at android.view.AccessibilityInteractionController.access$400(AccessibilityInteractionController.java:53) at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1146) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 

Fabric.io also discovered that the stream of views is working:

 thread at java.lang.Object.wait(Object.java) at com.google.maps.api.android.lib6.gmm6.streetview.bf.a() at com.google.maps.api.android.lib6.gmm6.streetview.bf.run() 
0
source share

All Articles