Skip to content

TNS Objective-C exception handler#500

Merged
fealebenpae merged 1 commit intomasterfrom
jasssonpet/exception-template
Feb 8, 2016
Merged

TNS Objective-C exception handler#500
fealebenpae merged 1 commit intomasterfrom
jasssonpet/exception-template

Conversation

@jasssonpet
Copy link
Copy Markdown
Contributor

Looking forward to some comments.

New output includes JS stack trace. Example with NativeScript/NativeScript#1426:

2016-02-03 17:58:13.382 HelloWorldApp[81228:1483108] *** JavaScript call stack:
(
    0   _updateIOSTabBarColorsAndFonts@file:///app/tns_modules/ui/tab-view/tab-view.js:282:30
    1   setFontInternalProperty@file:///app/tns_modules/ui/styling/stylers.js:698:43
    2   applyProperty@file:///app/tns_modules/ui/styling/stylers-common.js:27:28
    3   _applyStyleProperty@file:///app/tns_modules/ui/styling/style.js:715:42
    4   @file:///app/tns_modules/ui/styling/style.js:636:103
    5   forEach@[native code]
    6   _endUpdate@file:///app/tns_modules/ui/styling/style.js:636:40
    7   applySelectors@file:///app/tns_modules/ui/styling/style-scope.js:127:30
    8   checkSelectors@file:///app/tns_modules/ui/page/page-common.js:239:33
    9   localCallback@file:///app/tns_modules/ui/core/view-common.js:56:37
    10  _eachChildView@file:///app/tns_modules/ui/content-view/content-view.js:45:21
    11  _eachChildView@file:///app/tns_modules/ui/page/page-common.js:229:45
    12  eachDescendant@file:///app/tns_modules/ui/core/view-common.js:62:24
    13  _applyCss@file:///app/tns_modules/ui/page/page-common.js:243:28
    14  onLoaded@file:///app/tns_modules/ui/page/page-common.js:31:23
    15  onLoaded@file:///app/tns_modules/ui/page/page.js:131:43
    16  viewWillAppear@file:///app/tns_modules/ui/page/page.js:86:23
    17  UIApplicationMain@[native code]
    18  start@file:///app/tns_modules/application/application.js:200:26
    19  anonymous@file:///app/app.js:9:18
    20  evaluate@[native code]
    21  moduleEvaluation@:1:11
    22  @:8:48
    23  promiseReactionJob@:1:11
)
2016-02-03 17:58:13.383 HelloWorldApp[81228:1483108] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 4]'
*** First throw call stack:
(
    0   CoreFoundation                      0x04f7da84 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x04a3ce02 objc_exception_throw + 50
    2   CoreFoundation                      0x04e5606e -[__NSArrayI objectAtIndex:] + 206
    3   CoreFoundation                      0x04ec27f8 -[NSArray objectAtIndexedSubscript:] + 40
    4   HelloWorldApp                       0x001159fe _ZN12NativeScript17ObjCWrapperObject25getOwnPropertySlotByIndexEPN3JSC8JSObjectEPNS1_9ExecStateEjRNS1_12PropertySlotE + 110
    5   HelloWorldApp                       0x00117f4b _ZN3JSC8JSObject15getPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE + 155
    6   HelloWorldApp                       0x00831e07 _ZNK3JSC7JSValue3getEPNS_9ExecStateEjRNS_12PropertySlotE + 279
    7   HelloWorldApp                       0x0082bca5 _ZNK3JSC7JSValue3getEPNS_9ExecStateEj + 101
    8   HelloWorldApp                       0x008f7920 _ZN3JSC5LLInt8getByValEPNS_9ExecStateENS_7JSValueES3_ + 784
    9   HelloWorldApp                       0x008ef039 llint_slow_path_get_by_val + 233
    10  HelloWorldApp                       0x008fc906 llint_entry + 10460
    11  HelloWorldApp                       0x008feffd llint_entry + 20435
    12  HelloWorldApp                       0x008feffd llint_entry + 20435
    13  HelloWorldApp                       0x008fefa6 llint_entry + 20348
    14  HelloWorldApp                       0x008feffd llint_entry + 20435
    15  HelloWorldApp                       0x008f9e7c vmEntryToJavaScript + 284
    16  HelloWorldApp                       0x0086ec9d _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 269
    17  HelloWorldApp                       0x008296b4 _ZN3JSC11Interpreter7executeERNS_16CallFrameClosureE + 804
    18  HelloWorldApp                       0x00c781aa _ZN3JSC10CachedCall4callEv + 122
    19  HelloWorldApp                       0x00c7730d _ZN3JSCL19mapProtoFuncForEachEPNS_9ExecStateE + 1085
    20  HelloWorldApp                       0x008ff712 llint_entry + 22248
    21  HelloWorldApp                       0x008fefa6 llint_entry + 20348
    22  HelloWorldApp                       0x008fefa6 llint_entry + 20348
    23  HelloWorldApp                       0x008fefa6 llint_entry + 20348
    24  HelloWorldApp                       0x008feffd llint_entry + 20435
    25  HelloWorldApp                       0x008feffd llint_entry + 20435
    26  HelloWorldApp                       0x008feffd llint_entry + 20435
    27  HelloWorldApp                       0x008feffd llint_entry + 20435
    28  HelloWorldApp                       0x008feffd llint_entry + 20435
    29  HelloWorldApp                       0x008feffd llint_entry + 20435
    30  HelloWorldApp                       0x008feffd llint_entry + 20435
    31  HelloWorldApp                       0x008feffd llint_entry + 20435
    32  HelloWorldApp                       0x008f9e7c vmEntryToJavaScript + 284
    33  HelloWorldApp                       0x0086ec9d _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 269
    34  HelloWorldApp                       0x008284a4 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 1684
    35  HelloWorldApp                       0x00a670fd _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 253
    36  HelloWorldApp                       0x0010d81f _ZN12NativeScript11FFICallbackINS_18ObjCMethodCallbackEE12callFunctionERKN3JSC7JSValueERKNS3_7ArgListEPv + 335
    37  HelloWorldApp                       0x0010cc4d _ZN12NativeScript18ObjCMethodCallback18ffiClosureCallbackEPvPS1_S1_ + 333
    38  HelloWorldApp                       0x0010df78 _ZN12NativeScript11FFICallbackINS_18ObjCMethodCallbackEE18ffiClosureCallbackEP7ffi_cifPvPS5_S5_ + 88
    39  HelloWorldApp                       0x00dce870 ffi_closure_inner + 736
    40  HelloWorldApp                       0x00dcf1c2 ffi_closure_i386 + 50
    41  UIKit                               0x02d7fbff -[UIViewController __viewWillAppear:] + 147
    42  UIKit                               0x02dc5c86 -[UINavigationController _startTransition:fromViewController:toViewController:] + 1075
    43  UIKit                               0x02dc6ce0 -[UINavigationController _startDeferredTransitionIfNeeded:] + 1038
    44  UIKit                               0x02dc7e3b -[UINavigationController __viewWillLayoutSubviews] + 68
    45  UIKit                               0x02fa3193 -[UILayoutContainerView layoutSubviews] + 252
    46  UIKit                               0x02c78eb7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 813
    47  libobjc.A.dylib                     0x04a51059 -[NSObject performSelector:withObject:] + 70
    48  QuartzCore                          0x07da580a -[CALayer layoutSublayers] + 144
    49  QuartzCore                          0x07d994ee _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 388
    50  QuartzCore                          0x07d99352 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    51  QuartzCore                          0x07d8be8b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 317
    52  QuartzCore                          0x07dbfe03 _ZN2CA11Transaction6commitEv + 561
    53  QuartzCore                          0x07dc06c4 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
    54  CoreFoundation                      0x04e9761e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
    55  CoreFoundation                      0x04e9757e __CFRunLoopDoObservers + 398
    56  CoreFoundation                      0x04e8c728 CFRunLoopRunSpecific + 504
    57  CoreFoundation                      0x04e8c51b CFRunLoopRunInMode + 123
    58  UIKit                               0x02ba9854 -[UIApplication _run] + 540
    59  UIKit                               0x02baf1eb UIApplicationMain + 160
    60  HelloWorldApp                       0x00dcf088 ffi_call_i386 + 24
)

Closes #434.

@jasssonpet jasssonpet self-assigned this Feb 3, 2016
@jasssonpet jasssonpet added this to the 1.6.0 milestone Feb 3, 2016
@jasssonpet jasssonpet mentioned this pull request Feb 3, 2016
@ivanbuhov
Copy link
Copy Markdown
Contributor

👍

@jasssonpet jasssonpet force-pushed the jasssonpet/exception-template branch from c957823 to 3a7a285 Compare February 5, 2016 08:18
fealebenpae added a commit that referenced this pull request Feb 8, 2016
@fealebenpae fealebenpae merged commit 054706f into master Feb 8, 2016
@fealebenpae fealebenpae deleted the jasssonpet/exception-template branch February 8, 2016 12:17
@jasssonpet jasssonpet added the done label Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants