Adaway: Crashing on dns log

Created on 21 Apr 2020  路  10Comments  路  Source: AdAway/AdAway

Crashing while blacklisting an url from dns monitored results.

App version : 4.3.3
device: samsung ,os- 5.1.1, magisk

bug

All 10 comments

Hello @Indranil012

Thanks for your report!

Can you provide the host you were trying to blacklist? (or at least something that looks like)
Did you already try to blacklist it before? (I am thinking about duplicate entry error).

I will run some tests in the meanwhile.

No it was not duplicate . Its crashing what ever I clicked blacklist, whitelist doesn't matter it will crash. If you need log let me know. Thanks

Can you provide a logcat?
I just run some tests on my emulator and can reproduce the issue.

Don't forgot to enable verbose logging from settings and reboot the app first 馃槈 Thanks!

Thanks for the changelog.

I can see the following crash occurring multiple times:

04-24 13:19:36.463 E/AndroidRuntime(26621): FATAL EXCEPTION: main
04-24 13:19:36.463 E/AndroidRuntime(26621): Process: org.adaway, PID: 26621
04-24 13:19:36.463 E/AndroidRuntime(26621): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.KeyEvent.getAction()' on a null object reference
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.ViewCompat$UnhandledKeyEventManager.preDispatch(ViewCompat.java:4213)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.ViewCompat.dispatchUnhandledKeyEventBeforeHierarchy(ViewCompat.java:3755)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.KeyEventDispatcher.dispatchBeforeHierarchy(KeyEventDispatcher.java:63)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.app.ComponentActivity.dispatchKeyShortcutEvent(ComponentActivity.java:86)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.bindImageView(TcpdumpLogAdapter.java:75)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.onBindViewHolder(TcpdumpLogAdapter.java:68)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.onBindViewHolder(TcpdumpLogAdapter.java:25)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6936)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6978)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5895)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6162)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Handler.handleCallback(Handler.java:739)
04-24 13:19:36.463 E/AndroidRuntime(26621): FATAL EXCEPTION: main
04-24 13:19:36.463 E/AndroidRuntime(26621): Process: org.adaway, PID: 26621
04-24 13:19:36.463 E/AndroidRuntime(26621): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.KeyEvent.getAction()' on a null object reference
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.ViewCompat$UnhandledKeyEventManager.preDispatch(ViewCompat.java:4213)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.ViewCompat.dispatchUnhandledKeyEventBeforeHierarchy(ViewCompat.java:3755)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.view.KeyEventDispatcher.dispatchBeforeHierarchy(KeyEventDispatcher.java:63)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.core.app.ComponentActivity.dispatchKeyShortcutEvent(ComponentActivity.java:86)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.bindImageView(TcpdumpLogAdapter.java:75)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.onBindViewHolder(TcpdumpLogAdapter.java:68)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at org.adaway.ui.tcpdump.TcpdumpLogAdapter.onBindViewHolder(TcpdumpLogAdapter.java:25)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6936)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6978)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5895)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6162)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Handler.dispatchMessage(Handler.java:95)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Looper.loop(Looper.java:145)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.app.ActivityThread.main(ActivityThread.java:6918)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at java.lang.reflect.Method.invoke(Native Method)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at java.lang.reflect.Method.invoke(Method.java:372)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Handler.handleCallback(Handler.java:739)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Handler.dispatchMessage(Handler.java:95)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.os.Looper.loop(Looper.java:145)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at android.app.ActivityThread.main(ActivityThread.java:6918)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at java.lang.reflect.Method.invoke(Native Method)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at java.lang.reflect.Method.invoke(Method.java:372)
04-24 13:19:36.473 W/ActivityManager(1411):   Force finishing activity 1 org.adaway/.ui.tcpdump.TcpdumpLogActivity
04-24 13:19:36.463 E/AndroidRuntime(26621):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
04-24 13:19:36.463 E/AndroidRuntime(26621):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
04-24 13:19:36.473 W/ActivityManager(1411):   Force finishing activity 1 org.adaway/.ui.tcpdump.TcpdumpLogActivity

It seems to come from the AndroidX libraries... Maybe an issue with Android 5.1.1.
I will need to fix a device with this version to test it or maybe an update of Android libraries could do the trick. Can you test an updated build if I send it to you?

Here is a build with updated AndroidX libraries.
It was signed with my key (same as XDA and official web site) but if you use F-Droid builds, don't forget to backup / restore your settings.

app-release.zip

Yay, no crash. Thanks for this instant fix. But it doesn't logging any dns requests. There are only 2 test domains.

Oh sorry ! It's was part of my tests... I disable tcpdump log reading to replace them with static values (I tried in a non rooted emulator, I had to fake this part).

This build bundles updated AndroidX libraries and restore tcpdump log parsing. If it you confirm it works well, I will make a new stable release.

app-release.zip

No crash, no ussues, working fine. Awesome, thank you 馃榾

Release is up! Thanks for your help 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jawz101 picture jawz101  路  6Comments

Sadi58 picture Sadi58  路  4Comments

thany picture thany  路  12Comments

RenaKunisaki picture RenaKunisaki  路  8Comments

zgfg picture zgfg  路  10Comments