0 Replies
      Latest reply on Apr 4, 2019 8:16 AM by dashadrick
      dashadrick Level 1 Level 1 (0 points)

        I'm trying to find memory leaks in my application with either Memory Graph or Inspector.  I'm getting the following errors:

         

        • Memory Graph - Unable to acquire required task port
        • Inspector
          • Prompts for password
          • Error: Failed to attach to target process
          • An error occurred trying to capture Leaks data.
          • Unable to acquire required task port ()

         

        The odd thing is that both work on initial execution of the target, but every subsequent launch triggers the above errors. (including after restarting xcode and after reboot).

         

        If I change my target name it works one time and then the errors start again.  So the target name is being cached somewhere and causing subsequent testing with that name impossible.

         

        I'm running xCode 10.2 and Mac OS 10.14.4.

         

        Some more context and ugly work around.  This is a swift server app and  I'm using swift package manager to generate the xcode project. The following works  and avoids the above errors, but it is a hassle.

         

        • swift package generate-xcodeproj
        • open projName.xcodeproj
        • build and run
        • click Debug Memory Graph button.  App Stopped and Memory Graph displays fine.  If I stop the app and run again then I get the above errors.
        • stop the app
        • change the target name in Package.swift
        • swift package generate-xcodeproj
        • open projName.xcodeproj
        • build and run
        • Memory Graph works one time again
        • rinse and repeat

         

        I've found that using Inspector exhibits the same behavior.

         

        Any help would be appreciated.

         

        Thanks,

        Dana