线程0崩溃,SIGABRT异常和__pthread_kill

问题描述:

我们正在开发应用程序,该应用程序在堆栈跟踪下发生崩溃。在调试过程中,我们暂时无法找到问题的根源。我知道这个问题与解除分配的对象有关。如果有人能够指导我上课或观看方向,或者是导致问题的事情,我会很乐意欣赏。谢谢线程0崩溃,SIGABRT异常和__pthread_kill

Incident Identifier: 
CrashReporter Key: 
Hardware Model:  iPhone9,4 
Process:   MYAPP [26490] 
Path:   /var/containers/Bundle/Application/2D7244DE-6519-43CB-B3FF-AD502F5921D7/MYAPP.app/MYAPP 
Identifier:  com.MYAPP.ios 
Version:   1.2.0 (120) 
Code Type:  ARM-64 
Parent Process: ??? [1] 

Date/Time:  2017-08-24T13:57:21Z 
Launch Time:  2017-08-24T13:32:26Z 
OS Version:  iPhone OS 10.2.1 (14D27) 
Report Version: 104 

Exception Type: SIGABRT 
Exception Codes: #0 at 0x18c747014 
Crashed Thread: 0 

Thread 0 Crashed: 
0 libsystem_kernel.dylib    0x000000018c747014 __pthread_kill + 8 
1 libsystem_pthread.dylib    0x000000018c80f450 pthread_kill + 108 
2 libsystem_c.dylib     0x000000018c6bb400 abort + 136 
3 libsystem_malloc.dylib    0x000000018c78ba5c nanozone_error + 328 
4 libsystem_malloc.dylib    0x000000018c78cf18 nano_realloc + 372 
5 libsystem_malloc.dylib    0x000000018c77f240 malloc_zone_realloc + 176 
6 Foundation       0x000000018e1ca628 -[NSString quotedStringRepresentation] + 728 
7 Foundation       0x000000018e1aa44c -[NSString _stringRepresentation] + 372 
8 CoreFoundation      0x000000018d6a1f3c -[NSArray descriptionWithLocale:indent:] + 400 
9 Foundation       0x000000018e184af4 _NSDescriptionWithLocaleFunc + 72 
10 CoreFoundation      0x000000018d73a23c __CFStringAppendFormatCore + 7992 
11 CoreFoundation      0x000000018d7382c8 _CFStringCreateWithFormatAndArgumentsAux2 + 240 
12 Foundation       0x000000018e184968 +[NSString stringWithFormat:] + 64 
13 UIKit        0x0000000193f83090 UIViewAlertForUnsatisfiableConstraints + 660 
14 Foundation       0x000000018e1f94cc -[NSISEngine handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 460 
15 Foundation       0x000000018e1d9df8 -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 380 
16 Foundation       0x000000018e1d59c4 -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 684 
17 Foundation       0x000000018e1d55cc -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 280 
18 Foundation       0x000000018e1d31e0 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 268 
19 UIKit        0x000000019372b2a0 -[UIView(UIConstraintBasedLayout) _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 504 
20 UIKit        0x000000019372b068 -[UIView(UIConstraintBasedLayout) _tryToAddConstraintWithoutUpdatingConstraintsArray:roundingAdjustment:mutuallyExclusiveConstraints:] + 32 
21 UIKit        0x000000019372b028 -[UIView(UIConstraintBasedLayout) _tryToAddConstraint:roundingAdjustment:mutuallyExclusiveConstraints:] + 224 
22 UIKit        0x0000000193f77900 -[UIView(UIConstraintBasedLayout) _resetLayoutEngineHostConstraintsForAxis:] + 324 
23 Foundation       0x000000018e1d2d10 -[NSISEngine withBehaviors:performModifications:] + 164 
24 UIKit        0x0000000193f7799c -[UIView(UIConstraintBasedLayout) _resetLayoutEngineHostConstraints] + 68 
25 UIKit        0x000000019376c1f0 -[UIView(UIConstraintBasedLayout) _updateLayoutEngineHostConstraints] + 548 
26 UIKit        0x0000000193f7f1cc -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 68 
27 UIKit        0x0000000193f7de80 -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 188 
28 UIKit        0x0000000193f7e1d0 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 628 
29 Foundation       0x000000018e1d2d10 -[NSISEngine withBehaviors:performModifications:] + 164 
30 UIKit        0x0000000193f7e41c -[UIView(AdditionalLayoutSupport) _recursiveUpdateConstraintsIfNeededCollectingViews:forSecondPass:] + 116 
31 UIKit        0x0000000193f7e158 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 508 
32 UIKit        0x0000000193f7e974 __100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 80 
33 UIKit        0x0000000193f7db30 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 132 
34 UIKit        0x0000000193f7e580 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 160 
35 UIKit        0x0000000193f7f58c -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 368 
36 UIKit        0x00000001939285e4 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 176 
37 UIKit        0x000000019362bacc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268 
38 QuartzCore       0x0000000190ad99d8 -[CALayer layoutSublayers] + 144 
39 QuartzCore       0x0000000190ace4cc CA::Layer::layout_if_needed(CA::Transaction*) + 288 
40 UIKit        0x0000000193640500 -[UIView(Hierarchy) layoutBelowIfNeeded] + 1012 
41 UIKit        0x000000019363c7dc +[UIView(Animation) performWithoutAnimation:] + 100 
42 UIKit        0x0000000193971cbc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1068 
43 UIKit        0x0000000193971d88 -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 76 
44 UIKit        0x000000019395f320 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2300 
45 UIKit        0x0000000193976dec -[UITableView _performWithCachedTraitCollection:] + 112 
46 UIKit        0x0000000193712de8 -[UITableView layoutSubviews] + 172 
47 UIKit        0x000000019362ba80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1192 
48 QuartzCore       0x0000000190ad99d8 -[CALayer layoutSublayers] + 144 
49 QuartzCore       0x0000000190ace4cc CA::Layer::layout_if_needed(CA::Transaction*) + 288 
50 QuartzCore       0x0000000190ace38c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28 
51 QuartzCore       0x0000000190a4b3e0 CA::Context::commit_transaction(CA::Transaction*) + 248 
52 QuartzCore       0x0000000190a72a68 CA::Transaction::commit() + 508 
53 QuartzCore       0x0000000190a73488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 116 
54 CoreFoundation      0x000000018d7260c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28 
55 CoreFoundation      0x000000018d723cf0 __CFRunLoopDoObservers + 368 
56 CoreFoundation      0x000000018d724180 __CFRunLoopRun + 1020 
57 CoreFoundation      0x000000018d6522b8 CFRunLoopRunSpecific + 440 
58 GraphicsServices      0x000000018f106198 GSEventRunModal + 176 
59 UIKit        0x00000001936997fc -[UIApplication _run] + 680 
60 UIKit        0x0000000193694534 UIApplicationMain + 204 
61 MYAPP        0x000000010003ad3c main (AppDelegate.swift:26) 
62 ???         0x000000018c6355b8 0x0 + 0 

Thread 1: 
0 libsystem_kernel.dylib    0x000000018c729188 mach_msg_trap + 8 
1 CoreFoundation      0x000000018d7265d0 __CFRunLoopServiceMachPort + 188 
2 CoreFoundation      0x000000018d7241ec __CFRunLoopRun + 1128 
3 CoreFoundation      0x000000018d6522b8 CFRunLoopRunSpecific + 440 
4 Foundation       0x000000018e18f26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 
5 Foundation       0x000000018e1afdd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 
6 UIKit        0x000000019400dc38 -[UIEventFetcher threadMain] + 132 
7 Foundation       0x000000018e28ce68 __NSThread__start__ + 1020 
8 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
9 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
10 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 2: 
0 libsystem_kernel.dylib    0x000000018c729188 mach_msg_trap + 8 
1 CoreFoundation      0x000000018d7265d0 __CFRunLoopServiceMachPort + 188 
2 CoreFoundation      0x000000018d7241ec __CFRunLoopRun + 1128 
3 CoreFoundation      0x000000018d6522b8 CFRunLoopRunSpecific + 440 
4 CFNetwork       0x000000018de57a70 +[NSURLConnection(Loader) _resourceLoadLoop:] + 332 
5 Foundation       0x000000018e28ce68 __NSThread__start__ + 1020 
6 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
7 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
8 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 3: 
0 libsystem_kernel.dylib    0x000000018c729188 mach_msg_trap + 8 
1 CoreFoundation      0x000000018d7265d0 __CFRunLoopServiceMachPort + 188 
2 CoreFoundation      0x000000018d7241ec __CFRunLoopRun + 1128 
3 CoreFoundation      0x000000018d6522b8 CFRunLoopRunSpecific + 440 
4 CoreFoundation      0x000000018d7340ec _legacyStreamRunLoop_workThread + 264 
5 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
6 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
7 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 4: 
0 libsystem_kernel.dylib    0x000000018c74723c __select + 8 
1 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
2 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
3 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 5: 
0 libsystem_kernel.dylib    0x000000018c729188 mach_msg_trap + 8 
1 CoreFoundation      0x000000018d7265d0 __CFRunLoopServiceMachPort + 188 
2 CoreFoundation      0x000000018d7241ec __CFRunLoopRun + 1128 
3 CoreFoundation      0x000000018d6522b8 CFRunLoopRunSpecific + 440 
4 AVFAudio        0x00000001a7157d24 GenericRunLoopThread::Entry(void*) + 160 
5 AVFAudio        0x00000001a717dd9c CAPThread::Entry(CAPThread*) + 80 
6 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
7 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
8 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 6: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x00000001021480ac 0x102110000 + 229548 
2 TwilioChatClient      0x0000000102151c2c 0x102110000 + 269356 
3 TwilioChatClient      0x0000000102162c8c 0x102110000 + 339084 
4 TwilioChatClient      0x000000010215f7fc 0x102110000 + 325628 
5 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
6 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
7 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 7: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 8: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 9: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 10: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 11: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 12: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 13: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 14: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 15: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 16: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 17: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 18: 
0 libsystem_kernel.dylib    0x000000018c72d64c kevent + 8 
1 TwilioChatClient      0x000000010224f88c 0x102110000 + 1308812 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 

Thread 19: 
0 libsystem_kernel.dylib    0x000000018c746e1c __psynch_cvwait + 8 
1 TwilioChatClient      0x000000010224f834 0x102110000 + 1308724 
2 TwilioChatClient      0x000000010224f614 0x102110000 + 1308180 
3 TwilioChatClient      0x000000010224f2f8 0x102110000 + 1307384 
4 libsystem_pthread.dylib    0x000000018c80d850 _pthread_body + 236 
5 libsystem_pthread.dylib    0x000000018c80d760 _pthread_start + 280 
6 libsystem_pthread.dylib    0x000000018c80ad94 thread_start + 0 



Thread 0 crashed with ARM-64 Thread State: 
    pc: 0x000000018c747014  fp: 0x000000016fdcd430  sp: 0x000000016fdcd410  x0: 0x0000000000000000 
    x1: 0x0000000000000000  x2: 0x0000000000000000  x3: 0x0000000000000000  x4: 0x0000000000000000 
    x5: 0x0000000000000000  x6: 0x0000000000000001  x7: 0x0000000000000000  x8: 0x0000000008000000 
    x9: 0x0000000004000000 x10: 0x0000000000000000 x11: 0x000000000000000a x12: 0x0000000000000000 
    x13: 0x0000000000000035 x14: 0x0034003100780030 x15: 0x0037003700300033 x16: 0x0000000000000148 
    x17: 0x000000018d65ca34 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x00000001b2f01c40 
    x21: 0x0000000000000001 x22: 0x0000000103164000 x23: 0x0000000177f1c1c0 x24: 0x0000000000000000 
    x25: 0xbaddc0dedeadbead x26: 0x000000000000ffff x27: 0x0000000000000087 x28: 0x000000000000005c 
    lr: 0x000000018c80f450 cpsr: 0x0000000000000000 

Link Register Analysis: 
    Symbol: pthread_kill + 108 
    Description: We have determined that the link register (lr) is very likely to contain the return address of frame #0's calling function, and have inserted it into the crashing thread's backtrace as frame #1 to aid in analysis. This determination was made by applying a heuristic to determine whether the crashing function was likely to have created a new stack frame at the time of the crash. 
    Type: 1 

如果需要,我可以上传其余的堆栈跟踪。帖子的主体长度有限制。

+0

你使用Visual Contraints吗? – Larme

+0

是的,我们正在使用它们。他们是否在创造问题? – Baki

+0

有很多关于约束的调用,并且调用'[NSArray descriptionWithLocale:indent:]'这一事实让我觉得当调试器输出一个创建问题的约束数组时。你能用XCode调试器插入设备来重现自己的崩溃吗? – Larme

我不能给你一个确切的诊断,但也许这些观察可能有助于缩小可能性领域。

1)崩溃不在您的代码中(至少不是直接),因为堆栈跟踪仅包含系统/ UIKit调用。

2)错误发生在字符串的准备中,该字符串似乎是报告布局约束问题的错误(警报)消息。

