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

Causing crash when i run my project in Xcode 13 #1390

Open
Kiran-3172 opened this issue May 5, 2022 · 1 comment
Open

Causing crash when i run my project in Xcode 13 #1390

Kiran-3172 opened this issue May 5, 2022 · 1 comment

Comments

@Kiran-3172
Copy link

Kiran-3172 commented May 5, 2022

It was all working fine till Xcode 12.5. But when i run my project on Xcode 13 ending up with the crash. Below is the crash log. Please help me out. Thanks in advance.

2022-05-05 11:34:03.230149+0530 XXXXX[26651:2999865] -[NSKnownKeysDictionary1 objectID]: unrecognized selector sent to instance 0x600002cdbd00
2022-05-05 11:34:03.247575+0530 XXXXX[26651:2999865] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSKnownKeysDictionary1 objectID]: unrecognized selector sent to instance 0x600002cdbd00'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff203fbbb4 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2019ebe7 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2040a821 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x00007fff204000bc forwarding + 1433
4 CoreFoundation 0x00007fff204021e8 _CF_forwarding_prep_0 + 120
5 CoreData 0x00007fff25b5f5d4 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 2820
6 CoreData 0x00007fff25b61a0d internalBlockToNSManagedObjectContextPerform + 89
7 libdispatch.dylib 0x00000001089cdc0c _dispatch_client_callout + 8
8 libdispatch.dylib 0x00000001089dd1f7 _dispatch_lane_barrier_sync_invoke_and_complete + 132
9 CoreData 0x00007fff25b48f4b _perform + 196
10 CoreData 0x00007fff25b5e999 -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 175
11 CoreData 0x00007fff25b4bf04 -[NSManagedObjectContext executeFetchRequest:error:] + 898
12 XXXXX 0x0000000108053f33 __67+[NSManagedObject(MagicalRecord) MR_executeFetchRequest:inContext:]_block_invoke + 67
13 CoreData 0x00007fff25b52426 developerSubmittedBlockToNSManagedObjectContextPerform + 151
14 CoreData 0x00007fff25b52310 -[NSManagedObjectContext performBlockAndWait:] + 197
15 XXXXX 0x0000000108053d9f +[NSManagedObject(MagicalRecord) MR_executeFetchRequest:inContext:] + 319
16 XXXXX 0x000000010805402f +[NSManagedObject(MagicalRecord) MR_executeFetchRequest:] + 127
17 XXXXX 0x0000000107ddb73c -[function] + 2380
18 XXXXX 0x0000000107dd9943 -[function] + 355
19 XXXXX 0x0000000107dd9114 __49-[function]_block_invoke + 324
20 XXXXX 0x0000000107cba301 __111-[NetworkAPIManager(function)response:]_block_invoke.76 + 1249
21 XXXXX 0x000000010805ab9d __70-[NSManagedObjectContext(MagicalSaves) MR_saveWithOptions:completion:]_block_invoke_2 + 45
22 libdispatch.dylib 0x00000001089cca28 _dispatch_call_block_and_release + 12
23 libdispatch.dylib 0x00000001089cdc0c _dispatch_client_callout + 8
24 libdispatch.dylib 0x00000001089dc376 _dispatch_main_queue_callback_4CF + 1195
25 CoreFoundation 0x00007fff2036985d CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
26 CoreFoundation 0x00007fff203640ba __CFRunLoopRun + 2772
27 CoreFoundation 0x00007fff20363103 CFRunLoopRunSpecific + 567
28 GraphicsServices 0x00007fff2c851cd3 GSEventRunModal + 139
29 UIKitCore 0x00007fff24ffbe63 -[UIApplication _run] + 928
30 UIKitCore 0x00007fff25000a53 UIApplicationMain + 101
31 XXXXX 0x0000000107e6a098 main + 104
32 dyld 0x000000010884ae1e start_sim + 10
33 ??? 0x0000000000000001 0x0 + 1
)
libc++abi: terminating with uncaught exception of type NSException

Crash is happening in below code part

  • (NSArray *) MR_executeFetchRequest:(NSFetchRequest *)request inContext:(NSManagedObjectContext *)context
    {
    __block NSArray *results = nil;
    [context performBlockAndWait:^{

      NSError *error = nil;
      
      results = [context executeFetchRequest:request error:&error];
      
      if (results == nil) 
      {
          [MagicalRecord handleErrors:error];
      }
    

    }];
    return results;
    }

@Kiran-3172 Kiran-3172 reopened this May 6, 2022
@supervtb
Copy link

supervtb commented Sep 6, 2022

Hello, I have the same issue. @Kiran-3172 Did you find a way how to solve it?

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