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 4615616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:51:56+00:00 2026-05-22T01:51:56+00:00

i have a problem with that exception, actually, when i click on the calloutAccessoryControlTapped

  • 0

i have a problem with that exception, actually, when i click on the calloutAccessoryControlTapped button of the pin i got this exception, i try to track the error by the NSLog in the console and i found the only pin which caused this exception have the value <null>, i explain by some code :

for (int i=0; i<[array count]; i++) {
           NSDictionary *stationEnCours=[array objectAtIndex:i];
           location2D = (CLLocationCoordinate2D){ .latitude = lat, .longitude = lng };
           MyLocation *annotation=[[[MyLocation alloc]initWithName:ensStation distanceVersLaStation:distance coordinate:location2D]autorelease];

//here we set the properties before we get call to addAnnotation annotation.stationAdress=[stationEnCours objectForKey:@"ssiphone_adresse"];
           NSLog(@"%@",annotation.stationAdress);
           [mapView addAnnotation:annotation];
}

i have 4 stations, in the console i got this :

2011-05-11 22:27:11.768 TopStation[2370:207] A 51 - Aire de la Champouse
2011-05-11 22:27:11.769 TopStation[2370:207] <null>
2011-05-11 22:27:11.769 TopStation[2370:207] 467 Avenue Henri Mauriat
2011-05-11 22:27:11.769 TopStation[2370:207] Route de Berre - Jas de Bouffan

the second one is which cause problem later when i try to click on its calloutAccessoryControlTapped so i checked my database and its adress is a string and it’s not null.
i am little confused, why that exception although all is retrieved as String ?? i have also tried to do the same work but on the server side and all is ok, it’s not displaying me NULL, only in the iPhone side and for this station.
If this help, the adress of the station which make problem is :
1 Boulevard du Maréchal Juin

  • 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-22T01:51:57+00:00Added an answer on May 22, 2026 at 1:51 am

    At some point in your code, you are either calling isEqualToString: on an object that you think is an NSString but is really NSNull, or (more likely) you are passing an NSNull to a method/property of a class somewhere that expects a NSString. For example, you might be setting a UILabel’s text property with the value of annotation.stationAdress.

    You should generally only use NSNull where you cannot use nil, e.g. in an NSArray, NSDictionary, or the like. After extracting the possibly-NSNull value from the collection, you should include a statement like this to convert it back to nil:

        if (value == [NSNull null]) value = nil;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a problem with my code that is supposed to write some data
I have created an application using Netbeans 6.9. In the application I want that
I have a util class that is supposed to call a method on a
First of all I have seen that there are many questions about unrecognized selector
I actualy have 2 problems I use eclipse -> export project to generate a
I have a project whose core domain is dramatically changing. It's possible to use
I have a WPF textbox on a form to allow input of a URI.
I'm having some trouble with transactions in Rails 3. Basically I have two models
I am trying to use the MVC design. In the model I wanted a

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.