I've got a Nativescript-Vue iOS app that works perfectly in the simulator.
When I deploy it to the Apple App Store, to test using TestFlight, the build and uploads work fine. But when I execute the app on a real device (iPhone 6s or iPad Air, both running the latest iOS version) the splash screen shows, then the app crashes.
I've tried almost every permutation of settings I can think of, but so far all versions crash after the splash screen. I suspect that it's something to do with signing/provisioning since the app works fine in the simulator.
Any ideas/suggestions as to how to get past this would be very much appreciated, since I'm at a loss. I suspect that the Apple App Store/TestFlight publishing process has worms. ;-)
I'm not new to development (got decades of experience) but fairly new to Nativescript and IOS app development.
Thanks!
tns info shows:
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.1.2 version and is up to date.
✔ Component tns-core-modules has 6.1.1 version and is up to date.
⚠ Update available for component tns-android. Your current version is 6.1.1 and the latest available version is 6.1.2.
✔ Component tns-ios has 6.1.1 version and is up to date.
MacOS Mojave 10.14.4 (running in a VMWare virtual machine).
Latest NodeJS/NPM, and XCode v10.2.1
I've tried including my Distribution provisioning profile in build.xconfig and also specifying it on the build command:
tns build ios --release --for-device --provision xxxx-xxxx-xxxx-xxxx
Builds fine....no errors and I end up with an ipa that uploads fine.
I then deploy to the app store for testing using TestFlight using:
tns publish ios --ipa platforms/ios/build/Release-iphoneos/mobile.ipa --appleApplicationSpecificPassword xxx-xxx-xxx-xx --appleSessionBase64 xxxxxxxxx
Uploads fine....passes all tests and becomes available through TestFlight fine.
I've also tried building/uploading using XCode which works fine, but still the app crashes after the splash screen on a real device.
Here is the first part of the crash log from my iPhone:
{"app_name":"mobile","app_cohort":"2|date=1569609000000&sf=143455&tid=61b35e66f4d79f0304b4f4b7164b8363d323e055c604cd261fe8b2b673d2f72b&ttype=i","app_version":"1.0","timestamp":"2019-09-27 14:39:36.59 -0400","slice_uuid":"5f391bac-b299-3711-a064-11adaf34562a","adam_id":1481012502,"build_version":"1.0.6","bundleID":"ca.oftr.trailmaps","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.1 (17A844)","incident_id":"5EF5270B-ABF0-4A95-A2B1-B37CAA157B7D","is_beta":true,"name":"mobile"}
Incident Identifier: 5EF5270B-ABF0-4A95-A2B1-B37CAA157B7D
Beta Identifier: 2AA29AA5-AACE-4595-840B-C862C240BC59
Hardware Model: iPhone8,1
Process: mobile [1023]
Path: /private/var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/mobile
Identifier: ca.oftr.trailmaps
Version: 1.0.6 (1.0)
AppStoreTools: 11A1002b
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: ca.oftr.trailmaps [675]
Date/Time: 2019-09-27 14:39:36.0120 -0400
Launch Time: 2019-09-27 14:39:34.3645 -0400
OS Version: iPhone OS 13.1 (17A844)
Release Type: User
Baseband Version: 7.00.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x1ad8d898c 0x1ad6010a4 0x102b13808 0x102b49e5c 0x10365d3c4 0x1036601b4 0x1ad83409c 0x1ad8340e4 0x1ad833444 0x1ad8330fc 0x1ad7af43c 0x1ad832a4c 0x1adb8f2d8 0x1b18dd5a4 0x1b18e34c0 0x1b10bf810 0x1b15503ec 0x1b10c02f8 0x1b10bfd50 0x1b10c0124 0x1b10bf9e0 0x1b10c3efc 0x1b1483028 0x1b15695ac 0x1b10c3c34 0x1b15694a8 0x1b10c3aa0 0x1b0f38efc 0x1b0f37a64 0x1b0f38c34 0x1b18e1840 0x1b14a3a0c 0x1b2970994 0x1b2995960 0x1b297b0f8 0x1b299561c 0x1ad5a6184 0x1ad54f038 0x1b29ba540 0x1b29ba20c 0x1b29ba734 0x1ad8567e0 0x1ad856738 0x1ad855f20 0x1ad85101c 0x1ad8508bc 0x1b76bb328 0x1b18e56d4 0x103660044 0x10365cae4 0x10365c5e0 0x102ad4f90 0x10365b7e8 0x103659b64 0x103659b64 0x103659b64 0x103659b64 0x103659b64 0x103659b64 0x103659b64 0x103659b64 0x103659ac4 0x103659b64 0x10364560c 0x1032cd658 0x1034a5ffc 0x102aee148 0x102c571b0 0x10365b54c 0x103659b64 0x103659b64 0x10364560c 0x1032cd658 0x1034a61c8 0x102c507d0 0x102ae4570 0x102b58564 0x1022af420 0x1ad6db460)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001ad6d0ebc 0x1ad6ac000 + 151228
1 libsystem_pthread.dylib 0x00000001ad5ec790 0x1ad5ea000 + 10128
2 libsystem_c.dylib 0x00000001ad540824 0x1ad4cd000 + 473124
3 libc++abi.dylib 0x00000001ad6997d4 0x1ad698000 + 6100
4 libc++abi.dylib 0x00000001ad6999c4 0x1ad698000 + 6596
5 libobjc.A.dylib 0x00000001ad601358 0x1ad5fb000 + 25432
6 libc++abi.dylib 0x00000001ad6a6304 0x1ad698000 + 58116
7 libc++abi.dylib 0x00000001ad6a5c58 0x1ad698000 + 56408
8 libc++abi.dylib 0x00000001ad6a5c18 0x1ad698000 + 56344
9 libobjc.A.dylib 0x00000001ad6011d0 0x1ad5fb000 + 25040
10 NativeScript 0x0000000102b13808 0x102acc000 + 292872
11 NativeScript 0x0000000102b49e5c 0x102acc000 + 515676
12 NativeScript 0x000000010365d3c4 0x102acc000 + 12129220
13 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
14 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
15 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
16 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
17 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
18 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
19 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
20 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
21 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
22 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
23 NativeScript 0x00000001036601b4 0x102acc000 + 12140980
The Nativescript line repeats for 500+ lines. Then I see:
Thread 1 name: JavaScriptCore bmalloc scavenger
Thread 1:
0 libsystem_kernel.dylib 0x00000001ad6d0c8c 0x1ad6ac000 + 150668
1 libsystem_pthread.dylib 0x00000001ad5ee204 0x1ad5ea000 + 16900
2 libc++.1.dylib 0x00000001ad722840 0x1ad714000 + 59456
3 NativeScript 0x0000000102b8cbe4 0x102acc000 + 789476
4 NativeScript 0x0000000102b8ca94 0x102acc000 + 789140
5 NativeScript 0x0000000102b8b678 0x102acc000 + 783992
6 NativeScript 0x0000000102b8acec 0x102acc000 + 781548
7 NativeScript 0x0000000102b8c7ac 0x102acc000 + 788396
8 libsystem_pthread.dylib 0x00000001ad5f51ec 0x1ad5ea000 + 45548
9 libsystem_pthread.dylib 0x00000001ad5f8aec 0x1ad5ea000 + 60140
Thread 2:
0 libsystem_pthread.dylib 0x00000001ad5f8ad8 0x1ad5ea000 + 60120
Thread 3:
0 libsystem_pthread.dylib 0x00000001ad5f8ad8 0x1ad5ea000 + 60120
Thread 4:
0 libsystem_pthread.dylib 0x00000001ad5f8ad8 0x1ad5ea000 + 60120
Thread 5:
0 libsystem_pthread.dylib 0x00000001ad5f8ad8 0x1ad5ea000 + 60120
Thread 6 name: Heap Helper Thread
Thread 6:
0 libsystem_kernel.dylib 0x00000001ad6d0c8c 0x1ad6ac000 + 150668
1 libsystem_pthread.dylib 0x00000001ad5ee204 0x1ad5ea000 + 16900
2 NativeScript 0x0000000102ba2310 0x102acc000 + 877328
3 NativeScript 0x0000000102b9da10 0x102acc000 + 858640
4 NativeScript 0x0000000103271cf0 0x102acc000 + 8019184
5 NativeScript 0x0000000102b8e600 0x102acc000 + 796160
6 NativeScript 0x0000000102ba0744 0x102acc000 + 870212
7 NativeScript 0x0000000102ba1b30 0x102acc000 + 875312
8 libsystem_pthread.dylib 0x00000001ad5f51ec 0x1ad5ea000 + 45548
9 libsystem_pthread.dylib 0x00000001ad5f8aec 0x1ad5ea000 + 60140
Thread 7 name: JSC Heap Collector Thread
Thread 7:
0 libsystem_kernel.dylib 0x00000001ad6d0c8c 0x1ad6ac000 + 150668
1 libsystem_pthread.dylib 0x00000001ad5ee204 0x1ad5ea000 + 16900
2 NativeScript 0x0000000102ba2310 0x102acc000 + 877328
3 NativeScript 0x0000000102b9da10 0x102acc000 + 858640
4 NativeScript 0x0000000103271cf0 0x102acc000 + 8019184
5 NativeScript 0x0000000102b8e600 0x102acc000 + 796160
6 NativeScript 0x0000000102ba0744 0x102acc000 + 870212
7 NativeScript 0x0000000102ba1b30 0x102acc000 + 875312
8 libsystem_pthread.dylib 0x00000001ad5f51ec 0x1ad5ea000 + 45548
9 libsystem_pthread.dylib 0x00000001ad5f8aec 0x1ad5ea000 + 60140
Thread 8 name: com.apple.uikit.eventfetch-thread
Thread 8:
0 libsystem_kernel.dylib 0x00000001ad6af5f4 0x1ad6ac000 + 13812
1 libsystem_kernel.dylib 0x00000001ad6aea60 0x1ad6ac000 + 10848
2 CoreFoundation 0x00000001ad856068 0x1ad7ad000 + 692328
3 CoreFoundation 0x00000001ad851188 0x1ad7ad000 + 672136
4 CoreFoundation 0x00000001ad8508bc 0x1ad7ad000 + 669884
5 Foundation 0x00000001adb90994 0x1adb89000 + 31124
6 Foundation 0x00000001adb90874 0x1adb89000 + 30836
7 UIKitCore 0x00000001b197d49c 0x1b0ef5000 + 11043996
8 Foundation 0x00000001adcc10b0 0x1adb89000 + 1278128
9 libsystem_pthread.dylib 0x00000001ad5f51ec 0x1ad5ea000 + 45548
10 libsystem_pthread.dylib 0x00000001ad5f8aec 0x1ad5ea000 + 60140
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x00000001ad6a95d8 x5: 0x000000016db522c0 x6: 0x000000000000006e x7: 0xffffffffffffffec
x8: 0x0000000102a59800 x9: 0x00000001ad5f0b5c x10: 0x00000001ad5ec720 x11: 0x000000000000000b
x12: 0x00000001e422b080 x13: 0x0000000000000001 x14: 0x0000000000000010 x15: 0x0000000000000002
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000000507 x21: 0x000000016db522c0 x22: 0x0000000102a598e0 x23: 0x000000010367b495
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x000000016db537e0 x27: 0x00000001e9a2b9a0
x28: 0x0000000000000001 fp: 0x000000016db52220 lr: 0x00000001ad5ec790
sp: 0x000000016db52200 pc: 0x00000001ad6d0ebc cpsr: 0x40000000
esr: 0x56000080 Address size fault
Binary Images:
0x1022a8000 - 0x1022affff mobile arm64 <5f391bacb2993711a06411adaf34562a> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/mobile
0x1027d0000 - 0x10281bfff SocketIO arm64 <beb5044ed4233fdc974ed73fee4bf1c9> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/SocketIO.framework/SocketIO
0x1028b4000 - 0x1028dffff Starscream arm64 <7e6a5107d333347bb22abb3e9d48ef0d> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/Starscream.framework/Starscream
0x10293c000 - 0x102947fff Toast arm64 <2a50d9d655243c28a7f4c5fab69b53dd> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/Toast.framework/Toast
0x10295c000 - 0x102963fff TNSWidgets arm64 <fde1bcbc250834e0928be366e6e442f3> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/TNSWidgets.framework/TNSWidgets
0x1029f0000 - 0x102a53fff dyld arm64 <571392a7e1e6369f8805c1a141f3c1c5> /usr/lib/dyld
0x102acc000 - 0x1037bbfff NativeScript arm64 <a85f51cba55e35f2b076c503bfe23a88> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/NativeScript.framework/NativeScript
0x103b14000 - 0x103eb7fff Mapbox arm64 <01ae5a1ef2b1340288539b7ec8d61378> /var/containers/Bundle/Application/96251F76-540E-4140-A35D-619EDF113FDD/mobile.app/Frameworks/Mapbox.framework/Mapbox
0x103fcc000 - 0x103fd7fff libobjc-trampolines.dylib arm64 <048eb53f47913e0a9314876c6577aa10> /usr/lib/libobjc-trampolines.dylib
0x1ad483000 - 0x1ad499fff libsystem_trace.dylib arm64 <f7e5141b7c243e5aaa79065004ecbf30> /usr/lib/system/libsystem_trace.dylib
0x1ad49a000 - 0x1ad4cbfff libxpc.dylib arm64 <217dc1a778213f1fa8373825d770ef05> /usr/lib/system/libxpc.dylib
0x1ad4cc000 - 0x1ad4ccfff libsystem_blocks.dylib arm64 <c06042b841f63e4994717b606330928a> /usr/lib/system/libsystem_blocks.dylib
0x1ad4cd000 - 0x1ad549fff libsystem_c.dylib arm64 <c4beb94cb8313889a4034b7a4aa4dcdf> /usr/lib/system/libsystem_c.dylib
0x1ad54a000 - 0x1ad5befff libdispatch.dylib arm64 <3a5db4e0bc24375d897e51e6cf7d6304> /usr/lib/system/libdispatch.dylib
0x1ad5bf000 - 0x1ad5defff libsystem_malloc.dylib arm64 <5dbcbc6428083e64890cb59f2ddfeb1d> /usr/lib/system/libsystem_malloc.dylib
0x1ad5df000 - 0x1ad5e9fff libsystem_platform.dylib arm64 <09a51269d3c53ece87b7f32c096af8e7> /usr/lib/system/libsystem_platform.dylib
0x1ad5ea000 - 0x1ad5fafff libsystem_pthread.dylib arm64 <c3fa4f34750f362bbefe835bfb15c0f8> /usr/lib/system/libsystem_pthread.dylib
0x1ad5fb000 - 0x1ad62bfff libobjc.A.dylib arm64 <b39048c383953de4af4daca3097fdc53> /usr/lib/libobjc.A.dylib
0x1ad62c000 - 0x1ad697fff libcorecrypto.dylib arm64 <6ddbd01331ce32cb9fce3c5f40880ac5> /usr/lib/system/libcorecrypto.dylib
0x1ad698000 - 0x1ad6abfff libc++abi.dylib arm64 <b148bc1f83c834e2868d00db2d9bbb55> /usr/lib/libc++abi.dylib
0x1ad6ac000 - 0x1ad6d9fff libsystem_kernel.dylib arm64 <92cbd0cb514f3a23a21c169e915052a7> /usr/lib/system/libsystem_kernel.dylib
0x1ad6da000 - 0x1ad70bfff libdyld.dylib arm64 <3a812c9416333a559831b451e9a59f3c> /usr/lib/system/libdyld.dylib
0x1ad70c000 - 0x1ad713fff libsystem_darwin.dylib arm64 <c10d7897c5833454b6f9697c78d9eeb6> /usr/lib/system/libsystem_darwin.dylib
0x1ad714000 - 0x1ad76afff libc++.1.dylib arm64 <4547c800a6533ece9808c26768583e25> /usr/lib/libc++.1.dylib
0x1ad76b000 - 0x1ad7acfff libsystem_info.dylib arm64 <bb4a834b619136be866b5018d4eb692d> /usr/lib/system/libsystem_info.dylib
remainder of log redacted.
Related
I am trying to reorganize an old application written in Xamarin. The application gives the following error without opening the application in the simulator. Can you help me?
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application windows are expected to have a root view controller at the end of application launch
Native stack trace:
0 CoreFoundation 0x00007fff20421af6 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177e78 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2042191f +[NSException raise:format:] + 0
3 Foundation 0x00007fff2077156a -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff2469a8fc -[UIApplication _runWithMainScene:transitionContext:completion:] + 2148
5 UIKitCore 0x00007fff23cc36f7 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
6 UIKitCore 0x00007fff24251d1e _UIScenePerformActionsWithLifecycleActionMask + 88
7 UIKitCore 0x00007fff23cc4206 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
8 UIKitCore 0x00007fff23cc3cca -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
......
enter image description here
iOS9 requires all the Window must have a rootViewController, you should edit AppDelegate like this:
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
var indexVC = new IndexViewController ();
window = new UIWindow ((CGRect)UIScreen.MainScreen.Bounds);
window.RootViewController = indexVC;
window.MakeKeyAndVisible ();
return true;
}
you can refer to this page for more details.
There are some changes since ios9, you can refer to this and this page
My Xamarin iOS app crashes with error "unrecognized selector sent to instance...", but neither the stack trace nor the call stack has any useful information of where could be the problem in my source code. I'm using Visual Studio for Mac, and the app is running on the iOS simulator. Are there any options that need to be enabled in order to show my source code in the stack trace?
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[NSObject doesNotRecognizeSelector]: unrecognized selector sent to instance 0x600000016d80
Native stack trace:
0 CoreFoundation 0x000000010579e12b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001066d8f41 objc_exception_throw + 48
2 CoreFoundation 0x000000010581f024 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000105720f78 ___forwarding___ + 1432
4 CoreFoundation 0x0000000105720958 _CF_forwarding_prep_0 + 120
5 Foundation 0x0000000103997f35 __NSFireDelayedPerform + 409
6 CoreFoundation 0x000000010572e174 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
7 CoreFoundation 0x000000010572de32 __CFRunLoopDoTimer + 1026
8 CoreFoundation 0x000000010572d9ea __CFRunLoopDoTimers + 266
9 CoreFoundation 0x0000000105725404 __CFRunLoopRun + 2308
10 CoreFoundation 0x0000000105724889 CFRunLoopRunSpecific + 409
11 GraphicsServices 0x0000000108cfb9c6 GSEventRunModal + 62
12 UIKit 0x00000001013375d6 UIApplicationMain + 159
13 ??? 0x00000001179fbe98 0x0 + 4691312280
14 ??? 0x00000001179fbac3 0x0 + 4691311299
Update:
The problem seems related to .dSYM files not being generated for the simulator.
This is what I add to my Application.cs class to better see exception information:
static void Main(string[] args)
{
#if DEBUG
try
{
#endif
UIApplication.Main(args, null, "AppDelegate");
#if DEBUG
}
catch (Exception ex)
{
var msg = ex.Message;
var temp = ex.StackTrace;
if(System.Diagnostics.Debugger.IsAttached)
System.Diagnostics.Debugger.Break();
throw;
}
#endif
}
You can trace inside xamarin source code. Details specified in Microsoft documentation.
Also you can get more diagnostic details during debugging by changing Xamarin options as specified in Xamarin forums.
I am building an application in AppleScriptObjC and I have a beginner question - how can I handle clicking on tab buttons in my app? I'm trying to make it have different sizes for each tab. I can make the window resize, but not when you click on a tab. Anyway, I've connected the tab view to the delegate
and such, and added a didSelectTabView function as follows:
on didSelectTabViewItem_(tabItem)
display alert "Testing"
end didSelectTabViewItem_
...and I get the following error:
2013-05-30 18:50:10.970 MacUtil[16354:303] Error setting value for key path self of object <AppDelegate #0x1005d3040: OSAID(4)> (from bound object <NSTabView: 0x101c05490>): [<AppDelegate 0x1005d3040> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key self.
2013-05-30 18:50:10.972 MacUtil[16354:303] (
0 CoreFoundation 0x00007fff911210a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff9522e3f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff91120ee8 +[NSException raise:format:arguments:] + 104
3 AppKit 0x00007fff92e3414c -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 902
4 AppKit 0x00007fff92e33d6d -[NSBinder setValue:forBinding:error:] + 248
5 AppKit 0x00007fff93493625 -[NSViewStateBinder _setValue:forBinding:errorFallbackMessage:] + 63
6 AppKit 0x00007fff933a5198 -[NSTabViewBinder tabView:didSelectTabViewItem:] + 330
7 AppKit 0x00007fff934b9c75 -[_NSBindingAdaptor tabView:didSelectTabViewItem:] + 136
8 AppKit 0x00007fff92fe9029 -[NSTabView selectTabViewItem:] + 1172
9 AppKit 0x00007fff9303ea8c -[NSTabView mouseDown:] + 156
10 AppKit 0x00007fff92fad60e -[NSWindow sendEvent:] + 6853
11 AppKit 0x00007fff92fa9744 -[NSApplication sendEvent:] + 5761
12 AppKit 0x00007fff92ebf2fa -[NSApplication run] + 636
13 AppKit 0x00007fff92e63cb6 NSApplicationMain + 869
14 MacUtil 0x0000000100000f0a main + 74
15 libdyld.dylib 0x00007fff93a297e1 start + 0
16 ??? 0x0000000000000003 0x0 + 3
)
Any help would be appreciated!
Solved! I just had to uncheck "Raises for Non Applicable Keys" in the place where you bind it to the app delegate. It was doing that because I hadn't implemented all of the methods for tab view event handling.
I am facing crash sometimes on [NSWorkspace setIcon:forFile:options:] API.
any help is appreciated.
here is crash stack,
0 libsystem_kernel.dylib 0x00007fff85bfbe56 __semwait_signal_nocancel + 10
1 libsystem_c.dylib 0x00007fff8c04818b nanosleep$NOCANCEL + 139
2 libsystem_c.dylib 0x00007fff8bfe7c78 usleep$NOCANCEL + 53
3 libsystem_c.dylib 0x00007fff8bfe7aa6 abort + 187
4 libsystem_c.dylib 0x00007fff8c04684c free + 389
5 com.apple.CoreServices.CarbonCore 0x00007fff8df7aaf7 CSMemDisposePtr + 23
6 com.apple.CoreServices.CarbonCore 0x00007fff8df7aaba CSMemDisposeHandle + 79
7 com.apple.CoreServices.CarbonCore 0x00007fff8df7c355 DisposeHandle + 9
8 com.apple.AppKit 0x00007fff90356598 -[NSWorkspace setIcon:forFile:options:] + 566
Here is code,
static NSImage *FolderIcon = nil;
if(!FolderIcon) {
FolderIcon = [[NSImage imageNamed:#"xxx.icns"] retain];
}
if(![[NSWorkspace sharedWorkspace] setIcon: FolderIcon
forFile:Path
options:0]) {
NSLog(#"error");
}
I am using static icon, so I don't think possibility of dangling pointer, Also I checked if we pass file path which does not exists then it return "NO". But it is not crashing.
This is rarely re-producible.. will paste errors once it re-produce
You should not call -setIcon:forFile:options: from multiple thread at a time.
From Documentation:
It is safe to call this method from any of your app’s threads, but you
must call it from only one thread at a time.
How to I get to symbolicate everything?
Here is an example so what I am talking about:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreFoundation 0x351642cc CFRelease + 32
1 CoreFoundation 0x3518e130 CFArraySetValueAtIndex + 284
2 AddressBook 0x32971aba ABCMultiValueReplaceLabel + 58
3 AddressBook 0x3298c598 ABMultiValueReplaceLabelAtIndex + 140
4 My App 0x00011206 0x00011206
5 My App 0x00010e48 0x00010e48
6 My App 0x00011ada 0x00011ada
7 My App 0x0001027c 0x0001027c
8 My App 0x0000ecf2 0x0000ecf2
9 My App 0x00012f44 0x00012f44
10 My App 0x00012e3e 0x00012e3e
11 Foundation 0x32d0aef2 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 14
12 Foundation 0x32c4a9ec -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 196
13 Foundation 0x32c4a908 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 56
14 CFNetwork 0x3111c5dc ___delegate_didFinishLoading_block_invoke_0 + 24
15 CFNetwork 0x3111bcc8 ___withDelegateAsync_block_invoke_0 + 52
16 CFNetwork 0x31144130 ___performAsync_block_invoke_068 + 16
17 CoreFoundation 0x3516974a CFArrayApplyFunction + 174
18 CFNetwork 0x3114458e RunloopBlockContext::perform() + 70
19 CFNetwork 0x310a815a MultiplexerSource::perform() + 186
20 CoreFoundation 0x351f8680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
21 CoreFoundation 0x351f7ee4 __CFRunLoopDoSources0 + 208
22 CoreFoundation 0x351f6cb2 __CFRunLoopRun + 642
23 CoreFoundation 0x35169eb8 CFRunLoopRunSpecific + 352
24 CoreFoundation 0x35169d44 CFRunLoopRunInMode + 100
25 GraphicsServices 0x356a62e6 GSEventRunModal + 70
26 UIKit 0x365482fc UIApplicationMain + 1116
27 My App 0x0000275a 0x0000275a
28 My App 0x00002714 0x00002714
You might find these links useful on how to symbolicate crash logs:
Symbolicating iPhone App Crash Reports
iOS Crash Logs
Another way: in Xcode 4.5, set your build target (via the Scheme drop down next to the Stop button) to an iOS Device. Then go to the Product menu in the menu bar and choose Archive.
Next, open the Organizer window (Window menu in the menu bar --> Organizer), and make sure your app shows up in the list when you click the Archives icon at the top of the Organizer window.
Finally, click the Devices icon at the top of the Organizer window, click Device Logs on the left under Library, and drag your crash log into the pane on the right. It should be fully auto-symbolicated for you.