Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executeFetchRequest freezes App #57

Open
qepic42 opened this issue Mar 13, 2014 · 5 comments
Open

executeFetchRequest freezes App #57

qepic42 opened this issue Mar 13, 2014 · 5 comments

Comments

@qepic42
Copy link

qepic42 commented Mar 13, 2014

I'm using the following code sometimes to deal with data:

NSManagedObjectContext *context = [appDelegate managedObjectContext];

    if (context != nil)
    {
        __block NSArray *objects;

        [context performBlockAndWait:^
         {
             NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"RainbowPonies" inManagedObjectContext:context];

             NSFetchRequest *request = [[NSFetchRequest alloc] init];
             [request setEntity:entityDesc];

             NSError *error;
             objects = [context executeFetchRequest:request error:&error];

             if (error)
             {
                 NSLog(@"err: %@",error);
             }



         }];

        return objects;

    }

Sometimes other apps accessing the same iCloud storage (just on the same device! (example: lite/pro)), then I get randomly a freeze by calling the code. By terminating the other App, the current App starts working again.

Every data-interaction-code runs in performBlockAndWait, so it should not be the problem?

What should I do to fix this?

@lhunath
Copy link
Owner

lhunath commented Mar 13, 2014

Curious! I recommend you file an Apple bug report and/or use a developer
technical support ticket. This is not something USM has any interaction or
say in. Good luck! Let us know in this ticket what Apple says?

On Thursday, March 13, 2014, Jan Galler [email protected] wrote:

I'm using the following code sometimes to deal with data:

NSManagedObjectContext *context = [appDelegate managedObjectContext];

if (context != nil)
{
    __block NSArray *objects;

    [context performBlockAndWait:^
     {
         NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"RainbowPonies" inManagedObjectContext:context];

         NSFetchRequest *request = [[NSFetchRequest alloc] init];
         [request setEntity:entityDesc];

         NSError *error;
         objects = [context executeFetchRequest:request error:&error];

         if (error)
         {
             NSLog(@"err: %@",error);
         }



     }];

    return objects;

}

Sometimes other apps accessing the same iCloud storage, then I get
randomly a freeze by calling the code. By terminating the other App, the
current App starts working again.

Every data-interaction-code runs in performBlockAndWait, so it should not
be the problem?

What should I do to fix this?


Reply to this email directly or view it on GitHubhttps://github.com//issues/57
.

Maarten Billemont (lhunath)
me: http://www.lhunath.com – business: http://www.lyndir.com
http://masterpasswordapp.com

@qepic42
Copy link
Author

qepic42 commented Mar 13, 2014

Yep, it is! I've just made a video showing that issue:
http://youtu.be/VWaJ1w-RF_Q (it's a 'not listed' video, but it's okay to link it here).

After you've reviewed this video, I'm going to fill a bug-report…

@lhunath
Copy link
Owner

lhunath commented Mar 13, 2014

While the app is frozen, what are both apps doing in all threads? In
particular, the threads of the MOCs doing operations and USM's serial
queues in both apps.

On 13 March 2014 10:00, Jan Galler [email protected] wrote:

Yep, it is! I've just made a video showing that issue:
http://youtu.be/VWaJ1w-RF_Q (it's a 'not listed' video, but it's okay to
link it here).

After you've reviewed this video, I'm going to fill a bug-report…


Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-37535576
.

Maarten Billemont (lhunath)
me: http://www.lhunath.com – business: http://www.lyndir.com
http://masterpasswordapp.com

@qepic42
Copy link
Author

qepic42 commented Mar 13, 2014

I'm not sure, what you're asking…
Here're two screenshots from Xcode's stack-viewer.

(In this case, the non-lite App (as in the video too) is frozen):

screen shot 2014-03-13 at 19 00 05
screen shot 2014-03-13 at 18 59 52

UPDATE:
Ah, maybe that's interesting:

screen shot 2014-03-13 at 19 04 29

@lhunath
Copy link
Owner

lhunath commented Mar 13, 2014

In addition to the main thread, I'd also like to see what USM's thread is
doing, that's probably Thread 5 in your first screenshot, the Serial Queue.
It might also help to switch to queue display instead of thread display
(toggle the little icon of a thread of yarn at the top).

On 13 March 2014 14:02, Jan Galler [email protected] wrote:

I'm not sure, what you're asking…
Here're two screenshots from Xcode's stack-viewer.

(In this case, the non-lite App (as in the video too) is frozen):

[image: screen shot 2014-03-13 at 19 00 05]https://f.cloud.github.com/assets/524677/2413029/9c1da9f6-aad9-11e3-82ac-3092f520171b.png
[image: screen shot 2014-03-13 at 18 59 52]https://f.cloud.github.com/assets/524677/2413030/9c3f3486-aad9-11e3-805c-8e7c6b427175.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-37566335
.

Maarten Billemont (lhunath)
me: http://www.lhunath.com – business: http://www.lyndir.com
http://masterpasswordapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants