04-02-2012 05:11 AM
I have the following behavior in simulators with OS 6.0.
When I disable 'In Coverage' under network properties a call of flush or close on a tcp output stream waits forever, even when 'In Coverage' is enabled again.
In debugger I see it is always the call of TcpOutputStream.write that waits, see the following stacktrace:
Object.wait() line: 480
TcpOutputStream.write(byte, int, int) line: 197
TcpOutputStream(OutputStream).write(byte) line: 61
TLSRecordProtocol(SSLRecordProtocol).write(int, byte, int, int) line: 769
TLSRecordProtocol(SSLRecordProtocol).write(int, DataBuffer) line: 640
Sometimes this happens already in the the call of flush, sometimes this call does not wait but the following call of close.
I can see this behavior with different simulators running OS 6.0.
With a simulator running 4.7 or hardware devices it does not seem to happen.
What should be the normal behavior when a write operation is called on a tcp stream while the device is out of coverage?
04-04-2012 10:44 AM
The expected behaviour is that an IOException is thrown after 2 minutes when out of coverage. How long have you waited?
04-09-2012 05:53 AM
I know about the timeout of 2 minutes for write operations.
I have waited for about twenty minutes.
Are you sure that the expected behaviour is that the operations are waiting for 2 minutes before an exception is thrown when the device is out of coverage?
On a 4.7 simulator the operations seem to be canceled immediately without a 2 minutes timeout.
04-09-2012 10:22 AM
Are you seeing this problem on a real device or just in the simulator? Coverage timeouts for some routes in the simulator are not always 100% accurate compared to a real device.
04-09-2012 01:57 PM
At the moment I have only trouble with that issue in simulators running under OS 6.0.
I was not able to reproduce this behaviour on several real devices .
But I am afraid that my customers running in the problem with real devices.
Do you think that this is only a problem with the simulators?
04-09-2012 03:06 PM
Trust the device over the simulator for in/out of coverage scenarios, especially when toggling the coverage status on the fly (while your app is running).
07-27-2012 03:24 AM
i got this kind of error too,
im testing in on simulator and device.
when the coverage is changing the tcpoutputstream.write will wait forever, and the screen will stuck and freeze.
07-27-2012 04:24 AM
My experience ties in with what Mark was saying, in fact the IO times out after 2 minutes. Make 100% sure that your processing in the catch for the I/O does indicate that there has been a problem and unfreeze the screen. You should test this as part of your processing anyway since this will happen on device.