Unless the pin is held low during either no connection or periods of data idle, the software will never time out... even an odd pulse of random noise will be enough to keep resetting the timeout and your program will appear to hang at that statement. Your scopes probe (even on x10 setting) is probably enough to drag the pin low and give a false impression that you only have a few mV of input... if you really want to know the truth (can you handle it?) put a good quality VVM on the input pin and look at the horror story of what it's really doing...

As one solution (of many approaches), see also http://www.picbasic.co.uk/forum/show...=9765#post9765