-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
layoutSubviews swizzling causes an infinite loop #495
Comments
Hey @artgoncharov , Would you be able to include your code on here? If not, feel free to share code that mimics the issue. It'll help further narrow down the issue to figure out what's going on. Thanks! |
Hello @check4ismail I've attached the sample project in the description. I will dup the link here Sample project |
Hey @artgoncharov , Here's what I've done so far:
I wasn't able to replicate the issue and was able to pull up the keyboard as expected from Textfield after tapping the Toggle Skeleton button. Is there anything else I'm missing here just to make sure we're on the same page? |
@check4ismail just to make sure, did you set up the floating keyboard before? Also, run the app in slide over mode (check the vid). BTW, you can use Reproduce Infinite Loop button. Thank you in advance! |
Appreciate you mentioning those things as well. And correct, I was able to do the following at the same time: 1) type onto the Textfield using a floating keyboard, 2) make sure the app is running in slide over mode If you're curious about the sequence of events here it is below:
|
I think we need someone else to try. I just tried to reproduce on a fresh install and I'm still able to reproduce. |
Hi! I've downloaded the project and I can reproduce this issue. I'm not exactly sure what it's happening 🤔 The steps to reproduce it are:
Screen.Recording.2022-03-22.at.13.50.47.mov |
@Juanpe it's an infinite loop :) if you remove this swizzling https://github.com/Juanpe/SkeletonView/blob/main/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView%2BSwizzling.swift#L34 you won't get this issue |
Yeah, exactly, but the question is what is the cause of this infinite loop 😅 I can see that when the keyboard appears, some constraints are broken and it seems could be the cause 🤔 |
Yes, and one more thing, it's reproduced only for textfields with input accessory view, some layout work is done there |
Hi, any news on this? Im seeing the same thing, when updating collectionviews and am eager to hear how we can aviod this loop |
I'm facing the same problem (version 1.8.2) |
Same issue. Any updates here? |
Fix an infinite loop caused by calling skeletonLayoutSubviews within itself. This sometimes can cause an infinite loop and a crash.
This is currently a trending crash in my app. Any updates on this? Is this fixed by: #574? |
fix infinite loop crash - issue Juanpe#495
Remove layout subviews to fix infinite loop crash: Juanpe#495
Description
layoutSubviews swizzling causes issues for UIKit.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
SkeletonView Environment:
SkeletonView version: 1.29.2
Xcode version: 13.2.1
Swift version: 5
Steps to reproduce:
Expected result:
Keyboard is shown
Actual result:
App freezes in the infinite loop
Attachments:
Logs, screenshots, sample project, funny gif, etc.
loop480.mov
Sample project
The text was updated successfully, but these errors were encountered: