Opened on 07/02/2018 at 10:33:13 AM
Last modified on 07/09/2018 at 12:17:44 PM
#6771 new defect
Request engine lock from null provider crash
Reported by: | asmirnov | Assignee: | |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Libadblockplus-Android | Keywords: | |
Cc: | vickyyu | Blocked By: | |
Blocking: | Platform: | Android | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by asmirnov)
Environment
The client is using AdblockWebView as drop-in replacement for android WebView.
However it just crashes sometime with attached stacktraces.
Tested on some of recent versions of libadblockplus-android, most likely 1416d0ca58f92c0542f131888c72ea46437bc84a.
How to reproduce
Exact steps to reproduce are unclear.
It crashes on multiple devices (not single vendor) on multiple android versions.
Observed behaviour
Crash while trying to access engine lock from null provider.
Expected behaviour
No crash happens.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
This is the only line where provider fields is written (set):
https://github.com/adblockplus/libadblockplus-android/blob/master/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java#L249
It's called synchronously BTW.
This is the only line where setProvider is called from AdblockWebView:
https://github.com/adblockplus/libadblockplus-android/blob/master/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java#L1139 and it does not pass null for sure.
So the only ways to get null there are:
1) it's not yet set
It should be set as it'sensureProvider() is called from initAbpLoading().
https://github.com/adblockplus/libadblockplus-android/blob/master/adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java#L1130
called).
And initAbpLoading is called in the very beginning of everything:
2) setProvider() is called with null argument intentionally.