PingManager.ping gave me a outofmemeory at aSmack 4.0.1-SNAPSHOT-2014-07-13

java.lang.OutOfMemoryError

at java.util.concurrent.ArrayBlockingQueue.(ArrayBlockingQueue.java:197)

at java.util.concurrent.ArrayBlockingQueue.(ArrayBlockingQueue.java:181)

at org.jivesoftware.smack.PacketCollector.(PacketCollector.java:72)

at org.jivesoftware.smack.PacketCollector.(PacketCollector.java:58)

at org.jivesoftware.smack.XMPPConnection.createPacketCollector(XMPPConnection.java :802)

at org.jivesoftware.smack.XMPPConnection.createPacketCollectorAndSend(XMPPConnecti on.java:786)

at org.jivesoftware.smackx.ping.PingManager.ping(PingManager.java:175)

at org.jivesoftware.smackx.ping.PingManager.ping(PingManager.java:193)

at org.jivesoftware.smackx.ping.PingManager.pingMyServer(PingManager.java:237)

at xxx.xxx.xxx.PingReceiver.onReceive(IMManager.java:1234)

I set a 5-minute loop with alarmmanager. sometimes I got the error message above.

Could anyone give me a help?

PS:I have saw the url [SMACK-441] Memory leak in KeepAliveManager - Jive Software Open Source said bug has been fixed, But I got the error indeed.

Your used Smack version is 5 months old and a Snapshot version. Consider updating.

Sorry I can not update to the newest one, because the newest one has been changed source structure.

I will cost so much time to change my app’s structure to fit new structure of asmack.

So Could you give me a newest version which has the same structure as which I am using please?

Thanks!

Micro/Patchlevel releases are API compatible within their Major/Minor versions. You should be able to update to 4.0.6 just fine.

1 Like

thanks, I go to get one at once.