I am trying to work with Core Data and iCloud.
It worked once and it did not again.
I got this error below :
2015-05-19 12:11:13.695 Student Notebook App[34617:992535] -[Student_Notebook_App.NotebookTableView persistentStoreWillChange]: unrecognized selector sent to instance 0x7f86495514b0
2015-05-19 12:11:13.737 Student Notebook App[34617:992535] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Student_Notebook_App.NotebookTableView persistentStoreWillChange]: unrecognized selector sent to instance 0x7f86495514b0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110638c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010ff15bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001106400ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000011059613c ___forwarding___ + 988
4 CoreFoundation 0x0000000110595cd8 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x000000011060854c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x0000000110506a04 _CFXNotificationPost + 2484
7 Foundation 0x000000010fa6c968 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
8 CoreData 0x0000000110303d5b __81-[PFUbiquitySetupAssistant tryToReplaceLocalStore:withStoreSideLoadedByImporter:]_block_invoke + 283
9 libdispatch.dylib 0x00000001131f5614 _dispatch_client_callout + 8
10 libdispatch.dylib 0x00000001131e02fa _dispatch_barrier_sync_f_slow_invoke + 275
11 libdispatch.dylib 0x00000001131f5614 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00000001131dda1c _dispatch_main_queue_callback_4CF + 1664
13 CoreFoundation 0x00000001105a01f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
14 CoreFoundation 0x0000000110561dcb __CFRunLoopRun + 2043
15 CoreFoundation 0x0000000110561366 CFRunLoopRunSpecific + 470
16 GraphicsServices 0x0000000114e91a3e GSEventRunModal + 161
17 UIKit 0x0000000110c73900 UIApplicationMain + 1282
18 Student Notebook App 0x000000010f923aa7 main + 135
19 libdyld.dylib 0x0000000113229145 start + 1
20 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please, anyone can help me??
Thanks in Advance
The error is pretty clear:
-[Student_Notebook_App.NotebookTableView persistentStoreWillChange]: unrecognized selector sent to instance 0x7f86495514b0
This says that your code is trying to call a method named persistentStoreWillChange on a class that doesn't have that method.
The stack trace indicates that this happened when a notification was posted. It doesn't say which one. What happened is:
You registered to observe a notification with a method named persistentStoreWillChange.
Later that notification was posted. The notification system tried to call persistentStoreWillChange, but the method did not exist.
When you register for a notification, the callback method name that you provide must exist.
Related
I have try to video call using QuickBlox from web page to iOS app but when I am call from web immediately iOS app crash with as below log.
[3553:77957] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x10e546c78'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 libswiftFoundation.dylib 0x000000010f8849f5 $sSD10FoundationE26_forceBridgeFromObjectiveC_6resultySo12NSDictionaryC_SDyxq_GSgztFZ + 709
6 libswiftFoundation.dylib 0x000000010f8789e3 $sSD10FoundationE36_unconditionallyBridgeFromObjectiveCySDyxq_GSo12NSDictionaryCSgFZ + 67
7 ProjectDemo 0x000000010d71912a $s15ProjectDemo6HomeVCC20didReceiveNewSession_8userInfoySo12QBRTCSessionC_SDyS2SGSgtFTo + 138
8 CoreFoundation 0x00007fff23c7820c __invoking___ + 140
9 CoreFoundation 0x00007fff23c753af -[NSInvocation invoke] + 319
10 CoreFoundation 0x00007fff23c75684 -[NSInvocation invokeWithTarget:] + 68
11 Quickblox 0x000000010e4cb67e qb_jid + 89448
12 libdispatch.dylib 0x000000010fb97dd4 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x000000010fb98d48 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010fba6de6 _dispatch_main_queue_callback_4CF + 1500
15 CoreFoundation 0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
16 CoreFoundation 0x00007fff23bceca9 __CFRunLoopRun + 2329
17 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
18 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
19 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
20 ProjectDemo 0x000000010d75a98b main + 75
21 libdyld.dylib 0x00007fff5227ec25 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
2020-09-01 09:56:40:474 ProjectDemo[3553:1260b] SEND: <a xmlns="urn:xmpp:sm:3" h="2"/>
libc++abi.dylib: terminating with uncaught exception of type NSException
Most likely, the issue is related to outdated Javascript SDK.
Per our check, your Javascript SDK version is 2.8.1. Please update SDK to the latest version 2.12.9: https://github.com/QuickBlox/quickblox-javascript-sdk
Also, make sure that you are using the latest iOS SDK version 2.17.4: https://github.com/QuickBlox/quickblox-ios-sdk
Seeing a strange crash while listening
NotificationCenter.default.addObserver(self, selector: #selector(contextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: nil)
#objc private func contextDidSave(_ notification: Notification) {
print(notification)
}
However, keeping below line and calling something else inside it not causing any issues.
Below code will work fine as we are not printing or consuming objects
if let updatedObjects = notification.userInfo?[NSUpdatedObjectsKey] as? Set<User>, !updatedObjects.isEmpty {
myMethod()
}
Already debugged by using NSZombiesEnabled, InstrumentsWithCoreData, Exception Breakpoints,ThreadSanatizer, "Arguments Passed on Launch" in -com.apple.CoreData.ConcurrencyDebug 1
Unable to get why it's happening. However i thought it's of property so I printed all property 1 by 1 it worked fine for me.
As per as my knowledge it's happening because of combination of Swift and Obj-C
It's a huge project so I am not sure what can be done?
Is there a way that I can get more info about object via it's reference mat be object name or another information, Somehow?
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean objectID]: unrecognized selector sent to instance 0x7fff80634470'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3de6e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff512539b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e5eb94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23e4286c ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23e44b58 _CF_forwarding_prep_0 + 120
5 CoreData 0x00007fff23a816c9 -[NSManagedObject _descriptionValues] + 1566
6 CoreData 0x00007fff23a819f1 -[NSManagedObject description] + 261
7 CoreFoundation 0x00007fff23e60600 -[NSSet descriptionWithLocale:indent:] + 416
8 CoreFoundation 0x00007fff23e37858 -[NSDictionary descriptionWithLocale:indent:] + 1416
9 Foundation 0x00007fff259698c9 _NSDescriptionWithLocaleFunc + 55
10 CoreFoundation 0x00007fff23dc7281 __CFStringAppendFormatCore + 12737
11 CoreFoundation 0x00007fff23dc8ea5 _CFStringCreateWithFormatAndArgumentsAux2 + 133
12 CoreData 0x00007fff23a324a4 _NSCoreDataLog + 248
13 CoreData 0x00007fff239f7e80 -[NSManagedObjectContext(_NSInternalAdditions) _didSaveChanges] + 2893
14 CoreData 0x00007fff239ee7d6 -[NSManagedObjectContext save:] + 4166
15 *********** 0x00000001076e8db3 __31-[MyStorageManager saveContext]_block_invoke + 83
16 CoreData 0x00007fff23a0338d developerSubmittedBlockToNSManagedObjectContextPerform + 154
17 libdispatch.dylib 0x000000010f252e8e _dispatch_client_callout + 8
18 libdispatch.dylib 0x000000010f260d97 _dispatch_main_queue_callback_4CF + 1149
19 CoreFoundation 0x00007fff23da1869 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
20 CoreFoundation 0x00007fff23d9c3b9 __CFRunLoopRun + 2041
21 CoreFoundation 0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404
22 GraphicsServices 0x00007fff38c39bbe GSEventRunModal + 139
23 UIKitCore 0x00007fff49325968 UIApplicationMain + 1605
24 *********** 0x00000001074dc882 main + 146
25 libdyld.dylib 0x00007fff520ce1fd start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I want to make a new object from string access_token.
I've made a Token:NSObject (.h + .m) and I'm trying to setAccessToken and show it in the NSLog. This is the code in my LoginViewController.m:
NSString *token = responseObject[#"access_token"];
Token *t = [[Token alloc]init];
[t setAccessToken:token];
NSLog(t);
And this is the error i get:
Create[29485:770358] -[Token _fastCStringContents:]: unrecognized
selector sent to instance 0x7f8e815d0780
Create[29485:770358] * Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[Token _fastCStringContents:]:
unrecognized selector sent to instance 0x7f8e815d0780'
* First throw call stack: ( 0 CoreFoundation 0x000000010149ff45 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000100f19deb objc_exception_throw + 48 2 CoreFoundation
0x00000001014a856d -[NSObject(NSObject) doesNotRecognizeSelector:] +
205 3 CoreFoundation 0x00000001013f5eea
___forwarding_ + 970 4 CoreFoundation 0x00000001013f5a98 _CF_forwarding_prep_0 + 120 5
libsystem_trace.dylib 0x00000001036e8327
os_log_shim_with_CFString + 120 6 CoreFoundation
0x000000010148ef24 _CFLogvEx3 + 132 7 Foundation
0x0000000100b9489e _NSLogv + 117 8 Foundation
0x0000000100ae40f2 NSLog + 152 9 Create
0x00000001004d665b 21-[LoginVC UserLogin:]_block_invoke + 203 10
Create 0x00000001004d7f18
__64-[AFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke49 + 40 11
libdispatch.dylib 0x00000001033fde5d
_dispatch_call_block_and_release + 12 12 libdispatch.dylib 0x000000010341e49b _dispatch_client_callout + 8 13 libdispatch.dylib
0x00000001034062af _dispatch_main_queue_callback_4CF + 1738 14
CoreFoundation 0x00000001014002e9
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 15 CoreFoundation 0x00000001013c18a9 __CFRunLoopRun
+ 2073 16 CoreFoundation 0x00000001013c0e08 CFRunLoopRunSpecific + 488 17 GraphicsServices
0x00000001056dcad2 GSEventRunModal + 161 18 UIKit
0x000000010184c30d UIApplicationMain + 171 19 Create
0x00000001004d6a2f main + 111 20 libdyld.dylib
0x000000010345292d start + 1 21 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException
Hope somebody can help me out!
NSLog(...) function assumes the first argument is an instance of NSString. If you want to use a different object, either use:
NSLog([t description]) or a format string NSLog(#"%#", t).
2015-04-14 23:35:17.143 Yellow Ninja 2.0[12492:594324]
-[Yellow_Ninja_2_0.ACWallGenerator generatewall]: unrecognized selector sent to instance 0x7faf38fb7ce0 2015-04-14 23:35:17.146
Yellow Ninja 2.0[12492:594324] * Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason:
'-[Yellow_Ninja_2_0.ACWallGenerator generatewall]: unrecognized
selector sent to instance 0x7faf38fb7ce0'
* First throw call stack: ( 0 CoreFoundation 0x000000010fc77f35 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000111bb4bb7 objc_exception_throw + 45 2 CoreFoundation
0x000000010fc7f04d -[NSObject(NSObject) doesNotRecognizeSelector:] +
205 3 CoreFoundation 0x000000010fbd727c
___forwarding_ + 988 4 CoreFoundation 0x000000010fbd6e18 _CF_forwarding_prep_0 + 120 5 Foundation
0x00000001102ef2b4 NSFireTimer + 83 6 CoreFoundation
0x000000010fbdff64
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20 7 CoreFoundation 0x000000010fbdfb25
__CFRunLoopDoTimer + 1045 8 CoreFoundation 0x000000010fba2e5d __CFRunLoopRun + 1901 9 CoreFoundation
0x000000010fba2486 CFRunLoopRunSpecific + 470 10 GraphicsServices
0x00000001170249f0 GSEventRunModal + 161 11 UIKit
0x00000001108fc420 UIApplicationMain + 1282 12 Yellow Ninja 2.0
0x000000010fa7a5be top_level_code + 78 13 Yellow Ninja 2.0
0x000000010fa7a5fa main + 42 14 libdyld.dylib
0x00000001123a0145 start + 1 15 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException (lldb)
This is the error message that came up whenever I try to run my app. Any suggestions please? It says "InvalidArgumentException"??? Thanks!
You have set up a timer to call generatewall when it fires. But either you have no generatewall method — for example, if it takes a parameter, then it is called generatewall:, with a colon — or you have neglected to expose that method to Objective-C.
I am really confused as to why this is happening.
Since this happened randomly
Here is the stacktrace, I have not been able to figure it out.
Please help
Thanks
2015-03-30 15:12:50.817 MarcoApp[1857:23629] -[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0
2015-03-30 15:12:50.908 MarcoApp[1857:23629] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010aa74a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a333bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010aa7bd1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a9d39dc ___forwarding___ + 988
4 CoreFoundation 0x000000010a9d3578 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x000000010aa447fc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x000000010a944204 _CFXNotificationPost + 2484
7 Foundation 0x0000000109e8ddf8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
8 UIKit 0x000000010b73baa7 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1054
9 UIKit 0x000000010b748833 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 87
10 UIKit 0x000000010b7487cd -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 349
11 UIKit 0x000000010b73345a -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 486
12 FrontBoardServices 0x00000001115ae243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
13 CoreFoundation 0x000000010a9a9c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
14 CoreFoundation 0x000000010a99f9c5 __CFRunLoopDoBlocks + 341
15 CoreFoundation 0x000000010a99f785 __CFRunLoopRun + 2389
16 CoreFoundation 0x000000010a99ebc6 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010e89ca58 GSEventRunModal + 161
18 UIKit 0x000000010b735580 UIApplicationMain + 1282
19 MarcoApp 0x0000000109184afe top_level_code + 78
20 MarcoApp 0x0000000109184bda main + 42
21 libdyld.dylib 0x000000010ee2b145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
hard to tell without seeing your code but "unrecognized selector sent to instance" implies you have a method the requires a selector (name of a function) as a parameter and that methods got an invalid selector (the name of the function is wrong).
not sure but ther is any method in
- (void)applicationWillResignActive:(UIApplication *)application
which does not have selector thats why you app crash