ios - Foundation -[NSConcreteMapTable 分配 :key:value:isNew:] Crashed: com. apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at

标签 ios ios7 crash-reports crashlytics

我有一个只在 IOS 7 中发生的崩溃,我无法重现它,但它经常发生。有人有答案或至少知道问题出在哪里吗? 我已经删除了所有关于 ios7 的警告,但崩溃仍然发生。 附上日志。

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x3b43c626 objc_msgSend + 5
1  Foundation                     0x315a9681 -[NSConcreteMapTable assign:key:value:isNew:] + 68
2  Foundation                     0x315a95fb -[NSConcreteMapTable setObject:forKey:] + 82
3  Foundation                     0x315ecaf7 -[NSISEngine setRowWithHead:body:] + 30
4  Foundation                     0x315ef5d1 -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 388
5  Foundation                     0x315ed325 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 236
6  Foundation                     0x315efd9f -[NSISEngine tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:] + 226
7  Foundation                     0x315eb5fd -[NSISEngine tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:] + 692
8  Foundation                     0x315eb23b -[NSLayoutConstraint _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:] + 286
9  Foundation                     0x315e8f6d -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 232
10 Foundation                     0x315f47ed -[NSLayoutConstraint _addToEngine:] + 28
11 UIKit                          0x33591c55 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 332
12 Foundation                     0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
13 UIKit                          0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
14 UIKit                          0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
15 UIKit                          0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
16 Foundation                     0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
17 UIKit                          0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
18 UIKit                          0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
19 UIKit                          0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
20 Foundation                     0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
21 UIKit                          0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
22 UIKit                          0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
23 UIKit                          0x33591bbb __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 178
24 Foundation                     0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
25 UIKit                          0x33591ad9 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 336
26 UIKit                          0x3349e20d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 200
27 UIKit                          0x3349de33 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 82
28 Foundation                     0x315e8b2b -[NSISEngine withBehaviors:performModifications:] + 210
29 UIKit                          0x3349dcd3 -[UIView(Hierarchy) _postMovedFromSuperview:] + 298
30 UIKit                          0x334aaa4f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1414
31 UIKit                          0x334aa4bf -[UIView(Hierarchy) addSubview:] + 30
32 UIKit                          0x3358bdb7 -[UITransitionView transition:fromView:toView:removeFromView:] + 978
33 UIKit                          0x335cbf3f -[UITransitionView transition:fromView:toView:] + 30
34 UIKit                          0x335cbf15 -[UITransitionView transition:toView:] + 104
35 UIKit                          0x335cb03b -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 1106
36 UIKit                          0x335cabdf -[UITabBarController transitionFromViewController:toViewController:] + 38
37 UIKit                          0x335caab7 -[UITabBarController _setSelectedViewController:] + 258
38 UIKit                          0x33694dd5 -[UITabBarController _tabBarItemClicked:] + 272
39 UIKit                          0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
40 UIKit                          0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
41 UIKit                          0x33694c8b -[UITabBar _sendAction:withEvent:] + 370
42 UIKit                          0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
43 UIKit                          0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
44 UIKit                          0x334d3fb1 -[UIControl sendAction:to:forEvent:] + 44
45 UIKit                          0x334bf717 -[UIControl _sendActionsForEvents:withEvent:] + 374
46 UIKit                          0x336949ab -[UITabBar(Static) _buttonUp:] + 118
47 UIKit                          0x334d4037 -[UIApplication sendAction:to:from:forEvent:] + 90
48 UIKit                          0x334d3fd7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
49 UIKit                          0x334d3fb1 -[UIControl sendAction:to:forEvent:] + 44
50 UIKit                          0x334bf717 -[UIControl _sendActionsForEvents:withEvent:] + 374
51 UIKit                          0x334d3a2f -[UIControl touchesEnded:withEvent:] + 590
52 UIKit                          0x334d3701 -[UIWindow _sendTouchesForEvent:] + 528
53 UIKit                          0x334ce6cb -[UIWindow sendEvent:] + 758
54 UIKit                          0x334a38cd -[UIApplication sendEvent:] + 196
55 UIKit                          0x334a1f77 _UIApplicationHandleEventQueue + 7102
56 CoreFoundation                 0x30c4d20b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
57 CoreFoundation                 0x30c4c6db __CFRunLoopDoSources0 + 206
58 CoreFoundation                 0x30c4aecf __CFRunLoopRun + 622
59 CoreFoundation                 0x30bb5ebf CFRunLoopRunSpecific + 522
60 CoreFoundation                 0x30bb5ca3 CFRunLoopRunInMode + 106
61 GraphicsServices               0x35abb663 GSEventRunModal + 138
62 UIKit                          0x3350214d UIApplicationMain + 1136

最佳答案

我遇到了同样的问题。奇怪的是它只出现在 3.5inch 设备(ip4,ip4S),os7.x。在 ip5 上工作正常。

更新:我们的团队找到了根本原因。这是因为我们在代码中使用了这个动画。

[UIView animateWithDuration:0.4f delay:0 usingSpringWithDamping:0.5f initialSpringVelocity:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
                self.transform = CGAffineTransformMakeScale(sx,sy);
            } completion:^(BOOL finished) {
                self.hidden = !visible;
            }];

为了修复错误,我们避免在 iOS <8.0 时运行动画

 if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1) {
        [UIView animateWithDuration:0.4f delay:0 usingSpringWithDamping:0.5f initialSpringVelocity:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
            self.transform = CGAffineTransformMakeScale(sx,sy);
        } completion:^(BOOL finished) {
            if (finished) {
                self.hidden = !visible;
            }
        }];
    } else {
        self.transform = CGAffineTransformMakeScale(sx,sy);
        self.hidden = !visible;
    }

希望对您有所帮助!

关于ios - Foundation -[NSConcreteMapTable 分配 :key:value:isNew:] Crashed: com. apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29899632/

相关文章:

ios - 如何确定我的 SIGTrap 崩溃的原因?

ios - 使用 WebView 下载文件

ios7 - iOS 7 使用 HTML 字符串作为 NSAttributedString 并设置字体?

ios - Background Fetch iOS - 已终止的应用程序

ios - 如何从锁定屏幕控制 AVPlayer 的播放和暂停。以及如何在锁定屏幕上设置应用程序图像

ios - 不同的崩溃报告但相同的崩溃?

ios - 如何设置对类成员的弱引用,例如回调方法?

ios - 根据来源不同,Unwind Segue 也不同

objective-c - NSHTTPCookieStorage 状态未在应用退出时保存。那里有任何明确的知识/文档吗?

ios数组崩溃多线程问题,线程安全