Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
This is the first bug report I've had to file, so apologies if it's in the wrong place.
The google play SDK console suggests that we've been seeing a large number of crashes attributed to the
PowerManager.addThermalStatusListener
method. The underlying cause is as follows:WebView
WebView
makes native request toaddThermalStatusListener
ConcurrentModificationException
gets thrown becausemListenerMap
is not thread-safe - seeIncidentally, although this method was only introduced in API 29 (11) the version in API 28 (10) does have some synchronization around accessing this map
We wrap the creation of the
WebView
in atry/catch
but because it's a native exception we don't get to catch it. As a result we have very little control over this crash.I believe that this hasn't always been an issue, but a relatively recent change in the Chromium project started registering a listener to the PowerManager
It's also not just us seeing this crash too - see here from similar ticket affecting play ads.
Any thoughts/suggestions would be greatly appreciated.