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)

Screen Shot 2018-06-20 at 4.26.40 PM.png (369.7 KB) - added by asmirnov on 07/02/2018 at 10:39:32 AM.
Screen Shot 2018-06-20 at 4.27.23 PM.png (374.0 KB) - added by asmirnov on 07/02/2018 at 10:39:59 AM.

Download all attachments as: .zip

Change History (5)

Changed on 07/02/2018 at 10:39:32 AM by asmirnov

Changed on 07/02/2018 at 10:39:59 AM by asmirnov

comment:1 Changed on 07/02/2018 at 10:42:58 AM by asmirnov

  • Description modified (diff)

comment:2 Changed on 07/02/2018 at 11:41:54 AM 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 on 07/09/2018 at 12:17:44 PM by vickyyu

  • Cc vickyyu added

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.