Mac: profiler-load load_native reports 'Memory leaks: 0' for a Time Profiler recording that never checked leaks
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- macos, typescript, xml
- Domain
- tooling
Research direction
Start with the leak-detection path in native-profiler/platforms/ios.ts (leaksDetailExported around lines 971-976, and the note near line 832) and the loadNativeSession Mac handling in query/profiler-load.ts around lines 413-438. The reproduction uses the LEAKS_NOT_CHECKED fixture in test/ios-instruments/macos-analyze-report.test.ts. Done means load_native reports leaks as not recorded for an empty Time Profiler export, matching what native-profiler-analyze says. Note the work touches code from an unmerged branch, so confirm the base before editing.
Written by the indexing model from the issue text.
Description
[Diplomat, Opus 5.5]: Found while reviewing #1883. The code comes from #1875 (feat/macos-profiling, 73ea75e3d) and is not on main.
Problem
On a Mac app, native-profiler-analyze counts a leaks export as leak data only when it holds the Leaks detail (native-profiler/platforms/ios.ts:971-976, leaksDetailExported). With template_path: "Time Profiler", Xcode 26.6's xctrace exports an empty <trace-query-result> and exits 0. That is the template the Mac leak-check note (ios.ts:832) tells the agent to re-record with.
Its twin loadNativeSession has no Mac branch. It sets leaksRecorded: files.leaks != null (query/profiler-load.ts:414) and prints Memory leaks: ${files.leaks ? memoryLeaks.length : "not recorded"} (:438). The comment at :413 ("Stop writes no raw_leaks.xml when the trace had no Leaks table") does not hold for this case.
Repro
Through the real tool-server, on a Mac app session whose raw_leaks.xml is the empty export (the LEAKS_NOT_CHECKED fixture from test/ios-instruments/macos-analyze-report.test.ts):
profiler-load {mode: "load_native", ...}->- Memory leaks: 0profiler-stack-query {mode: "leak_stacks"}->_No memory leaks detected._native-profiler-analyzeon the same files ->No leak data was recorded, so memory leaks were not checked. Do not report the app as leak-free.
Impact
After a reload (a before/after comparison, or a tool-server restart), the agent is told that a Time Profiler recording found no leaks, when leaks were never checked.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 154
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 88
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from software-mansion/argent
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
software-mansion/argent#1946 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
software-mansion/argent#1940 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion/argent#1931 ·
Maintainers usually reply within 1 day
-
b:nitpick
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
software-mansion/argent#1930 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
software-mansion/argent#1929 ·
Maintainers usually reply within 1 day
All issues in software-mansion/argent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
nip98: validateEvent skips the payload check for a string or bytes bodyMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nbd-wtf/nostr-tools#599 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LemmyNet/lemmy-ui#4442 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Zettlr/Zettlr#6664 · 1 comment ·
Maintainers usually reply within 1 day
-
Microsoft Outlook add attachment reads the binary field from item 0Possibly taken @joshbarros claimed this today. Openstatus:in-linear
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
n8n-io/n8n#44021 · 2 comments ·
Maintainers usually reply within 1 day