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

fix: try to fix memory issue(#499) by refreshing shared instance after every sessionDidActive #500

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zhangciwu
Copy link

每次唤醒更新一下instance,看下能否解决这个问题

@baltic-sea-origin
Copy link

无故退出的问题解决了吗?...之前困扰了好久

直到升级到macOS 12.4 后似乎没出现过了

@zhangciwu
Copy link
Author

无故退出的问题解决了吗?...之前困扰了好久

直到升级到macOS 12.4 后似乎没出现过了

我改了但是我自己build会出错…… 所以暂时没有验证

@zhangciwu
Copy link
Author

@Caldis 可否请教一下build有什么需要注意的?目前有这些build error(swift已经改成4)
image
image

@Caldis
Copy link
Owner

Caldis commented Jul 18, 2022

@Caldis 可否请教一下build有什么需要注意的?目前有这些build error(swift已经改成4) image image

这个是依赖版本的问题,在最新的 master 已经升级了,可以 pull 下来试试看

@zhangciwu
Copy link
Author

zhangciwu commented Jul 18, 2022

这个是依赖版本的问题,在最新的 master 已经升级了,可以 pull 下来试试看

已经编译成功,我本地跑几天试试看看 @Caldis

@zhangciwu
Copy link
Author

zhangciwu commented Jul 19, 2022


2022-07-19 14:57:36.934550+0800 Mos[12372:7985823] [] [0x11e815c00] CVDisplayLinkStart
2022-07-19 14:57:36.934669+0800 Mos[12372:7985823] [] [0x11e815c20] CVDisplayLink::start
2022-07-19 14:57:36.935150+0800 Mos[12372:8425480] [] [0x6000035cdce0] CVXTime::reset
Mos(12372,0x16ba5f000) malloc: Double free of object 0x11db22b20
Mos(12372,0x16ba5f000) malloc: *** set a breakpoint in malloc_error_break to debug
Mos(12372,0x16ba5f000) malloc: Double free of object 0x11db22b20
(lldb) 

发生在这里:

// 新发布的事件将早于 EventTapCallback 所处理的事件进入系统, 也如同 EventTapCallback 所处理的事件, 会被所有后续的 EventTap 接收
            eventClone.tapPostEvent(proxyClone)

还是出错了,不过貌似有点头绪了

@zhangciwu
Copy link
Author

上个commit之后,目前这个版本 两天没有意外退出

@zhangciwu
Copy link
Author

三天没有意外退出
@Caldis 你有空也可以试试?

@zhangciwu
Copy link
Author

差不多6天了,没有意外退出

@zhangciwu
Copy link
Author

zhangciwu commented Jul 28, 2022

@Caldis 感觉可以merge了,没有遇到过意外退出了,或者你看看代码有什么问题没

@zhangciwu
Copy link
Author

又出现了%…… 这次是运行一周后

2022-08-08 08:53:20.836822+0800 Mos[70392:11129491] [] [0x124008220] Bad CurrentVBLDelta for display 3 is zero. defaulting to 60Hz.
2022-08-08 08:53:20.852873+0800 Mos[70392:11129491] [] CurrentVBLDelta returned 0 for display 3 -- ignoring unreasonable value
2022-08-08 08:53:20.853001+0800 Mos[70392:11129491] [] [0x124008220] Bad CurrentVBLDelta for display 3 is zero. defaulting to 60Hz.
Mos(70392,0x10108c580) malloc: Heap corruption detected, free list is damaged at 0x6000020f1700
*** Incorrect guard value: 22
Mos(70392,0x10108c580) malloc: *** set a breakpoint in malloc_error_break to debug
Mos(70392,0x10108c580) malloc: Heap corruption detected, free list is damaged at 0x6000020f1700
*** Incorrect guard value: 22
(lldb) 

@zhangciwu
Copy link
Author

mos-08-09-mem-crash.log
再次崩溃

@zhangciwu
Copy link
Author

再次崩溃,好像崩溃每次的原因并不完全相同(不过都是内存错误)

2022-08-09 23:07:30.894563+0800 Mos[53692:13092597] Module initialized: Options
2022-08-09 23:07:30.932576+0800 Mos[53692:13092597] Option readed
2022-08-09 23:07:30.947552+0800 Mos[53692:13092597] Normal Initialization
2022-08-09 23:07:30.947624+0800 Mos[53692:13092597] Module initialized: ScrollCore
2022-08-09 23:07:30.951223+0800 Mos[53692:13092597] Module initialized: ScrollPoster
2022-08-09 23:07:30.967020+0800 Mos[53692:13092597] Module initialized: ScrollPhase
2022-08-09 23:07:38.831108+0800 Mos[53692:13092597] Module initialized: ScrollUtils
2022-08-10 01:34:12.105722+0800 Mos[53692:13092597] [default] invalid display identifier 27130A30-7286-4B3C-BBDE-6DD3285BA546
Mos(53692,0x1039a8580) malloc: Non-aligned pointer 0x60000239c300 being freed (2)
Mos(53692,0x1039a8580) malloc: *** set a breakpoint in malloc_error_break to debug
Mos(53692,0x1039a8580) malloc: Non-aligned pointer 0x60000239c300 being freed (2)
(lldb) 

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

Successfully merging this pull request may close these issues.

None yet

3 participants