While the code executes fine on my
x86 box, as when I run it on the handheld, it crashes with the following
error message:
Exception in thread "Thread-5" java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:203)
at gnu.java.nio.VMChannel.receive(Native Method)
at gnu.java.nio.VMChannel.receive(VMChannel.java:231)
at
gnu.java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:292)
at java.net.DatagramSocket.receive(DatagramSocket.java:602)
at UDPComm.run(UDPComm.java:40)
at java.lang.Thread.run(Thread.java:743)
at java.lang.VMThread.run(VMThread.java:120)
The error occurs when it enters m_socket.receive(dataPacket) (Line 40 of
attached java source) for the second time. The program is able to
receive the first UDP packet correctly without problem, however, when
the loop repeats itself, it consistently crashes in the same place.
x86 box, as when I run it on the handheld, it crashes with the following
error message:
Exception in thread "Thread-5" java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:203)
at gnu.java.nio.VMChannel.receive(Native Method)
at gnu.java.nio.VMChannel.receive(VMChannel.java:231)
at
gnu.java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:292)
at java.net.DatagramSocket.receive(DatagramSocket.java:602)
at UDPComm.run(UDPComm.java:40)
at java.lang.Thread.run(Thread.java:743)
at java.lang.VMThread.run(VMThread.java:120)
The error occurs when it enters m_socket.receive(dataPacket) (Line 40 of
attached java source) for the second time. The program is able to
receive the first UDP packet correctly without problem, however, when
the loop repeats itself, it consistently crashes in the same place.