Opened 11 months ago

Last modified 10 months ago

#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)

Screen Shot 2018-06-20 at 4.26.40 PM.png (369.7 KB) - added by asmirnov 11 months ago.
Screen Shot 2018-06-20 at 4.27.23 PM.png (374.0 KB) - added by asmirnov 11 months ago.

Download all attachments as: .zip

Change History (5)

Changed 11 months ago by asmirnov

Changed 11 months ago by asmirnov

comment:1 Changed 11 months ago by asmirnov

  • Description modified (diff)

comment:2 Changed 11 months ago by asmirnov

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.

comment:3 Changed 10 months ago by vickyyu

  • Cc vickyyu added
Note: See TracTickets for help on using tickets.