NSInvalidArgumentException while using NSNetService

Hi


I am developing an app on the same lines as the witap ios sample application. While the app works most of the time, the app crashes on NSStreamEventEndEncountered or NSStreamEventErrorOccurred in the input-output stream handler.


When device reconnects on to a server restart, the app crashes with the error

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** NSAllocateMemoryPages(18446744073709551615) failed'


Could you please help me figure out the reason for the exception?


Thanks

Raghav

This message means that someone has tried to allocate a memory block of size 18446744073709551615. Clearly that's a problem. You should use Xcode's exception breakpoint feature to set a breakpoint on Objective-C exceptions and then, when you hit the breakpoint, look at the backtrace to see who's making that call.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1@apple.com"
NSInvalidArgumentException while using NSNetService
 
 
Q