AnsweredAssumed Answered

Fatal Exception: java.lang.IllegalStateException "Queue full"

Question asked by Nick Dowell on Nov 28, 2016
Latest reply on Dec 1, 2016 by Flow

Fatal Exception: java.lang.IllegalStateException: Queue full

       at java.util.AbstractQueue.add(AbstractQueue.java:69)

       at java.util.concurrent.ArrayBlockingQueue.add(ArrayBlockingQueue.java:282)

       at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter.drainWriterQueueToUna cknowledgedStanzas(XMPPTCPConnection.java:1456)

       at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketWriter.init(XMPPTCPConnectio n.java:1233)

       at org.jivesoftware.smack.tcp.XMPPTCPConnection.initConnection(XMPPTCPConnection.j ava:645)

       at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection. java:855)

       at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.ja va:364)

       at org.jivesoftware.smack.ReconnectionManager$2.run(ReconnectionManager.java:242)

       at java.lang.Thread.run(Thread.java:841)

 

This crash has been encountered on Android with smack 4.1.9 as well as older versions.

 

According to the Java documentation, it is preferable to use Queue#offer instead of Collection#add to avoid this kind of exception...

Outcomes