Make sure opening and closing a window doesn't leak any Objective C objects and ports
Categories
(Core :: Widget: Cocoa, defect, P3)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
We seem to be leaking mach ports over time (see bug 1755701) and it's not clear what's causing it.
As a tractable sub-investigation, we should check whether opening and closing a window leaks things that we would expect to not be leaked. I'm especially thinking of Objective C objects related to NSWindow / NSEvent / CALayer that we might not be cleaning up properly. Those objects then in turn could be holding on to mach ports.
Comment 1•3 years ago
|
||
Is there an easy way to check how many open ports we have, and if so, would it make sense to check it before and after every automated tests to assert the number is the same?
Reporter | ||
Comment 2•3 years ago
|
||
There used to be an easy way, but it seems it was broken on macOS 12: sudo lsmp -p <pid>
. In the past, this command printed a nice list of open ports for that process. But on macOS 12 this command now prints gigabytes of useless output. (I've filed this as FB9957317.)
So we might only be able to debug this reliably on macOS 11.
As for Objective C object leaks, I think Instruments has a tool for that but I have never used it successfully.
I don't think we'll have something we can reliably check between tests.
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:spohl, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Description
•