I am Sending a binary data through a perticular Socket(remote machine). I am sending a 2 byte integer and then 4 byte integer
as data. To retrive data on the device I am using this piece of code.
// this part of code for 16 bit value retrival
const unsigned short* val16 = reinterpret_cast<const unsigned short*>(&data()[m_pos]);
// this part of code for 32 bit value retrival
const unsigned long* val32 = reinterpret_cast<const unsigned long*>(&data()[m_pos]);
The problem here is that I am getting a KernExe-3 on the device and the device crashes after the above code executes.
I am guessing that this problem is related to ARM processor's word alignment.
This code work perfectly fine on the Emulator but does not do the same on the device.
An URGENT solution or comments on this problem will be helpful.