3)尝试显示警报之前的调用表明布局约束正在尝试调整以将坐标舍入为整数值。

4)正在处理的布局是在准备一个UITableView单元格。但它可能不是在调用你的代码(即不在出队自定义的UITableViewCell中)。所以这将是tableview中的静态或标准单元格。

5)布局处理的模式似乎表明涉及“比例”约束,并且大小和比率产生的值超出了整数的大小。准备错误消息时出现错误的事实是导致我相信这可能与无效的数值有关。请注意,可能还有其他原因导致字符串失败,但通话的上下文与大量字符一致。

6)布局过程是由值观察员触发的,它不会调用您的代码(或者至少似乎没有)。问题的触发(用户操作)很可能是UI更改事件,它将自动处理(例如设备方向更改)。由于这发生在iPhone上,因此您可以排除拆分屏幕问题(只能在iPad上使用)。其他可能的事件将取决于您的应用程序的功能。

有了这个,你或许可以将可能性缩小到具有静态单元的UITableview的视图。这些单元格必须包含一些使用比例约束的子视图(例如宽高比,相对高度/宽度)。请注意,布局约束函数的名称表明这可能与tableView单元格和tableview之间自动设置的内部约束有关。事件如果是这样的话,在某些时候至少会涉及到你自己的一个限制。

如果你的应用程序没有大量的tableview,你可能可以把你的调查集中在用户操作的“自动”反应上,这些用户操作可以在你有的UITableviews上执行。鉴于这发生在iPhone上,您还需要通过展开segues或dismiss()来检查从模式视图返回的过渡。 iPhone和iPod经常会从演示VC中发布一些UI元素,这在某些情况下可能会导致不需要的行为。

希望这会有所帮助。

+0

嗨阿兰,谢谢你的详细报告,我会看看在这里,让你知道结果 – Baki

+0

嗨,Alain,这让我很好地理解错误是在哪里发生的,因为这是发生的时间,我已经更新了一些布局约束,现在我在等待反馈意见,谢谢 – Baki