-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SnapKit Crash in iOS 16.1 #764
Comments
sumupButton.snp.makeConstraints { make in |
16.1 AutoLayout crash。does anyone met? |
@LeeZhe There’s not enough here to recreate the bug - if you could share a project, or more of the relevant code, maybe someone could take a look. |
@colinta
The above is the crash stack information, but the normal layout is used. The system crash method of
and the project example code is
|
@LeeZhe what is the superview of contentView? SnapKit (and autolayout) typically add constraints to the most common ancestor of two views involved in a constraint. |
@robertjpayne the superview of contentView is collectionViewCell view, i'm not sure equalToSuperview is the crash reason, you can see the crash stack. |
@LeeZhe unfortunate the stack trace isn't much information. Do you have more coming from Xcode in terms of stack variables or any fatal messages in the console log? Typically crashes are caused because there is no common parent to attach the constraints to, or something isn't in the view hierarchy. SnapKit issues You could try altering your view setup from:
To
Worth a shot to see if its related to the superview. |
|
I have the same Crash stack,How to fix? |
@robertjpayne how to fix the issue? iOS 16.1 16.2 has crash occasionally. |
I can't reproduce this crash so it's hard for me to comment here. Instead of using It seems like superview is being a bit buggy with collection views? |
It seems ok to use |
I have the same Crash , help |
|
@LOVEY9527 I have added your QQ,by your email,the crash has sharp decline about 3.20, can you accept by friend Invitation |
Have you solved it now? |
libobjc.A.dylib
objc_release + 8
1
CoreAutoLayout
0x00000001efda0000 + 46480
2
_$sSo18NSLayoutConstraintC4item9attribute9relatedBy6toItemAD10multiplier8constantAByp_So0A9AttributeVSo0A8RelationVypSgAJ12CoreGraphics7CGFloatVAPtcfCTO + 340
3 _$s7SnapKit10ConstraintC4from2to8relation14sourceLocation5label10multiplier8constant8priorityAcA0C4ItemC_AmA0C8RelationOSS_SutSSSgAA0C16MultiplierTarget_pAA0c8ConstantP0_pAA0c8PriorityP0_ptcfc + 1024
4
$s7SnapKit21ConstraintDescriptionC10constraintAA0C0CSgvgAGyXEfU + 376
5
_$s7SnapKit21ConstraintDescriptionC10constraintAA0C0CSgvg + 40
6
_$s7SnapKit15ConstraintMakerC18prepareConstraints4item7closureSayAA0C0CGAA06LayoutC4Item_p_yACXEtFZTf4enn_nSo6UIViewC_Tg5 + 264
7
_$s7SnapKit15ConstraintMakerC15makeConstraints4item7closureyAA06LayoutC4Item_p_yACXEtFZTf4enn_nSo13UILayoutGuideC_Tg5Tm + 24
The text was updated successfully, but these errors were encountered: