2017-08-24 79 views
2

我們正在開發應用程序,該應用程序在堆棧跟蹤下發生崩潰。在調試過程中,我們暫時無法找到問題的根源。我知道這個問題與解除分配的對象有關。如果有人能夠指導我上課或觀看方向,或者是導致問題的事情,我會很樂意欣賞。謝謝線程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

我不能給你一個確切的診斷,但也許這些觀察可能有助於縮小可能性領域。

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

相關問題