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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:06:18+00:00 2026-06-06T12:06:18+00:00

I wrote a huge iPad app 2 years ago and now I’m getting back

  • 0

I wrote a huge iPad app 2 years ago and now I’m getting back to it and upgrading it to iOS5. Its a bit messy as it was my first large iPad app.

Its has a “sync” step that may last for several minutes and these are a bunch of asynchronous method calls that go and fetch JSON from a url and put them into core data. Fairly often, the app will freeze (UI is unresponsive).

What are some good techniques to track down this freezing? The debugger isn’t that helpful as unless the code is running on the main thread, you have no useable stack trace. The app often does not recover either which suggests some sort of dead lock situation.

Here is one particular example that might help:

enter image description here

I paused the execution once I verified that it was frozen. It seems to freeze on the same line every time – a simple assignment. What is going on here? Its so frustrating.

Is this core data access that is causing this? Any pointers would be greatly appreciated.

EDIT 29-JUNE-2012

Click here to see the source of the class that does all the Create/Update/Deleting of Core data objects. I just need to stop the freezing/crashing in this app. I know its a mess, it makes me cringe too. I wrote this 2 years ago with hardly any knowledge of objective-c. I should re-write it but I have to get this working and out of my head in 2 days. Could anyone give me pointers on approaches to get this thread-safe quickly? Could I wrap each method that updates NSManagedObjectContext in grand central dispatch block code?

  • 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-06T12:06:20+00:00Added an answer on June 6, 2026 at 12:06 pm

    It is indeed possible that Core Data (in combination with multithreading) is the cause of your troubles – I experienced similar problems.

    Here’s an excellent article on this topic: Core Data and threads, without the headache

    I also see a call to performSelector: in your stack trace. You might want to consider to use Grand Central Dispatch, although that might be a lot to rewrite in your case.

    As for your your actual question (tracking down deadlocks), I’d suggest using Instruments as well. Also, look at the status of the other threads.

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

Sidebar

Related Questions

I just wrote a very simple perl tk script to read a huge text
I have the code below that I wrote to get rid of a huge
I've been doing a bit of testing on some code I wrote when I
We wrote a social network which expected huge amount of users, and we need
I wrote a huge application which uses WCF services to do things like read
i just finished Coding my PHP application now the coding has become somewhat Huge
Initially... I started programming in C. that was was 10 years back(college). The IDE
I wrote a code, wich uses a huge amount of memory, so I'm monitoring
This is so infuriating! >_< I've written a huge, complicated Haskell library. I wrote
I have to write huge data in text[csv] file. I used BufferedWriter to write

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.