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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:02:48+00:00 2026-06-12T11:02:48+00:00

I just got a crash report (at launch), after submitting my app to the

  • 0

I just got a crash report (at launch), after submitting my app to the Mac App Store, for review :

Application Specific Information:
objc[1832]: garbage collection is ON
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSDictionary initWithObjects:forKeys:]: count of objects (0) differs from count of keys (2)'
terminate called throwing an exception
abort() called

This is the part of code, I’m suspecting :

- (NSMutableDictionary*)getNewChapterWithTitle:(NSString*)title
{
    if (title==nil) title = [NSString stringWithFormat:@"Chapter %d",[[self appChapters] count]+1];

    // Align Justify
    NSMutableParagraphStyle * paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
    [paragraphStyle setAlignment:NSJustifiedTextAlignment];

    // Set Font
    NSDictionary *font = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSFont fontWithName:@"Garamond" size:15.0],paragraphStyle, nil] forKeys:[NSArray arrayWithObjects:NSFontAttributeName, NSParagraphStyleAttributeName, nil]];

    NSString* lipsum = @"\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc consequat fermentum faucibusPhasellus ac consequat metus. Sed at lectus sit amet tellus vulputate mollis vel suscipit metus. Nulla a sapien purus. Aenean sollicitudin lacus varius nisi faucibus nec lacinia mauris fermentum. Aliquam euismod quam rhoncus ipsum pulvinar quis condimentum magna imperdiet. Nullam augue leo, dictum tincidunt ullamcorper id, porta in lorem. Duis in vestibulum nisl.\
    \n\n\
    Donec imperdiet dignissim massa, at ultricies enim dignissim at. Etiam pharetra neque quis quam condimentum vitae viverra nisl volutpat. Vivamus urna ante, ultrices ut tincidunt id, auctor id est. Nunc eget diam purus, at viverra orci. Maecenas eu magna mi, id venenatis arcu. Maecenas ornare, tortor sit amet gravida placerat, diam urna lacinia nunc, a dictum arcu libero sed metus. Nulla pulvinar sapien vitae lectus faucibus quis tempus elit volutpat. Integer facilisis interdum lectus, sit amet dapibus enim mattis non. Donec sed pulvinar risus. Mauris in nulla urna, sit amet placerat turpis. Proin felis erat, pretium sed pharetra vel, tincidunt quis tortor. Donec ut nisi dui. Pellentesque gravida gravida justo, quis convallis leo euismod in. Nam pretium accumsan sapien ac interdum.";

    NSMutableAttributedString* theLipsum = [[NSMutableAttributedString alloc] initWithString:lipsum attributes:font];

    return [[NSMutableDictionary dictionaryWithObjectsAndKeys:
            [title retain],@"title",
            [theLipsum retain],@"content",
            [NSNumber numberWithInt:0],@"isMarkdown",
            nil] retain];
}

Do you see anything “obviously” wrong with the above? (It’s being called like 4-5 times, from awakeFromNib, so I guess that’s the culprit…)


HINT : The retains have been added after the report; I don’t know if it’s going to help though at all…

  • 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-12T11:02:50+00:00Added an answer on June 12, 2026 at 11:02 am

    [NSFont fontWithName:@"Garamond" size:15.0] probably returns nil. As far as I know it’s not a default font on OSX. So your objects array is empty, because only the objects up until the first nil are added.

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

Sidebar

Related Questions

i just got a call from Hosting company, they claimed that my application creates
I just published my first application to Google Marketplace and received the information, that
I just got this crash log from Crittercism. Now I suspect that it might
I've got the following problem. After starting, application works fine - even after changing
Question: I need to disable the console application's crash debug prompt. Background: We've got
Sometimes I got a crash of my application with the following stack trace :
On Vista, I got a problem with the application crash handler. Basically, if something
Just got the new iPad, and when I touch the microphone and say a
I just got an email from twitter saying my keys have now been enabled
I just got pagination to work on my site, but I wanted to use

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.