Skip to content
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

Out of Memory in NSMutableAttributedString+MutableAttributedStringHook.m #138

Open
Micheal-Long opened this issue Apr 3, 2023 · 4 comments

Comments

@Micheal-Long
Copy link

您好,我们在使用JJException时,最近收到大量Out of Memory的崩溃信息,定位到NSMutableAttributedString+MutableAttributedStringHook.m文件中的113行:[self hookReplaceCharactersInRange:range withString:str];
使用的版本是0.2.12版本

@jezzmemo
Copy link
Owner

jezzmemo commented Apr 3, 2023

为什么确定是这个地方导致的呢?

@Micheal-Long
Copy link
Author

Micheal-Long commented Apr 4, 2023

我们集成的UAPM,定位到的位置就是这里。奇怪的的是,以前没有遇到过,就最近几天很多。同时也使用多台设备测试,确没有复现
截屏2023-04-04 11 32 21

@jezzmemo
Copy link
Owner

jezzmemo commented Apr 4, 2023

这个地方我检查过了,逻辑很简单,检查边界点,然后调用origin方法,仔细检查你最近的变化点,有可能是其他地方触发了OOM

@Micheal-Long
Copy link
Author

好的,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants