I get some error log infoļ¼But the position is not the position code, can you help me to point out the cause of the problem
Below is the details of the crash log, I can't find more position the code, what's the problem.
detail crash log:
The layout constraints still need update after sending -updateConstraints to <_UIKeyboardLayoutAlignmentView: 0x13e6ea660; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x17443ffe0>>.
_UIKeyboardLayoutAlignmentView or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.
(null)
(
0 CoreFoundation 0x0000000185d602f4 <redacted> + 160
1 libobjc.A.dylib 0x000000019758c0e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000185d60218 <redacted> + 0
3 UIKit 0x000000018ae64748 <redacted> + 448
4 UIKit 0x000000018ae64880 <redacted> + 136
5 CoreFoundation 0x0000000185c40cdc CFArrayApplyFunction + 68
6 UIKit 0x000000018ae64620 <redacted> + 152
7 UIKit 0x000000018ae64880 <redacted> + 136
8 CoreFoundation 0x0000000185c40cdc CFArrayApplyFunction + 68
9 UIKit 0x000000018ae64620 <redacted> + 152
10 UIKit 0x000000018ae64880 <redacted> + 136
11 UIKit 0x000000018a89b7b4 <redacted> + 104
12 Foundation 0x0000000186bc1308 <redacted> + 176
13 UIKit 0x000000018a89b4d0 <redacted> + 212
14 UIKit 0x000000018a8b7e04 <redacted> + 104
15 UIKit 0x000000018ae64be4 <redacted> + 180
16 UIKit 0x000000018a7b2140 <redacted> + 588
17 UIKit 0x000000018ac71bd0 <redacted> + 792
18 UIKit 0x000000018aaa8fb0 <redacted> + 1860
19 UIKit 0x000000018a824240 <redacted> + 356
20 UIKit 0x000000018a7946ec <redacted> + 536
21 CoreFoundation 0x0000000185d182a4 <redacted> + 32
22 CoreFoundation 0x0000000185d15230 <redacted> + 360
23 CoreFoundation 0x0000000185d15610 <redacted> + 836
24 CoreFoundation 0x0000000185c412d4 CFRunLoopRunSpecific + 396
25 GraphicsServices 0x000000018f4576fc GSEventRunModal + 168
26 UIKit 0x000000018a806fac UIApplicationMain + 1488
27 Myapp 0x1001803b0 Myapp + 1573808
28 libdyld.dylib 0x0000000197c0aa08 <redacted> + 4
)
dSYM UUID: B1FB72DD-A4D0-3ABA-BF95-9FCD83749770
CPU Type: arm64
Slide Address: 0x0000000100000000
Binary Image: Myapp
Base Address: 0x00000001000f0000
If you implemented updateConstraints you need to call [super updateConstraints]; within your implementation.
See https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instm/UIView/updateConstraints
UPDATE:
_UIKeyboardLayoutAlignmentView is an Apple internal keyboard view. Most likely something is crashing while it is presented.
See this Radar (Apple bug report) and these answers for a potential solution.
The bug seems to be iOS 8.3 specific.
https://openradar.appspot.com/20615507
NSInteralInconsistencyException - UIKeyboardLayoutAlignmentView
iOS 8.3 UIAlertController crashes when trying to add a textfield
Related
I was trying to redo my LaunchScreen.storyboard so I deleted it and created a new LaunchScreen via File(in the toolbar) > New > New File > Launch Screen and then I started getting this problem. I've already checked my IBOutlet connections. I deleted the new LaunchScreen.storyboard in hopes of solving it but it still can't transition to my GameScene. I use SpriteKit and UICollectionView for my game.
Debug Navigator Screenshot
AppDelegate SIGABRT Screenshot
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) e Thread.callStackSymbols.forEach{print($0)}
0 ??? 0x00000001062343cc 0x0 + 4397941708
1 Billionaire City 0x00000001006e23b8 main + 0
2 libsystem_c.dylib 0x00000001c28f7ea8 abort + 140
3 libc++abi.dylib 0x00000001c1fc4788 __cxa_bad_cast + 0
4 libc++abi.dylib 0x00000001c1fc4934 <redacted> + 0
5 libobjc.A.dylib 0x00000001c1fdbe00 <redacted> + 124
6 libc++abi.dylib 0x00000001c1fd0838 <redacted> + 16
7 libc++abi.dylib 0x00000001c1fd01a8 __cxa_get_exception_ptr + 0
8 libc++abi.dylib 0x00000001c1fd0168 <redacted> + 0
9 libobjc.A.dylib 0x00000001c1fdbb3c <redacted> + 0
10 CoreFoundation 0x00000001c2d1d278 <redacted> + 0
11 CoreFoundation 0x00000001c2e05d60 <redacted> + 1408
12 CoreFoundation 0x00000001c2e079fc _CF_forwarding_prep_0 + 92
13 CoreText 0x00000001c6a178d0 <redacted> + 92
14 UIFoundation 0x00000001cd3edf78 <redacted> + 120
15 CoreText 0x00000001c6a1707c <redacted> + 84
16 CoreText 0x00000001c6a169d0 <redacted> + 92
17 CoreText 0x00000001c6a16834 <redacted> + 104
18 CoreText 0x00000001c69c660c <redacted> + 216
19 CoreText 0x00000001c69c651c <redacted> + 160
20 CoreText 0x00000001c69c1da4 CTTypesetterCreateWithAttributedString + 60
21 SpriteKit 0x00000001d98f1c04 _ZN12SKCLabelNode11rebuildTextEv + 1064
22 libdispatch.dylib 0x00000001019f8c74 _dispatch_client_callout + 16
23 libdispatch.dylib 0x0000000101a07480 _dispatch_lane_barrier_sync_invoke_and_complete + 124
24 SpriteKit 0x00000001d98f1230 _ZN12SKCLabelNode21addRenderableChildrenEP13SKCRenderInfoPNSt3__16vectorIP7SKCNodeNS2_9allocatorIS5_EEEE + 92
25 SpriteKit 0x00000001d99aed90 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 372
26 SpriteKit 0x00000001d99aefb8 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 924
27 SpriteKit 0x00000001d99aefb8 _ZN11SKCRenderer18doBuildRenderGroupEP7SKCNode14SKCRenderState13simd_float4x4 + 924
28 SpriteKit 0x00000001d99ae2fc _ZN11SKCRenderer16buildRenderGroupERKNSt3__110shared_ptrI18SKCRenderSortGroupEE + 940
29 SpriteKit 0x00000001d99ab608 _ZN11SKCRenderer15buildRenderPassERKNSt3__110shared_ptrI13SKCRenderPassEE + 96
30 SpriteKit 0x00000001d99aaea0 _ZN11SKCRenderer6renderEP7SKCNodeDv4_fRKNSt3__110shared_ptrI15jet_framebufferEEDv4_j13simd_float4x4bP12NSDictionaryP8SKCStatsSE_d + 1628
31 SpriteKit 0x00000001d9928c80 <redacted> + 664
32 SpriteKit 0x00000001d9928958 <redacted> + 252
33 SpriteKit 0x00000001d992cbec <redacted> + 184
34 UIKitCore 0x00000001ef7cbe54 <redacted> + 1292
35 QuartzCore 0x00000001c728e1f0 <redacted> + 184
36 QuartzCore 0x00000001c7293198 <redacted> + 332
37 QuartzCore 0x00000001c71f60a8 <redacted> + 348
38 QuartzCore 0x00000001c7224108 <redacted> + 640
39 UIKitCore 0x00000001ef35c534 <redacted> + 124
40 CoreFoundation 0x00000001c2d9210c <redacted> + 20
41 CoreFoundation 0x00000001c2d91a10 <redacted> + 272
42 CoreFoundation 0x00000001c2d8ca74 <redacted> + 1024
43 CoreFoundation 0x00000001c2d8c354 CFRunLoopRunSpecific + 436
44 GraphicsServices 0x00000001c4f8c79c GSEventRunModal + 104
45 UIKitCore 0x00000001ef343b68 UIApplicationMain + 212
46 Billionaire City 0x00000001006e2404 main + 76
47 libdyld.dylib 0x00000001c28528e0 <redacted> + 4
(lldb)
It is preferable for an application to run with a LaunchScreen.
In order to fix your problem, try adding a new LaunchScreen, then head to Project Settings - General and from the Launch Screen File drop down menu select your new LaunchScreen.
You can also run it without a LaunchScreen. Delete the LaunchScreen from project in Xcode and Finder, then head to Project Settings - General and from the Launch Screen File drop down menu select scene-name (Main).
While checking the issues reported by Crashlytics, it seems that I have a EXC_BREAKPOINT error for the following line:
self.caloriesFor100 = Int((cartFood.nbCalories.floatValue / 100) * cartFood.quantite.floatValue)
caloriesFor100 is a Int.
cartFood.nbCalories is an NSNumber which is supposed to have float values.
cartFood.quantite is also an NSNumber which is supposed to have float values.
I did not succeed to reproduce the issue. What could possibly cause an EXC_BREAKPOINT in this code?
Full stack trace:
Crashed: com.apple.main-thread
0 LSDP 0x10269ccbc specialized CartFoodModelinit(_:) (CartFoodModel.swift:88)
1 LSDP 0x10268a570 specialized CartFoodCell.cartFoodObjc (CartFoodModel.swift)
2 LSDP 0x102689600 #objc CartFoodCell.cartFoodObjc (<compiler-generated>)
3 LSDP 0x102664c7c -[PanierDuJourViewController tableView:cellForRowAtIndexPath:] (PanierDuJourViewController.m:156)
4 UIKit 0x18bf10148 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 668
5 UIKit 0x18bf0fe00 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
6 UIKit 0x18bf0eb1c -[UITableView _updateVisibleCellsNow:isRecursive:] + 2280
7 UIKit 0x18bf0a668 -[UITableView layoutSubviews] + 140
8 UIKit 0x18be47770 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1420
9 QuartzCore 0x1863e925c -[CALayer layoutSublayers] + 184
10 QuartzCore 0x1863ed3ec CA::Layer::layout_if_needed(CA::Transaction*) + 324
11 QuartzCore 0x186359aa0 CA::Context::commit_transaction(CA::Transaction*) + 320
12 QuartzCore 0x1863815d0 CA::Transaction::commit() + 580
13 UIKit 0x18c22054c _UIApplicationFlushRunLoopCATransactionIfTooLate + 172
14 UIKit 0x18c7fd4c0 __handleEventQueueInternal + 5520
15 UIKit 0x18c7f6258 __handleHIDEventFetcherDrain + 152
16 CoreFoundation 0x18221b404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
17 CoreFoundation 0x18221ac2c __CFRunLoopDoSources0 + 276
18 CoreFoundation 0x18221879c __CFRunLoopRun + 1204
19 CoreFoundation 0x182138da8 CFRunLoopRunSpecific + 552
20 GraphicsServices 0x18411b020 GSEventRunModal + 100
21 UIKit 0x18c11978c UIApplicationMain + 236
22 LSDP 0x1025fce28 main (main.m:16)
23 libdyld.dylib 0x181bc9fc0 start + 4
You may catch this exception in case if NSNumber property will be nil. So maybe it is better to change nbCalories to has an option value.
I found a similar problem and its solution here.
Since your app crashes at tableView:cellForRowAtIndexPath:, it might be that the cell should display an entry of your table (CartFoodCell.cartFoodObjc) that no longer exists.
But without more code, this is just a guess. Please double check it in your code.
My app relatively often crashes with SIGSEGV. Unfortunately, I can not reproduce the crash and only see crash reports in Hockeyapp. I tried turning zombies on, too.
Looking at the crash report it seems that app crashes when processing touches (when user scrolling or something like this). No my app code mentioned in the stack trace.
The question is: how is it possible to have memory issue in this scenario? What would you recommend to reproduce and fix the issue?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x71a86113
Crashed Thread: 0
Application Specific Information:
objc_msgSend() selector name: convertPoint:fromLayer:
Thread 0 Crashed:
0 libobjc.A.dylib 0x2106fae6 objc_msgSend_stret + 6
1 UIKit 0x25e7a349 -[UIView(Geometry) convertPoint:fromView:] + 98
2 UIKit 0x25e7e987 __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 104
3 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
4 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
5 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
6 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
7 UIKit 0x25e7e9bd __38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 158
8 CoreFoundation 0x217e8279 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 86
9 CoreFoundation 0x217e81a7 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 248
10 UIKit 0x25e7e447 -[UIView(Geometry) hitTest:withEvent:] + 492
11 UIKit 0x26146f0d -[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 62
12 UIKit 0x26136491 __70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 186
13 UIKit 0x25e4783f +[UIWindow _topVisibleWindowPassingTest:] + 156
14 UIKit 0x26136399 +[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 142
15 UIKit 0x26136629 -[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 158
16 UIKit 0x260ffb61 _UIApplicationHandleDigitizerEvent + 10982
17 UIKit 0x25e4123f _UIApplicationHandleEventQueue + 3836
18 CoreFoundation 0x21889dff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
19 CoreFoundation 0x218899ed __CFRunLoopDoSources0 + 450
20 CoreFoundation 0x21887d5b __CFRunLoopRun + 792
21 CoreFoundation 0x217d7229 CFRunLoopRunSpecific + 518
22 CoreFoundation 0x217d7015 CFRunLoopRunInMode + 106
23 GraphicsServices 0x22dc7ac9 GSEventRunModal + 158
24 UIKit 0x25eab189 UIApplicationMain + 142
25 My App. 0x0005376b main (main.m:14)
26 ??? 0x2147f873 0x0 + 0
About 10+ crash reported by crittercism.
Name: SIGSEGV
Reason: SEGV_MAPERR
Seems it is a UIScrollView/UITableView animating or scrolling issue.
How can I find the root cause?
Stack:
0
libobjc.A.dylib 0x0000000195fafbd0 objc_msgSend + 12
1
UIKit 0x00000001892b1db8 -[UIScrollView(UIScrollViewInternal) _delegateScrollViewAnimationEnded] + 64
2
UIKit 0x00000001892b1d30 -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:] + 204
3
UIKit 0x0000000189366814 -[UIAnimator stopAnimation:] + 500
4
UIKit 0x0000000189366248 -[UIAnimator(Static) _advanceAnimationsOfType:withTimestamp:] + 332
5
QuartzCore 0x0000000188b4629c CA::Display::DisplayLinkItem::dispatch() + 28
6
QuartzCore 0x0000000188b46134 CA::Display::DisplayLink::dispatch_items() + 320
7
IOKit 0x0000000185921470 IODispatchCalloutFromCFMessage + 372
8
CoreFoundation 0x0000000184712dc4 __CFMachPortPerform + 176
9
CoreFoundation 0x0000000184727a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
10
CoreFoundation 0x00000001847279b4 __CFRunLoopDoSource1 + 432
11
CoreFoundation 0x0000000184725934 __CFRunLoopRun + 1636
12
CoreFoundation 0x00000001846512d4 CFRunLoopRunSpecific + 392
13
GraphicsServices 0x000000018de676fc GSEventRunModal + 164
14
UIKit 0x0000000189216fac UIApplicationMain + 1484
15
MyApp 0x000000010001d280 main (main.m:14)
16
libdyld.dylib 0x000000019661aa08 start + 0
I've seen this happen when a controller and/or its table is deallocated during an animation. The OS still triggers delegate methods (e.g., -scrollViewDidEndScrollingAnimation: or -scrollViewDidEndDecelerating:) when it finishes with the animation, but because the objects no longer exist things get weird.
The best fix is to nil the delegate in the controller's dealloc method.
If I Push the View with Animation set to YES , the app crashes and below is the stack trace. and if I push to view without animation it is working correctly.
-[NewsFeedDetailView viewWillAppear:]
Nov 26 17:58:48 <Error>: -[NSNull length]: unrecognized selector sent to instance 0x307c1400
Nov 26 17:58:48 <Warning>: Stack Trace:: (
0 CoreFoundation 0x225f8d7f <redacted> + 150
1 libobjc.A.dylib 0x2fe57c77 objc_exception_throw + 38
2 CoreFoundation 0x225fe22d <redacted> + 0
3 CoreFoundation 0x225fc109 <redacted> + 712
4 CoreFoundation 0x2252d938 _CF_forwarding_prep_0 + 24
5 UIKit 0x25aa7a9b <redacted> + 38
6 UIKit 0x25b16d5b <redacted> + 66
7 UIKit 0x25b16d11 <redacted> + 84
8 UIKit 0x25b16c99 <redacted> + 400
9 QuartzCore 0x254f4681 <redacted> + 228
10 QuartzCore 0x254de0c1 <redacted> + 2068
11 QuartzCore 0x255bfb4d <redacted> + 52
12 QuartzCore 0x254dd8a5 <redacted> + 88
13 QuartzCore 0x254dd555 <redacted> + 1156
14 QuartzCore 0x254c1b1d <redacted> + 200
15 QuartzCore 0x254c17e1 <redacted> + 24
16 QuartzCore 0x254c11c7 <redacted> + 222
17 QuartzCore 0x254c0fd1 <redacted> + 324
18 UIKit 0x25a9c5f9 <redacted> + 1384
19 CoreFoundation 0x225bf5e7 <redacted> + 14
20 CoreFoundation 0x225be9fb <redacted> + 222
21 CoreFoundation 0x225bd079 <redacted> + 768
22 CoreFoundation 0x2250a981 CFRunLoopRunSpecific + 476
23 CoreFoundation 0x2250a793 CFRunLoopRunInMode + 106
24 GraphicsServices 0x298e3051 GSEventRunModal + 136
25 UIKit 0x25afc981 UIApplicationMain + 1440
26 W I T Party 0x0014b1fd main + 220
27 libdyld.dylib 0x303f3aaf <redacted> + 2
)
Please help me out with this
This is my viewWillAppear. I am just calling the super.
-(void)viewWillAppear:(BOOL)animated {
NSLog(#"%s",__func__);
[super viewWillAppear:NO];
}