Crash on Xcode Run - xcode

i run project that imported from Unity3D.
then at XCode i try to run to my iPad.
Apps can builded and installed but when running it crash (sometime just blank screen).
at Xcode i got below error, but i dont understand what these error means ?
CrashReporter: initialized
2018-10-23 11:11:36.341 flashcards[318:26427] -> registered mono modules 0x1ee2e00
-> applicationDidFinishLaunching()
2018-10-23 11:11:37.789 flashcards[318:26427] Metal GPU Frame Capture Enabled
2018-10-23 11:11:37.790 flashcards[318:26427] Metal API Validation Disabled
-> applicationDidBecomeActive()
Renderer: PowerVR SGX 543
Vendor: Imagination Technologies
Version: OpenGL ES 2.0 IMGSGX543-124.1
GLES: 2
GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_comp
ression_pvrtc
OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 359353072
Initialize engine version: 2017.4.8f1 (5ab7f4878ef1)
WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'
Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
ERROR: 0:14: Use of undeclared identifier 'gl_FragDepthEXT'
Note: Creation of internal variant of shader 'Hidden/BlitCopyWithDepth' failed.
WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Pass '' has no vertex shader
WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Setting to default shader.
The referenced script on this Behaviour (Game Object 'Scene Variables') is missing!
(Filename: Line: 1758)
The referenced script on this Behaviour (Game Object 'Scene Variables') is missing!
(Filename: Line: 1758)
The referenced script on this Behaviour (Game Object 'IAPManager') is missing!
(Filename: Line: 1758)
The referenced script on this Behaviour (Game Object 'IAPManager') is missing!
(Filename: Line: 1758)
The referenced script on this Behaviour (Game Object 'IAPManager') is missing!
(Filename: Line: 1758)
UnloadTime: 9.446791 ms
2018-10-23 11:11:45.250 flashcards[318:26427] *** Assertion failure in -[UnityDefaultViewController supportedInterfaceOrientations], /Users/mac/Downloads/snowy_eng_ios_noads/Classes/UI/UnityViewControllerBase+iOS.mm:93
2018-10-23 11:11:48.218 flashcards[318:26427] Uncaught exception: NSInternalInconsistencyException: UnityDefaultViewController should be used only if unity is set to autorotate
(
0 CoreFoundation 0x20a37933 <redacted> + 150
1 libobjc.A.dylib 0x201d2e17 objc_exception_throw + 38
2 CoreFoundation 0x20a377f1 <redacted> + 0
3 Foundation 0x2121b529 <redacted> + 92
4 flashcards 0x0008849f -[UnityDefaultViewController supportedInterfaceOrientations] + 302
5 flashcards 0x000a2ce3 -[UnityAppController application:supportedInterfaceOrientationsForWindow:] + 174
6 flashcards 0x0128d0f8 GADiTunesMetadataForFileAtPath + 12068
7 flashcards 0x01348570 GADODiskUsageStatisticsWithError + 3488
8 flashcards 0x0134848c GADODiskUsageStatisticsWithError + 3260
9 flashcards 0x01252f84 GADOCategories_NSArray_GADOJSONAdditions + 15060
10 flashcards 0x013112cc GADODispatchAsyncSafeMainQueue + 64
11 flashcards 0x01252e40 GADOCategories_NSArray_GADOJSONAdditions + 14736
12 flashcards 0x01143531 -[GADURewardBasedVideoAd loadRequest:withAdUnitID:] + 78
13 flashcards 0x011403ff GADURequestRewardBasedVideoAd + 76
14 flashcards 0x00278c4d RewardBasedVideoAdClient_LoadAd_m483440913 + 34
15 flashcards 0x0026c8ab RewardBasedVideoAd_LoadAd_m4208741079 + 90
16 flashcards 0x0023bdaf z_reward_ads_Start_m1587933392 + 102
17 flashcards 0x010f0ce5 _Z31RuntimeInvoker_Void_t1185182177PFvvEPK10MethodInfoPvPS4_ + 10
18 flashcards 0x01d66793 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 118
19 flashcards 0x016d91b3 _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 66
20 flashcards 0x016dffdd _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 38
21 flashcards 0x016e4a73 _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtrP21ScriptingExceptionPtr + 1198
22 flashcards 0x016e4bd1 _ZN13MonoBehaviour30InvokeMethodOrCoroutineCheckedE18ScriptingMethodPtr18ScriptingObjectPtr + 46
23 flashcards 0x016e3f3d _ZN13MonoBehaviour16DelayedStartCallEP6ObjectPv + 46
24 flashcards 0x01578339 _ZN18DelayedCallManager6UpdateEi + 430
25 flashcards 0x0162b699 _Z10PlayerLoopv + 520
26 flashcards 0x0147fb0d _ZL19UnityPlayerLoopImplb + 22
27 flashcards 0x000915c5 UnityRepaint + 220
28 flashcards 0x0009147d -[UnityAppController(Rendering) repaintDisplayLink] + 76
29 libMTLInterpose.dylib 0x05cec865 -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 276
30 QuartzCore 0x23093a0b <redacted> + 106
31 QuartzCore 0x23093857 <redacted> + 594
32 IOMobileFramebuffer 0x2277a50b <redacted> + 86
33 IOKit 0x20c88759 IODispatchCalloutFromCFMessage + 256
34 CoreFoundation 0x209e637d <redacted> + 132
35 CoreFoundation 0x209fa5b3 <redacted> + 34
36 CoreFoundation 0x209f9cc7 <redacted> + 342
37 CoreFoundation 0x209f80d9 <redacted> + 1688
38 CoreFoundation 0x20947229 CFRunLoopRunSpecific + 520
39 CoreFoundation 0x20947015 CFRunLoopRunInMode + 108
40 GraphicsServices 0x21f37ac9 GSEventRunModal + 160
41 UIKit 0x2501b189 UIApplicationMain + 144
42 flashcards 0x00087f9f main + 206
43 libdyld.dylib 0x205ef873 <redacted> + 2
and i got exception at here :
gsCrashReporterUEHandler NSUncaughtExceptionHandler * (flashcards`uncaught_exception_handler) 0x01bf1a38
any idea, what error i found here ?

In your crash log I can see this error:
Uncaught exception: NSInternalInconsistencyException: UnityDefaultViewController should be used only if unity is set to autorotate.
This means Unity should set Screen.orientation to ScreenOrientation.AutoRotation.
You can check if some code in your Unity3D project set the Screen.orientation to any other code and check in "Unity Build setting" Default Orientation is "Auto Rotation".

We got this crash report also, and many of them
I've read somewhere (maybe in Unity forum) that it's being caused by Ads that showing in different orientation, when the game is back from Ads, the orientation did not restore correctly so Unity log the ASSERT.
They suggested that we just need open the exported XCode project and comment out the ASSERT line 111 in the file UnityViewControllerBase+iOS.mm
Well, we did and it's working for us!!!
//
// Just in case the attached screenshot expires
//
- (NSUInteger)supportedInterfaceOrientations
{
//NSAssert(UnityShouldAutorotate(), #"UnityDefaultViewController should be used only if unity is set to autorotate");
return EnabledAutorotationInterfaceOrientations();
}

Related

In core data NSFetchRequest, getting NSInvalidArgumentException, unrecognized selector sent to instance

The code is as follows (I isolated it through print statements, the error happens in these lines):
let request = NSFetchRequest<Group>(entityName: "Group")
request.sortDescriptors = [NSSortDescriptor(key: "id", ascending: false)]
let groups = try! context.fetch(request)
Notes (edited):
SQLite backing store
XCode 12.3
I have checked the basics, there exists a Group entity with an id field.
Even if there is a simple solution, would be also very grateful for a bug-fixing strategy here. Is there some way I can read through documentation to figure this out myself?
Full Stack Trace:
2020-12-31 08:01:35.180433-0700 Things[25892:958568] -[__NSConcreteUUID compare:]: unrecognized selector sent to instance 0x60000367a9e0
2020-12-31 08:01:35.190552-0700 Things[25892:958568] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteUUID compare:]: unrecognized selector sent to instance 0x60000367a9e0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff20420af6 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177e78 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2042f6f7 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x00007fff20425036 ___forwarding___ + 1489
4 CoreFoundation 0x00007fff20427068 _CF_forwarding_prep_0 + 120
5 Foundation 0x00007fff2084132b _NSCompareObject + 46
6 CoreFoundation 0x00007fff203aa09d __CFSimpleMergeSort + 74
7 CoreFoundation 0x00007fff203aa133 __CFSimpleMergeSort + 224
8 CoreFoundation 0x00007fff203a9c4a CFSortIndexes + 395
9 CoreFoundation 0x00007fff203aa5f6 CFMergeSortArray + 288
10 Foundation 0x00007fff208419d1 _sortedObjectsUsingDescriptors + 558
11 Foundation 0x00007fff20841bbe -[NSArray(NSKeyValueSorting) sortedArrayUsingDescriptors:] + 232
12 CoreData 0x00007fff25113c7e -[NSManagedObjectContext executeFetchRequest:error:] + 4353
13 libswiftCoreData.dylib 0x00007fff54a88993 $sSo22NSManagedObjectContextC8CoreDataE5fetchySayxGSo14NSFetchRequestCyxGKSo0gH6ResultRzlF + 51
14 Things 0x00000001048b7bdf $s6Things5GroupC6getAll7contextSayACGSo22NSManagedObjectContextC_tFZ + 591
15 Things 0x0000000104872da7 $s6Things16thingDataToThing2td7contextAA0E0CAA0eC0V_So22NSManagedObjectContextCtF + 1399
16 Things 0x00000001048836e5 $s6Things9APIServerC14syncWithRemote7context8callbackySo22NSManagedObjectContextC_yyctF14completionBothL_10groupDatas05thingN0ySayAA9GroupDataVG_SayAA05ThingQ0VGtF0O6MapperL_2tdAA0R0CAP_tF + 37
17 Things 0x0000000104883908 $s6Things9ThingDataVAA0B0Cs5Error_pIggozo_AcEsAF_pIegnrzo_TR + 56
18 Things 0x000000010488b034 $s6Things9ThingDataVAA0B0Cs5Error_pIggozo_AcEsAF_pIegnrzo_TRTA + 20
19 libswiftCore.dylib 0x00007fff2f8edfe2 $sSlsE3mapySayqd__Gqd__7ElementQzKXEKlF + 674
20 Things 0x000000010488313f $s6Things9APIServerC14syncWithRemote7context8callbackySo22NSManagedObjectContextC_yyctF14completionBothL_10groupDatas05thingN0ySayAA9GroupDataVG_SayAA05ThingQ0VGtF + 3855
21 Things 0x0000000104883b0c $s6Things9APIServerC14syncWithRemote7context8callbackySo22NSManagedObjectContextC_yyctF16completionGroupsL_10groupDatasySayAA9GroupDataVG_tF0kA0L_05thingN0ySayAA05ThingP0VG_tF + 108
22 Things 0x000000010488207f $sSay6Things9ThingDataVGIegg_ADIegn_TR + 15
23 Things 0x000000010487ecfc $s6Things9APIServerC7request3url15queryParameters6parser0C6Method10completion12errorHandler12httpBodyJsonySS_SDyS2SGx10Foundation4DataVcAA11RequestTypeOyxcySScAOSgtlFyAR_So13NSURLResponseCSgs5Error_pSgtcfU_yycfU_ + 348
24 Things 0x000000010488b463 $s6Things9APIServerC7request3url15queryParameters6parser0C6Method10completion12errorHandler12httpBodyJsonySS_SDyS2SGx10Foundation4DataVcAA11RequestTypeOyxcySScAOSgtlFyAR_So13NSURLResponseCSgs5Error_pSgtcfU_yycfU_TA + 51
25 Things 0x000000010487ed70 $sIeg_IeyB_TR + 48
26 libdispatch.dylib 0x0000000104c2d7ec _dispatch_call_block_and_release + 12
27 libdispatch.dylib 0x0000000104c2e9c8 _dispatch_client_callout + 8
28 libdispatch.dylib 0x0000000104c3ce75 _dispatch_main_queue_callback_4CF + 1152
29 CoreFoundation 0x00007fff2038edbb __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
30 CoreFoundation 0x00007fff2038963e __CFRunLoopRun + 2685
31 CoreFoundation 0x00007fff203886d6 CFRunLoopRunSpecific + 567
32 GraphicsServices 0x00007fff2bededb3 GSEventRunModal + 139
33 UIKitCore 0x00007fff24690e0b -[UIApplication _run] + 912
34 UIKitCore 0x00007fff24695cbc UIApplicationMain + 101
35 libswiftUIKit.dylib 0x00007fff54d1e5f2 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
36 Things 0x000000010489497a $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 122
37 Things 0x00000001048948ee $s6Things11AppDelegateC5$mainyyFZ + 46
38 Things 0x00000001048949c9 main + 41
39 libdyld.dylib 0x00007fff202593e9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteUUID compare:]: unrecognized selector sent to instance 0x60000367a9e0'
terminating with uncaught exception of type NSException
CoreSimulator 732.18.6 - Device: iPhone 11 (93AB6812-3722-4022-B989-2E1423E6E6D0) - Runtime: iOS 14.3 (18C61) - DeviceType: iPhone 11
Sorting on UUID fields is normally not supported by Core Data. To get it working, change the key path to a string type, like this:
[NSSortDescriptor(key: "id.description", ascending: false)]
Key path id.uuidString would theoretically be better, but this still gives the same crash as described in the original question (at least in macOS 11).

Core Data: bundle.main.url returning NIL unexpectedly (and suddenly)

The default core data code is throwing an error for some reason. This just started happening after I attempted to migrate to a new version of the data model, so I'm sure I did something to screw this up. Here's the relevant code:
enter colazy var managedObjectModel: NSManagedObjectModel = {
// The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model.
let modelURL = Bundle.main.url(forResource: "Band_Manager_2_0", withExtension: "momd")!
return NSManagedObjectModel(contentsOf: modelURL)!
}()
The line throwing the error is this one:
enter let modelURL = Bundle.main.url(forResource: "Band_Manager_2_0", withExtension: "momd")!code here
And here is the error:
fatal error: unexpectedly found nil while unwrapping an Optional value
2017-04-21 14:17:01.620046-0400 Band Manager 2.0[5826:164435] fatal error: unexpectedly found nil while unwrapping an Optional value
Current stack trace:
0 libswiftCore.dylib 0x0000000100425160 swift_reportError + 129
1 libswiftCore.dylib 0x0000000100441b80 _swift_stdlib_reportFatalError + 60
2 libswiftCore.dylib 0x0000000100231a00 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
3 libswiftCore.dylib 0x00000001003acec0 partial apply for (_fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never).(closure #2) + 109
4 libswiftCore.dylib 0x0000000100231a00 specialized specialized StaticString.withUTF8Buffer<A> ((UnsafeBufferPointer<UInt8>) -> A) -> A + 342
5 libswiftCore.dylib 0x000000010035f4a0 specialized _fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never + 96
6 Band Manager 2.0 0x000000010005f500 AppDelegate.(managedObjectModel.getter).(closure #1) + 463
7 Band Manager 2.0 0x000000010005d8d0 AppDelegate.managedObjectModel.getter + 194
8 Band Manager 2.0 0x000000010005f880 AppDelegate.(persistentStoreCoordinator.getter).(closure #1) + 1115
9 Band Manager 2.0 0x000000010005dad0 AppDelegate.persistentStoreCoordinator.getter + 211
10 Band Manager 2.0 0x0000000100061020 AppDelegate.(managedObjectContext.getter).(closure #1) + 35
11 Band Manager 2.0 0x000000010005dce0 AppDelegate.managedObjectContext.getter + 211
12 Band Manager 2.0 0x000000010005a0d0 AppDelegate.applicationDidFinishLaunching(Notification) -> () + 51
13 Band Manager 2.0 0x000000010005d530 #objc AppDelegate.applicationDidFinishLaunching(Notification) -> () + 71
14 CoreFoundation 0x00007fff85d1c520 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
15 CoreFoundation 0x00007fff85d1c280 _CFXRegistrationPost + 427
16 CoreFoundation 0x00007fff85d1c160 ___CFXNotificationPost_block_invoke + 50
17 CoreFoundation 0x00007fff85cd9f90 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018
18 CoreFoundation 0x00007fff85cd94c0 _CFXNotificationPost + 667
19 Foundation 0x00007fff8771a955 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
20 AppKit 0x00007fff839439f6 -[NSApplication _postDidFinishNotification] + 297
21 AppKit 0x00007fff839437b4 -[NSApplication _sendFinishLaunchingNotification] + 208
22 AppKit 0x00007fff838069c1 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 552
23 AppKit 0x00007fff838065a6 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 661
24 Foundation 0x00007fff87765cfb -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
25 Foundation 0x00007fff87765c31 _NSAppleEventManagerGenericHandler + 102
26 AE 0x00007fff86b6ad06 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 544
27 AE 0x00007fff86b6ac76 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 39
28 AE 0x00007fff86b6aa71 aeProcessAppleEvent + 312
29 HIToolbox 0x00007fff85277da8 AEProcessAppleEvent + 55
30 AppKit 0x00007fff838019c4 _DPSNextEvent + 1833
31 AppKit 0x00007fff83f7cd72 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
32 AppKit 0x00007fff837f640d -[NSApplication run] + 926
33 AppKit 0x00007fff837c0d09 NSApplicationMain + 1237
34 Band Manager 2.0 0x00000001000613d0 main + 13
35 libdyld.dylib 0x00007fff9b8ad234 start + 1
(lldb)
I'm hoping someone will have some insight as to how to fix this. I'm relatively new to core data and it's brought my coding to a complete standstill as, of course, the app crashes immediately after launch.
Thanks!
UPDATE: I should clarify, that I understand the technical reason why this is happening (not finding a resource needed) but I have no idea how to fix this. The resource which it can't seem to find is something that was automatically generated at some point in the past. I can't seem to figure out how to get XCODE to regenerate the needed file, or even why it went missing in the first place.
Ok. So I figured this one out...
About a week ago, I renamed the core data file to from "Band Manager_2_0" to "bmData", and for the past week everything has been working fine. However, today, while I was migrating data, it finally "broke" the connection.
I have no idea why the connection didn't break immediately upon renaming the file, which would have clued me into the problem. It must have cashed the location in a way that I disrupted today.
What is particularly confusing is that the code is looked for an extension of "momd", however the actual file has an extension of .xcdatamodeld... obviously something behind the scenes in XCODE 8.
Regardless, this problem has been solved.

unrecognized selector sent to instance Error with Facebook SDK for Xcode 7

I am using the recent facebook sdk and parse sdk for ios. When i try to run my app on the simulator i get the following error:
ParseStarterProject-Swift[2841:107652] -[PFUserAuthenticationController authenticationDelegateForAuthType:]: unrecognized selector sent to instance 0x7fd0bbc34620
2015-09-30 00:56:33.960 ParseStarterProject-Swift[2841:107652] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PFUserAuthenticationController authenticationDelegateForAuthType:]: unrecognized selector sent to instance 0x7fd0bbc34620'
This error is when i call the facebook application in my appdelegate file.
PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)
The following is my stack trace.
First throw call stack:
(
0 CoreFoundation 0x00000001102cef65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000011280fdeb objc_exception_throw + 48
2 CoreFoundation 0x00000001102d758d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000110224f7a ___forwarding___ + 970
4 CoreFoundation 0x0000000110224b28 _CF_forwarding_prep_0 + 120
5 ParseStarterProject-Swift 0x000000010f06fdf5 +[PFFacebookUtils _authenticationProvider] + 139
6 ParseStarterProject-Swift 0x000000010f06fe4c +[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:] + 48
7 ParseStarterProject-Swift 0x000000010ef42f50 _TFC25ParseStarterProject_Swift11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb + 2160
8 ParseStarterProject-Swift 0x000000010ef43903 _TToFC25ParseStarterProject_Swift11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb + 179
9 UIKit 0x000000011138f4ca -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
10 UIKit 0x0000000111390670 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
11 UIKit 0x0000000111396e15 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
12 UIKit 0x0000000111393ff0 -[UIApplication workspaceDidEndTransaction:] + 188
13 FrontBoardServices 0x0000000113ef37ac -[FBSSerialQueue _performNext] + 192
14 FrontBoardServices 0x0000000113ef3b1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45
15 CoreFoundation 0x00000001101fb0a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x00000001101f0fcc __CFRunLoopDoSources0 + 556
17 CoreFoundation 0x00000001101f0483 __CFRunLoopRun + 867
18 CoreFoundation 0x00000001101efe98 CFRunLoopRunSpecific + 488
19 UIKit 0x000000011139398d -[UIApplication _run] + 402
20 UIKit 0x0000000111398676 UIApplicationMain + 171
21 ParseStarterProject-Swift 0x000000010ef449dd main + 109
22 libdyld.dylib 0x00000001133e492d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I managed to fix this error doing the following:
First I deployed the official version of Parse Server (instead of Rob's version). Open this link and click 'Deploy to Heroku', follow the steps. https://github.com/ParsePlatform/parse-server-example
After that I downloaded the Parse Frameworks (including Facebook framework) from the link below and replaced all current frameworks in my project with these frameworks downloaded. https://parse.com/downloads/ios/parse-library/latest
Other than that just follow the class steps (adding code to AppDelegate, Info.pslist e etc.
Any problems, let me know.

Issues after updated to Xcode 5

I had my iOS App up to 98% completed on Xcode 4.6 and iOS 6.1 and it's working OK.
But then problems begin when I try to update my Xcode to version 5 and the SDK to iOS 7.
When I try to run the app on Xcode 5 but with iOS 6.1 it continues working ok, but when I tried to run on SDK 7 I have these issues:
2013-12-17 19:44:47.656 myAPP[2207:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MKUserLocation 0x9d9af90> valueForUndefinedKey:]: this class is not key value coding-compliant for the key distanceAnnotation.'
*** First throw call stack:
(
0 CoreFoundation 0x01bf65e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x019798b6 objc_exception_throw + 44
2 CoreFoundation 0x01c866a1 -[NSException raise] + 17
3 Foundation 0x0142d8ca -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4 Foundation 0x0139a921 _NSGetUsingKeyValueGetter + 81
5 Foundation 0x01399f5b -[NSObject(NSKeyValueCoding) valueForKey:] + 260
6 Foundation 0x013b9a5a -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 409
7 Foundation 0x013c68c6 _sortedObjectsUsingDescriptors + 380
8 Foundation 0x013c66d7 -[NSMutableArray(NSKeyValueSorting) sortUsingDescriptors:] + 578
9 myapp
0x00009e50 -[mapa mapViewDidFinishLoadingMap:] + 496
10 MapKit 0x0037e974 -[MKMapView mapViewDidFinishLoadingTiles:] + 78
11 VectorKit 0x050a3ade -[VKMapView mapDidFinishLoadingTiles:] + 78
12 VectorKit 0x050abe4e -[VKMapCanvas mapModelDidFinishLoadingTiles:] + 46
13 VectorKit 0x050b82cd -[VKMapModel didStopLoadingTilesWithError:] + 77
14 VectorKit 0x051ae2e1 -[VKTileProvider didStopLoadingTilesWithError:] + 49
15 VectorKit 0x051b1c99 -[VKTileSource didFinishWithNetwork] + 73
16 VectorKit 0x051c3aa3 __41-[VKResourcesTileSource performDownload:]_block_invoke73 + 51
17 GeoServices 0x04bb98a6 ___ZNK49-[GEOTileLoaderInternal _loadedTile:forKey:info:]66__49-[GEOTileLoaderInternal _loadedTile:forKey:info:]_block_invoke3$_1clERKN8LoadItem9RequesterE_block_invoke_2 + 85
18 libdispatch.dylib 0x021f77f8 _dispatch_call_block_and_release + 15
19 libdispatch.dylib 0x0220c4b0 _dispatch_client_callout + 14
20 libdispatch.dylib 0x021fa75e _dispatch_main_queue_callback_4CF + 340
21 CoreFoundation 0x01c5ba5e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
22 CoreFoundation 0x01b9c6bb __CFRunLoopRun + 1963
23 CoreFoundation 0x01b9bac3 CFRunLoopRunSpecific + 467
24 CoreFoundation 0x01b9b8db CFRunLoopRunInMode + 123
25 GraphicsServices 0x033579e2 GSEventRunModal + 192
26 GraphicsServices 0x03357809 GSEventRun + 104
27 UIKit 0x004dad3b UIApplicationMain + 1225
28 FarmValencia 0x000029ad main + 141
29 libdyld.dylib 0x0249e70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Theres simply not enough information to correctly debug this item.
I can recommend however that you add a Breakpoint for all Exceptions
Here is an example of adding an All Exception breakpoint in XCode 4. The process is the same in XCode 5
http://www.alauda.ro/2013/02/03/xcode-4-exception-breakpoints/
Aside from that you may try working with NSSetUncaughtExceptionHandler
http://www.cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html
This will allow you to trap the error and output the results but bear in mind that this is something you should only do during debug.
Wrapping it in an "#if DEBUG" is a good idea.
I hope this helps you out. These kind of bugs are a pain to fix.
NOTE
You may check if the key value set you are using didn't change between SDK's
Are you by chance sending the message valueForUndefinedKey: to the class MKUserLocation?
Here's what the class reference says about getting user location:
"The MKUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing MKUserLocation object from the userLocation property of the map view displayed in your application."
https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKUserLocation_Class/Reference/Reference.html

Why can’t I run Xcode debugger highlighting the call stack after a crash/exception?

So, when developing, I get a crash when running the app in iPhone simulator. Say something like this in the console...
2010-08-01 19:28:04.228 FakeCreme[32888:207] adding bucket: (null)
2010-08-01 19:28:04.230 FakeCreme[32888:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'
*** Call stack at first throw:
(
0 CoreFoundation 0x02641919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0278f5de objc_exception_throw + 47
2 CoreFoundation 0x0263b571 -[__NSArrayM insertObject:atIndex:] + 225
3 CoreFoundation 0x026369c4 -[__NSArrayM addObject:] + 68
4 FakeCreme 0x0000b645 -[BucketsTable didReceiveEvents:withVerb:forDomain:] + 557
5 FakeCreme 0x0002e2fa -[EventManager addObject:withVerb:inDomain:] + 3206
6 FakeCreme 0x0000a7a8 -[BucketsTable viewDidLoad] + 1389
7 UIKit 0x003cac26 -[UIViewController view] + 179
8 UIKit 0x003c9050 -[UIViewController contentScrollView] + 42
9 UIKit 0x003d8df7 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
10 UIKit 0x003d74ff -[UINavigationController _layoutViewController:] + 43
11 UIKit 0x003d8789 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
12 UIKit 0x003d3329 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
13 UIKit 0x004ee209 -[UILayoutContainerView layoutSubviews] + 226
14 QuartzCore 0x040e50d5 -[CALayer layoutSublayers] + 177
15 QuartzCore 0x040e4e05 CALayerLayoutIfNeeded + 220
16 QuartzCore 0x040e464c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
17 QuartzCore 0x040e42b0 _ZN2CA11Transaction6commitEv + 292
18 UIKit 0x0032563f -[UIApplication _reportAppLaunchFinished] + 39
19 UIKit 0x00325a68 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
20 UIKit 0x0032f452 -[UIApplication handleEvent:withNewEvent:] + 1958
21 UIKit 0x00328074 -[UIApplication sendEvent:] + 71
22 UIKit 0x0032cac4 _UIApplicationHandleEvent + 7495
23 GraphicsServices 0x02cbbafa PurpleEventCallback + 1578
24 CoreFoundation 0x02622dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
25 CoreFoundation 0x02583737 __CFRunLoopDoSource1 + 215
26 CoreFoundation 0x025809c3 __CFRunLoopRun + 979
27 CoreFoundation 0x02580280 CFRunLoopRunSpecific + 208
28 CoreFoundation 0x025801a1 CFRunLoopRunInMode + 97
29 UIKit 0x00325226 -[UIApplication _run] + 625
30 UIKit 0x00330b58 UIApplicationMain + 1160
31 FakeCreme 0x000025a0 main + 102
32 FakeCreme 0x00002531 start + 53
33 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
(Details of crash don't matter, just an illustration.)
Now, it used to be the case that when I get such a crash, I can run Xcode debugger and get the call trace conveniently loaded there, so that the debugger loads the call stack and I can interactively navigate in the methods that were called just at the time.
But ever since installing Xcode 3.2.3 and/or switching computers, this doesn't work. I load debugger at this point where my app is halted, but it comes up empty, no call stack.
I'm sure there is an Xcode setting I have missed somewhere, but didn't find anything on my own quickly glancing through settings. What do I need to do to get the call stack loaded in debugger at this point?
Sometimes, for some reason the XCode debugger stops in a place where it simply cannot pick up debug values. I've seen it when trying to stop in callbacks for animations. There's not a setting you can really chose to fix this (though you should check you are running in Debugn and not Release, and that debugging symbol generation is still checked in project settings).
You might try using the LLVM debugger in XCode 4.
However, to solve your particular problem - it seems pretty clear you are trying to insert an object into an array in +didReceiveEvents:WithVerb:ForDomain: in BucketsTable, where you are inserting some point too far after the last element in the array. You might try an NSLog around any array insert there with index and object values.

Resources