Opened on 04/04/2017 at 01:39:18 PM
Closed on 04/04/2017 at 02:15:02 PM
Last modified on 05/09/2017 at 12:08:12 PM
#5100 closed defect (fixed)
Exception while initializing Engine
| Reported by: | diegocarloslima | Assignee: | diegocarloslima |
|---|---|---|---|
| Priority: | P1 | Milestone: | Adblock-Plus-for-Samsung-Browser-1.1.0 |
| Module: | Adblock-Plus-for-Samsung-Browser | Keywords: | |
| Cc: | vickyyu | Blocked By: | |
| Blocking: | Platform: | Samsung Browser | |
| Ready: | yes | Confidential: | no |
| Tester: | Scheer | Verified working: | yes |
| Review URL(s): | |||
Description
There's a race condition that causes the app to crash sometimes during initialization, when it tries to download an updated version of a subscription before the downloader have been created.
Environment
abp-samsung-internet-110-preview-signed.apk
Samsung Galaxy S7 Edge
Android 7.0
How to reproduce
- Open the app (as fresh install) and wait for the Initialization
Observed behaviour
The app crashes and following exception is printed:
04-04 14:34:58.578 26784-26842/? E/EngineService: Initialization failed: Attempt to invoke virtual method 'void org.adblockplus.sbrowser.contentblocker.engine.Downloader.enqueueDownload(java.net.URL, java.lang.String, java.util.Map)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.adblockplus.sbrowser.contentblocker.engine.Downloader.enqueueDownload(java.net.URL, java.lang.String, java.util.Map)' on a null object reference
at org.adblockplus.sbrowser.contentblocker.engine.Engine.enqueueDownload(Engine.java:729)
at org.adblockplus.sbrowser.contentblocker.engine.Subscriptions.writeFile(Subscriptions.java:183)
at org.adblockplus.sbrowser.contentblocker.engine.Subscriptions.createAndWriteFile(Subscriptions.java:76)
at org.adblockplus.sbrowser.contentblocker.engine.Engine.createAndWriteFile(Engine.java:252)
at org.adblockplus.sbrowser.contentblocker.engine.Engine.sendUpdateBroadcast(Engine.java:172)
at org.adblockplus.sbrowser.contentblocker.engine.Engine.create(Engine.java:429)
at org.adblockplus.sbrowser.contentblocker.engine.EngineService$Initializer.run(EngineService.java:104)
at java.lang.Thread.run(Thread.java:761)
04-04 14:34:58.774 26784-26784/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.adblockplus.adblockplussbrowser, PID: 26784
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.adblockplus.sbrowser.contentblocker.engine.Engine.getPrefsDefault(java.lang.String)' on a null object reference
at org.adblockplus.sbrowser.contentblocker.MoreBlockingPreferenceCategory.onEngineCreated(MoreBlockingPreferenceCategory.java:97)
at org.adblockplus.sbrowser.contentblocker.engine.EngineService$CreationNotifier$1.run(EngineService.java:152)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Expected behaviour
The initialization should perform with no exception.
Attachments (0)
Change History (4)
comment:1 Changed on 04/04/2017 at 01:45:59 PM by diegocarloslima
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 04/04/2017 at 02:14:09 PM by abpbot
comment:3 Changed on 04/04/2017 at 02:15:02 PM by diegocarloslima
- Resolution set to fixed
- Status changed from reviewing to closed
comment:4 Changed on 05/09/2017 at 12:08:12 PM by scheer
- Tester changed from Unknown to Scheer
- Verified working set
- The app no longer crashes and initializes correctly.
adblockplussbrowser-release-signed-1
Galaxy S7
Android 7.0
adblockplussbrowser-release-signed-1
Galaxy S4
Android 5.0.1
Note: See
TracTickets for help on using
tickets.

A commit referencing this issue has landed:
Issue 5100 - Exception while initializing Engine