>> On Feb 4, 2015, at 9:49 PM, Graham Cox <graham....@bigpond.com> wrote:
>> On 5 Feb 2015, at 12:20 pm, Roland King <r...@rols.org> wrote:
>> 
>> You should google EXC_GUARD, it’s interesting. 
>> 
>> 0x40000002000000fe
>> 
>> the 02 in the middle says the guard is in dup(), which it is. The 0xfe at 
>> the end tells you what file descriptor it’s on. (0xfe .. really, seems 
>> unusually if not impossibly large for a file descriptor, you got that many 
>> files open?).
> 
> 
> Well, at the point where this crashes, I haven't opened any files at all 
> myself, though it partly depends what you mean by "file" in this context, and 
> whether the lower level code invoked by NSURLSession opens files for its own 
> use. As I said, I'm creating about 50 NSURLSessions as my app launches, which 
> may be simply too many.
> 
> I am googling EXC_GUARD but haven't found anything that breaks it down - just 
> a bunch of people asking what it is.

Everything is a file descriptor. Open files, sockets, loaded frameworks & 
bundles, even STDIN/OUT/ERROR.

You can check if you're hitting the limit of file descriptors by (temporarily) 
raising the number you can have open with setrlimit(). If you raise it and your 
app stops crashing, then that's likely the culprit. I would guess so - the 
default max number you can have open is 256, and 0xfe lines up with that...

If your app runs long enough before crashing, you can also use lsof in Terminal 
to see what your app has open.



________________________
Michael Nickerson
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to