Opened 2 years ago

Closed 2 years ago

#6516 closed defect (incomplete)

java.lang.NullPointerException error

Reported by: laximan Assignee:
Priority: P5 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):


Getting error in the AdblockPlus library

Attempt to invoke interface method 'java.lang.Object' on a null object reference$ElemHideThread

Change History (8)

comment:1 Changed 2 years ago by asmirnov

  • Component changed from Unknown to Libadblockplus-Android
  • Priority changed from Unknown to P5

comment:2 Changed 2 years ago by asmirnov

  • Summary changed from java.lang.NullPointerException error in the AdblockPlus library to java.lang.NullPointerException error

comment:3 Changed 2 years ago by laximan

Library Name :
Library VERSION_CODE = 4
Library VERSION_NAME = "2.1";



Attempt to invoke interface method 'java.lang.Object' on a null object reference

className :
methodName : run
Line number : 977

subclass name : ElemHideThread$ElemHideThread

The probable error where it occurs is at this piece of code, when the "provider" is null.

public void run() {

synchronized(AdblockWebView.this.provider.getEngineLock()) {

try {

if(AdblockWebView.this.provider.getCounter() == 0) {


comment:4 Changed 2 years ago by laximan

Some of the devices on which the issue occurs have been mentioned below

a5lte,Fone_161,hero2lte,condor_umts,rolex,SO-03J,i-mobile,j7y17lte,gtelwifi,SO-02F,on7xelte,c7prolte,riva,lt013g,athene,SO-04J,heroqltevzw,QMobile i10,HWY360-U,nikel,E2105,fortuna3g,goyave3gsea,QPAD,mobiistar_LAI_Zoro,KYV31,serranolte,j1qltevzw,lt01wifi,g2,PLAY_P1,a3xelte,dream2qltesq,kt07c_honghd,on5xelte,F01F,j7elte,SOV34,dream2lte,gtel3g,zoom_ro,lcsh92_wet_jb9,HWLUA-U6582,mido,heroqltespr,hammerhead,dream2lteks,armani,jflteatt,ASUS_X00DD,kaleido_sprout,PSP5455D,O,grandneove3g,SO-02J,KYV38,POP455C,e1q,A536,grandmaxltekx,c1ktt,ASUS_X007D,goyavewifixtc,serranovelte,goyavewifi,KYY24,hwG7-L01,SC-04J,ASUS_X008_1

comment:5 Changed 2 years ago by asmirnov

provider is never set to null in AdblockWebView. Did you call setProvider(null) intentionally?

Last edited 2 years ago by asmirnov (previous) (diff)

comment:6 Changed 2 years ago by laximan

We never call setProvider(null) intentionally but we get the provider from AdblockHelper class itself and set it to the setProvider method.


if(AdblockHelper.get().getProvider().getEngine() != null){

That is the way we are calling the setProvider method.

comment:7 Changed 2 years ago by asmirnov

  1. AdblockHelper.get().getProvider().waitForReady(); is not required before setting provider.
  2. Use addEngineCreatedListener to set engine creation listener to do some init

comment:8 Changed 2 years ago by asmirnov

  • Resolution set to incomplete
  • Status changed from new to closed

I was unable to reproduce it for:

Full app log is required.
Steps to reproduce are required.

Note: See TracTickets for help on using tickets.