mirror of
https://github.com/ProxymanApp/atlantis.git
synced 2026-04-26 08:26:04 +03:00
[GH-ISSUE #82] getAllClasses() goes in a loop #54
Labels
No labels
Done
Done
Windows
bug
bug
bug
enhancement
enhancement
enhancement
good first issue
hacktoberfest
pull-request
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/atlantis#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andy3a on GitHub (Aug 17, 2021).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/82
Originally assigned to: @NghiaTranUIT on GitHub.
Hi Nghia,
I faced with the situation when device/simulator starts consuming huge memory amount and hangs as a result. I don't know why this happens, because this is not a persistent issue and it appears from time to time (I don't see specific cause).
This is the evidence from Debug navigator:

And as per profiler looks like getAllClasses is responsible for that:

so there are more than 40 000 calls of it...
device iOS version: 14.6 (reproduced for simulators as well)
Xcode: Version 12.5.1 (12E507)
please let me know I should provide some more details
Thanks,
Andrew
@NghiaTranUIT commented on GitHub (Aug 17, 2021):
Hey @andy3a thanks for your report.
Runtime.getAllClasses()should only be executed once when the app is starting. If it executes multiple times (as your screenshot), I suppose there is a bug somewhere.I will replace it with a better version and send you a beta this week 👍
@NghiaTranUIT commented on GitHub (Aug 17, 2021):
Just wondering:
I would like to reproduce it in my machine 💻
@andy3a commented on GitHub (Aug 17, 2021):
yes, I'm using Alamofire 5.4.3
@NghiaTranUIT commented on GitHub (Aug 17, 2021):
Hey @andy3a if you don't mind, please check out this commit and share with me if it works for you 👍
Changelog
SMP
70425e4a0895ec483dfdb5b99cfba91bec6ac935Cocoapod
@andy3a commented on GitHub (Aug 17, 2021):
thanks for you effort @NghiaTranUIT
successfully deployed the commit.
I'll need to use it for couple days to see if the issue can be reproduced unless you know how to reproduce the situation when the issue appeared in previous version
cheers
@andy3a commented on GitHub (Aug 17, 2021):
hi @NghiaTranUIT,
I have reproduced the issue:



@NghiaTranUIT commented on GitHub (Aug 18, 2021):
It's odd that this array of AnyClass doesn't release when it exits the function 🤔
@andy3a Please try this commit
29088bc9b752498cdb74051c962855f2de77e52a, which I disable the Method Swizzling on NSURLConnection.@andy3a commented on GitHub (Aug 23, 2021):
Hi @NghiaTranUIT,
I'm sorry but the issue has been reproduced again.
... for the latest fix provided

I could provide some details form Profiler if needed. Feel free to request the data you may need for investigation.
p.s. could it be like I do smth wrong? itbh I don't see where I could do anything wrong, but maybe you have an idea...
Andy