Wednesday, February 2, 2011

Can't Start Debugger. CFSocketSetAddress Returns Error -1

Was debugging an application in real device, when suddenly got an error note about failed network connection. Since this happened before application launch, I got curious.

Why would debugging application in device fail due network error before launch? Why would it fail now, when everything was ok dozens of times just beforehands (yes, I do a lot of quick but short debugging sessions in real device)?

Found this on console:
Wed Feb 2 16:29:54 unknown[5573] <Warning>: debugserver-48 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved.
Wed Feb 2 16:29:54 unknown[5573] <Warning>: Connecting to service...
Wed Feb 2 16:29:55 unknown kernel[0] <Debug>: lockbot[5564] Builtin profile: debugserver (sandbox)
Wed Feb 2 16:30:38 unknown SpringBoard[27] <Notice>: MultitouchHID(21b630) uilock state: 0 -> 1
Guessing this crash happened because device screen lock got activated exactly at wrong time. Unlocked the device, tried again - and success.

Lessons learned: socket does not always mean network access out of the device. Btw here's some earlier notes about same error. Didn't have to reboot this time!

No comments:

Post a Comment