Re: SKIndexAddDocument crashing
Re: SKIndexAddDocument crashing
- Subject: Re: SKIndexAddDocument crashing
- From: Mark Wright <email@hidden>
- Date: Fri, 08 Nov 2013 14:27:27 +0000
FWIW it crashes on mine too (not too surprising, same Xcode and OS).
It doesn’t crash if you replace the crashing line with:
SKIndexAddDocumentWithText(searchIndexFile, doc, NULL, false);
I don’t know if that’s any use to you (never used the framework).
I think it’s failing because it’s not recognising the file type as text (see the docs - option click the function).
It doesn’t crash if you supply the mimeTypeHint:
SKIndexAddDocument( searchIndexFile, doc, (__bridge CFStringRef)@"txt", false );
…
On 07 Nov 2013, at 12:18, Eric Gorr <email@hidden> wrote:
> The values are all valid. There is not much more to the sample test project then the code I posted if you wanted to check this out yourself. The sample project is just the default cocoa app. At least one other person did and saw the same behavior
>
> Sent from my iPhone
>
>> On Nov 7, 2013, at 12:12 AM, Jerry Krinock <email@hidden> wrote:
>>
>> Forgive me if you’ve already done this, Eric, but you didn’t say if you did this…
>>
>> When a function in an SDK crashes, the first thing you should do is check the parameters you’re feeding it. In this case, are your local variables searchIndexFile and doc valid? At least, not NULL?
>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> 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:
>>
>> This email sent to email@hidden
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden