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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:23:46+00:00 2026-06-14T05:23:46+00:00

I got an exception when I tried to put a nil object to a

  • 0

I got an exception when I tried to put a nil object to a NSDictionary using the following code:

NSString * object = [self someMethod]; // the method return nil
NSDictionary * dict = @{ @"key": object };

This is a simple error I know, I just use it as an example. The app crash in simulator and the error message in console is below:

 2012-11-13 14:40:00.528 Ape[44456:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]'

 *** First throw call stack:
 (0x208b012 0x1a68e7e 0x2051a95 0x207e4e9 0x93f72 0x939b4 0x8800f 0x85f4d 0x852a3 0x1ce853f 0x1cfa014 0x1ce9fd6 0x1cfa014 0x1cf18b7 0x1ced405 0x1cea768 0x2031af5 0x2030#
 libc++abi.dylib: terminate called throwing an exception

My question is how to figure out the call stack message in console and find out which line of code cause the problem?

  • 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-06-14T05:23:47+00:00Added an answer on June 14, 2026 at 5:23 am

    You need to add an exception breakpoint. Open Xcode -> Navigator -> Breakpoints (shortcut Cmd+6). In the lower left corner, there’s a + sign, click it and select “Add exception breakpoint…” then “Done”.

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

Sidebar

Related Questions

I am using following datatype in my database . but I got exception as
I've got a problem with NoClassDefFound exception in Grails 2.0 when I tried to
ive got this exception. My Object looks like this: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class ObjectDTO
I am using Hibernate and got the exception ArrayIndexOutOfBoundsException. What are the possible causes?
The following code is pretty self-explanatory and my question is very simple : Why
I'm using Django 1.3 with Postgresql 8.4 and I've got models like the following
I got exception when I try to publish action to facebook. Exception : {error:{message:(#3502)
I've got exception about convert NULL to Int32. I've got a table from database
I got this exception ... EntityCategoryProxy could not be converted to int in ...
When i run the command below: 127.0.0.1:8080/solr/suggest?spellcheck.build=true I got an exception as below, anyone

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.