Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 665279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:41:26+00:00 2026-05-13T23:41:26+00:00

HI , I am getting a issue when trying to access the kABPersonInstantMessageProperty. The

  • 0

HI ,

I am getting a issue when trying to access the kABPersonInstantMessageProperty. The code is as follows :

    ABMultiValueRef IMS = ABRecordCopyValue(record, kABPersonInstantMessageProperty);
CFRetain(IMS);
if(IMS)
{
    int IMSCount = ABMultiValueGetCount(IMS);
    MWLOG(5, @"**** IMS COunt **** : %d", IMSCount);
    for(int iIM =0; iIM < IMSCount; ++iIM)
    {
        MWLOG(5, @"index *** : %d", iIM);
        CFDictionaryRef dict = ABMultiValueCopyValueAtIndex(IMS, iIM);
        NSString* label = (NSString*)ABMultiValueCopyLabelAtIndex(IMS, iIM);

        NSString* service= (NSString*)CFDictionaryGetValue(dict, kABPersonInstantMessageServiceKey);
        NSString* username= (NSString*)CFDictionaryGetValue(dict, kABPersonInstantMessageUsernameKey);

        if(label) CFRelease(label);
        if(service) CFRelease(service);
        if(username) CFRelease(username);
        if(dict) CFRelease(dict);
    }

    CFRelease(IMS);
}

But I am getting the following error in console :

2010-03-13 12:39:16.731 mwp[1464:4f0b] *** -[CFString retain]: message sent to deallocated instance 0x1582820

2010-03-13 12:49:12.219 mwp[1464:4f0b] *** -[CFString _cfTypeID]: message sent to deallocated instance 0x15f0bf0

The stacktrace in the debugger is as follows :

**#0    0x3026e017 in ___forwarding___

**#1    0x3024a0a2 in __forwarding_prep_0___**

**#2    0x30201368 in CFRetain **

**#3    0x325bdb6d in ABCCopyDictionaryWithTypes**

**#4    0x325bdbe3 in ABCMultiDictionaryCreateCopy**
  • Is that the issue is with the api. I searched in the net but could nt find any solutions.

I am getting this issue only in reading the InstantMessageProperty.

Any help would be greatly appreciated ….

Best Regards,

Mohammed Sadiq.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:41:27+00:00Added an answer on May 13, 2026 at 11:41 pm
        NSString* service= (NSString*)CFDictionaryGetValue(...);
        NSString* username= (NSString*)CFDictionaryGetValue(...);
        ...
        if(service) CFRelease(service);
        if(username) CFRelease(username);
    

    CFDictionaryGetValue is a “get” function. By the Get Rule you do not own them, so you should not CFRelease them. Otherwise you’ll double deallocate those values.

    Just remove these two CFRelease lines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having an issue getting some code to work. Is there a way to
I'm trying to access servletContextin a controller like so, but keep getting null pointer
I'm getting an exception when trying to access an .asmx webservice within a MVC
I am trying jdbc connection with mysql but getting SQLException. My code is:-- public
We’re having an issue with Googlebot trying to access a URL on an Ajax
I am getting a EXC_BAD_ACCESS (code=2, address=0x8) error when trying to post a notification.
I've been trying to get Apache to follow symlinks. I am getting an Access
I'm currently trying to get my head around MUI, and getting some issues with
I'm getting an issue with the F# powerpack quotation evaluation. open Microsoft.FSharp.Linq.QuotationEvaluation let print
I'm having an issue getting a LINQ query to work. I have this XML:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.