After a quick search I am at a loss on my problem. I have an InSim app that has been working all through development (2 months now), and I have even handled the MSO packet at times to get user commands but all of a sudden it is not working anymore. Actually InSim seems to be sending me garbage messages : / But the strangest thing is it won't crash my system or make the application stop behaving. After about 50 messages with a message ID of '108' (unintialized value), it will stop and give me correct packets again but I will never recieve the MSO and there are about 30 bad packets each time an MSO *would* have been sent...
Has anyone heard of or received a corrupt MSO packet before? I would say I am doing something wrong on my end but it was working before and the netcode works perfectly fine for all the other packets being sent and received - also hasn't been changed for months. Really stumped here and need this fixed, so if you have any *idea* at all.
Other info is I am still using patch X10 / X12.
EDIT: More information -
There is an ISP_NONE sent before 59 of those invalid packets.
This ISP_NONE has a size of 11, reqi 0, type 0 (ISP_NONE), and data is strange
EDIT2:
Want it to get more interesting? Of these 59 "invalid" packets the 1st one has the following info:
Size: 66, Type 108, Reqi 97, Data: ckBird : ^L$test
the other 58 are the same except size is 0
EDIT3:
Size was zero and the message is zero on ALL the following packets, but all becomes fine because my method was reading the size 1 byte to a time. I think I am getting closer to the problem...
EDIT4:
FIXED! Guess this will never be a problem and will never be a problem again. Though it was because I was casting things wrong - how it worked before, and on all the other packets is VERY strange to me, although it is fixed and the problem was I was reading a char from the packet (for the size) then casting to an int for the size. I needed to cast it to an unsigned char FIRST then to the int and all works. I know what the problem was 100% and am surprise this mistake made it months without showing up... Hope this thread helps others who thinks their packets are being corrupted.
Has anyone heard of or received a corrupt MSO packet before? I would say I am doing something wrong on my end but it was working before and the netcode works perfectly fine for all the other packets being sent and received - also hasn't been changed for months. Really stumped here and need this fixed, so if you have any *idea* at all.
Other info is I am still using patch X10 / X12.
EDIT: More information -
There is an ISP_NONE sent before 59 of those invalid packets.
This ISP_NONE has a size of 11, reqi 0, type 0 (ISP_NONE), and data is strange
EDIT2:
Want it to get more interesting? Of these 59 "invalid" packets the 1st one has the following info:
Size: 66, Type 108, Reqi 97, Data: ckBird : ^L$test
the other 58 are the same except size is 0
EDIT3:
Size was zero and the message is zero on ALL the following packets, but all becomes fine because my method was reading the size 1 byte to a time. I think I am getting closer to the problem...
EDIT4:
FIXED! Guess this will never be a problem and will never be a problem again. Though it was because I was casting things wrong - how it worked before, and on all the other packets is VERY strange to me, although it is fixed and the problem was I was reading a char from the packet (for the size) then casting to an int for the size. I needed to cast it to an unsigned char FIRST then to the int and all works. I know what the problem was 100% and am surprise this mistake made it months without showing up... Hope this thread helps others who thinks their packets are being corrupted.