powered by Jive Software

NullPointerException in notifyConnectionError


I’m using asmack-android-9-0.8.9.jar and I encountered:

01-15 20:24:30.994 E/AndroidRuntime(31845): FATAL EXCEPTION: Smack Packet Reader (3)

01-15 20:24:30.994 E/AndroidRuntime(31845): java.lang.NullPointerException

01-15 20:24:30.994 E/AndroidRuntime(31845): at org.jivesoftware.smack.XMPPConnection.notifyConnectionError(XMPPConnection.java :1068)

01-15 20:24:30.994 E/AndroidRuntime(31845): at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:317)

01-15 20:24:30.994 E/AndroidRuntime(31845): at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:46)

01-15 20:24:30.994 E/AndroidRuntime(31845): at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:72)

As I understand this issue was already handled

How should I resolve it?

Does asmack 0.8.9 includes the fix?



Nope, this is a slightly different bug in the same method. It’s caused by an Exception in PacketReader in the early connection stage, i.e. when PacketWriter is not yet initialized. I’ve seen that NPE too and now it has a issue id: SMACK-525

Thanks for reporting.

Seems like the listener variable is null, according to the line number in the stacktrace (Smack 3.3.1 sources).


No idea, how that could happen…

aSmack uses a slighly modfies source set of Smack so the line numbers don’t add up. It’s packetWriter that’s null here.


I saw that the bug was already resolved.

Is there a place when I can download an updated JAR (e.g. asmack 0.9)?

If not when do you expect to rlease one?