RoUTP
RoUTP copied to clipboard
Crash on iOS7 when sending data.
I've encountered a crash when using RoUTP on iOS7 devices; it appears the data chunk, when passed to my game center delegate for sending, is equal to nil. This occurs despite the data object, passed into the RoUTP session, containing data.
This bug should occur when any data is passed into the RoUTP session. It occurs over Wifi and 3G networks.
Thanks, Ryan.
It occurs on this line: [self.delegate session:self preparedDataForSending:chunk.encodedChunk];
of the ROUSession.m file.
This might be what's happening to me too. *** Terminating app due to uncaught exception 'ROUException', reason: 'Encoded ack chunk is too short' getting thrown in [ROUAckChunk chunkWithEncodedChunk:]
Oh I think it is because I am also trying to send some data using GKMatchSendDataUnreliable without using RoUTP since I don't need or want some data sent reliably. So it's receiving data that is 4 bytes and not 8 bytes. Would simply checking the sizeof the incoming data be a safe way to decide which way to process the data? That is, sending it through RoUTP or not.
Hey,
You probably should be, instead of trying to distinguish between data sent with RoUTP or not, using RoUTP for both to ensure correct delivery.
I found my issue was caused by me not following the ReadMe correctly, especially with how I was setting the 'property' for it in the .h file. After changing some stuff around, it now works perfectly.
Ryan.
Yeah some of my data packets will be much bigger than others, so it's not a good way to check. It's just that I have some data sent at 60 updates a second and it doesn't matter if it's received or not, anything missed is discarded.
Well, in that case, you should probably attach a flag to each data packet, that shows whether it has been compressed or not; especially if you're willing to discard packets that were not received.
Or maybe I can just inspect the header (or lack of) and decide that way. Well, everything is working now for me if I use RoUTP for all messages. Thanks for your help. And many thanks to the maker!! (rabovik)