adeelahmedkhanabbasi / xbee-api

Automatically exported from code.google.com/p/xbee-api
GNU General Public License v3.0
0 stars 0 forks source link

Data from RxTxSerialCom seems to be unavailable when parsing! #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a problem which causes a java.lang.OutOfMemoryError

Normally when I receive packets with no error I get the following log output:

[2014-01-17 17:25:21,217] [InputStreamThread] [INFO] 
[com.rapplogic.xbee.api.PacketParser] Handling ApiId: ZNET_RX_RESPONSE (0x90) 
183895465 [InputStreamThread] INFO com.rapplogic.xbee.api.PacketParser  - 
Handling ApiId: ZNET_RX_RESPONSE (0x90)
[2014-01-17 17:25:21,243] [InputStreamThread] [INFO] 
[com.rapplogic.xbee.api.InputStreamThread] Received packet from XBee: 
apiId=ZNET_RX_RESPONSE 
(0x90),length=29,checksum=0xf4,error=false,remoteAddress64=0x00,0x13,0xa2,0x00,0
x40,0x61,0x64,0x5d,remoteAddress16=0x23,0x9c,option=null,data=0x57,0x01,0x02,0x0
3,0x04,0x05,0x0e,0x01,0x11,0x11,0x19,0x00,0x57,0x5d,0x00,0x00,0x00 
183895491 [InputStreamThread] INFO com.rapplogic.xbee.api.InputStreamThread  - 
Received packet from XBee: apiId=ZNET_RX_RESPONSE 
(0x90),length=29,checksum=0xf4,error=false,remoteAddress64=0x00,0x13,0xa2,0x00,0
x40,0x61,0x64,0x5d,remoteAddress16=0x23,0x9c,option=null,data=0x57,0x01,0x02,0x0
3,0x04,0x05,0x0e,0x01,0x11,0x11,0x19,0x00,0x57,0x5d,0x00,0x00,0x00

But sometimes I have the problem that RxTxSerial Com returns that no data is 
available:

[2014-01-17 17:30:12,082] [InputStreamThread] [INFO] 
[com.rapplogic.xbee.api.PacketParser] Handling ApiId: ZNET_RX_RESPONSE (0x90) 
184186330 [InputStreamThread] INFO com.rapplogic.xbee.api.PacketParser  - 
Handling ApiId: ZNET_RX_RESPONSE (0x90)
[2014-01-17 17:30:21,960] [Thread-5] [WARN] [com.rapplogic.xbee.RxTxSerialComm] 
We were notified of new data but available() is returning 0 
184196208 [Thread-5] WARN com.rapplogic.xbee.RxTxSerialComm  - We were notified 
of new data but available() is returning 0
[2014-01-17 17:30:21,965] [InputStreamThread] [INFO] 
[com.rapplogic.xbee.api.InputStreamThread] Received packet from XBee: 
apiId=ZNET_RX_RESPONSE 
(0x90),length=69,checksum=0x2e,error=false,remoteAddress64=0x00,0x13,0xa2,0x00,0
x40,0x61,0x64,0x5d,remoteAddress16=0x49,0xf6,option=null,data=0x55,0x01,0x02,0x0
3,0x04,0x05,0x0e,0x01,0x11,0x11,0x1e,0x00,0x07,0x00,0x00,0x00,0x03,0x42,0xc9,0xc
0,0x8f,0x00,0x01,0x42,0xc6,0x79,0x4a,0x00,0x05,0x40,0x84,0x7a,0xe0,0x00,0x04,0x4
2,0xba,0x23,0x4b,0x00,0x0a,0x40,0x40,0x00,0x00,0x00,0x0b,0x40,0x05,0xfc,0xb2,0x0
0,0x0c,0xba,0x34,0x00,0xb4 
184196213 [InputStreamThread] INFO com.rapplogic.xbee.api.InputStreamThread  - 
Received packet from XBee: apiId=ZNET_RX_RESPONSE 
(0x90),length=69,checksum=0x2e,error=false,remoteAddress64=0x00,0x13,0xa2,0x00,0
x40,0x61,0x64,0x5d,remoteAddress16=0x49,0xf6,option=null,data=0x55,0x01,0x02,0x0
3,0x04,0x05,0x0e,0x01,0x11,0x11,0x1e,0x00,0x07,0x00,0x00,0x00,0x03,0x42,0xc9,0xc
0,0x8f,0x00,0x01,0x42,0xc6,0x79,0x4a,0x00,0x05,0x40,0x84,0x7a,0xe0,0x00,0x04,0x4
2,0xba,0x23,0x4b,0x00,0x0a,0x40,0x40,0x00,0x00,0x00,0x0b,0x40,0x05,0xfc,0xb2,0x0
0,0x0c,0xba,0x34,0x00,0xb4

After this I get a java java.lang.OutOfMemoryError Exception...

Has anyone an idea how to fix this?

Original issue reported on code.google.com by ch.juh...@gmail.com on 18 Jan 2014 at 2:02

GoogleCodeExporter commented 8 years ago
How much memory have you allocated for the process? How much is it using?

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 6:30