Instruments LeakChecker

How do I get the LeakChecker of Instruments to work?

I’ve added the get task allow key to the entitlements. The TimeProfiler works but the LeakChecker only gives me a finger salute.

A Xcode app similar problem was said as a signing Issue:

This agent is part of the DVTInstrumentsFoundation.framework, missing dylib? Permissions?

Check logs.

Without codesign I can’t use full disk access or the keychain. But I tried and there was no change in the error message.

I think you will need to wait for a @William_Yu and/or @Sam_Rowlands take a look at the issue as Xojo internals and macOS experts respectively.

Tsck… Here’s where I admit that I don’t use Xcode’s leak checker any more. Over the years it’s become increasingly more difficult to get it to “just work” so, I’ve basically given up.

I tend to rely on my gut and my own tools to narrow down leaks. The Xojo weakRef is an invaluable tool to detect if you have circular references or using addressOf when you should be using weakAddressOf.

If I find what I believe is an Apple API to be leaking, I first make sure that I’m following the correct memory management procedure for that value (as indicated by the function name which creates it).

If I’m pretty certain that I’m doing it correctly and it is still leaking, then I generally look for an alternative API or if I can, I create my functions to accomplish that task.

However “Get Task-allow” is supposed to be the Harden Runtime key that allows a debugger to connect. You could also try, disabling “Harden Runtime” for debugging.

1 Like

I’ve used the LeakChecker to find occasional bugs in the MBS plugin.

I’ll try in the next weeks with Mammoth/Redmond/whatever. If I can’t get the LeakChecker working there I’ll try the Apple development forums.

1 Like

Yep, I guess that a “hardened runtime” blocks code injection, and a leak checker agent needs it, so such access would be denied. A code being debugged for such end should be run in a “soften” mode. :rofl:

1 Like

That’s what the “get task allow” key in the entitlements is for. But the Leak Checker doesn’t work with codesign/entitlements and it doesn’t work without them.

1 Like

Have you read the contents surrounding this key?

Maybe a question of tweaking a set of permissions.

1 Like