eclipse-paho / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.14k stars 889 forks source link

OutOfMemoryError happened when MqttInputStream.readMqttWireMessage is called #820

Closed mlz322 closed 4 years ago

mlz322 commented 4 years ago

Please fill out the form below before submitting, thank you!

1)until the exception happend, i did not try the newest mqtt. 2)this exception happened when the app was running for several days(maybe 20days). 3)below is the details:

Android OS Version: 9 API:28 CPU ABI: armeabi-v7a

MQTT Version: org.eclipse.paho:org.eclipse.paho.android.service:1.1.1 org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.4

details log: java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 0 free bytes and 3GB until OOM, max allowed footprint 537030632, growth limit 536870912 at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:119) at java.net.SocketInputStream.read(SocketInputStream.java:176) at java.net.SocketInputStream.read(SocketInputStream.java:144) at java.net.SocketInputStream.read(SocketInputStream.java:229) at java.io.DataInputStream.readByte(DataInputStream.java:268) at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) at java.lang.Thread.run(Thread.java:764)

mlz322 commented 4 years ago

it was not the mqtt's problem!