Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
java.lang.IllegalArgumentException: attempt to remove OnFrameMetricsAvailableListener that was never added
at android.view.View.removeFrameMetricsListener(View.java:5560)
at android.view.Window.removeOnFrameMetricsAvailableListener(Window.java:863)
at androidx.metrics.performance.DelegatingFrameMetricsListener.onFrameMetricsAvailable(JankStatsApi24Impl.kt:226)
at android.view.FrameMetricsObserver.notifyDataAvailable(FrameMetricsObserver.java:72)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
To repro, run the app, then tap the home button. This disables jank stats tracking, which ends up removing a delegate listener and then the delegator itself (apparently twice).
It's not 100%, but it's fairly frequent.
Looks like there are two places in JankStatsApi24Impl where we remove the delegator listener from the window, in removeFrameMetricsListenerDelegate() (when we have removed the last delegate) and in OnFrameMetricsAvailable (when we detect a delegates list size of 0)