Smack 4.4.6: NPE in Roster#deleteEntry() method cause aTalk to crash

Below is an extraction of the Google Play Console, Crashes and ANRs Stack trace reported for aTalk v3.1.4 release based on smack 4.4.6.

I do not have any more info on why this occurred. May be your team can take a look if NPE can be prevented, avoiding app crashes

Stack trace:

Sample attributes:
b. Android 9 (SDK 28)
c. Version: 301040 (3.1.4)Occurred: 4 days ago

Type: java.lang.NullPointerException

Exception java.lang.NullPointerException:
  at org.jivesoftware.smack.roster.Roster.deleteEntry (
  at org.jivesoftware.smack.roster.Roster.access$2000 (
  at org.jivesoftware.smack.roster.Roster$RosterResultListener.onSuccess (
  at org.jivesoftware.smack.roster.Roster$RosterResultListener.onSuccess (
  at org.jivesoftware.smack.SmackFuture$ (
  at java.util.concurrent.ThreadPoolExecutor.processTask (
  at java.util.concurrent.ThreadPoolExecutor.runWorker (
  at java.util.concurrent.ThreadPoolExecutor$ (
  at (

After walking through the smack Roster source, I see that this happens only if the RosterIQ packet received contains an invalid RosterEntry where its item attribute is missing or contains and empty jid string. Not sure if this is due to improper configuration of the server roster group.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.