4 Replies Latest reply on May 31, 2012 3:45 PM by fswehosky

    "The profile file could not be written"

    kmcor

      Hi,

       

      I am trying to profile a simple test code with AMD Code Analyst, but didn't have any luck so far. After setting up the project and clicking the green start button, my code seems to run (judging from the console output), and then an error message appears saying "The profile file could not be written".

       

      I have tried to put my code and its working dir in different locations on the hard disk, have tried different codes, and have tried it on two different Windows installations (both of them Windows 7), same result everywhere.

       

      I think I must be missing something very simple and obvious - any ideas? Googling the error message did not yield any useful results, anybody here who encountered the same message?

        • Re: "The profile file could not be written"
          kalyanpk

          Hi kmcor,

          what kind of profile are you running and what are the settings that you are using?

          can you provide the platform details?

          • Re: "The profile file could not be written"
            mrphik

            I confirm that I have experienced the same problem in CodeAnalyst 3.5.111.0865: "There was a problem writing the profile to the file, error code 0xffffffff80070005 Did not have write access to the given path Please try again." I am using Visual Studio 2005 on Windows Server 2008R2. This problem has never occured in CodeAnalyst 3.3 or 3.2.

             

            Interestingly, the problem does not occur 100% of the time. Quitting VisualStudio, deleting the CodeAnalyst folder, and recreating the CodeAnalyst project from scratch usually fixes it. Sometimes, it works the first time around. I have so far been unable to discern a pattern in the appearance of this problem.

             

            Please note that I cannot upgrade to versions later than 3.5.111.0865 because they are incompatible with 32-bit IDEs on 64-bit Windows.

              • Re: "The profile file could not be written"
                kmcor

                The problem persists in CodeAnalyst 3.6.1197 (Windows 7 64bit) - in contrast to the previous poster, CodeAnalyst has so far never worked for me, though I have tried on a number of different machines (all Windows 7 64 bi)

                 

                The relevant part of procmon's log seems to be this (note the "file locked with only readers") towards the end.

                 

                Time of DayProcess NamePIDOperationPathResultDetail
                47:52.1CodeAnalyst.exe3996CreateFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSDesired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
                47:52.1CodeAnalyst.exe3996ReadFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSOffset: 0, Length: 400, Priority: Normal
                47:52.1CodeAnalyst.exe3996CreateFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSDesired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
                47:52.1CodeAnalyst.exe3996QueryBasicInformationFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSCreationTime: 5/29/2012 2:47:49 PM, LastAccessTime: 5/29/2012 2:47:49 PM, LastWriteTime: 5/29/2012 2:47:51 PM, ChangeTime: 5/29/2012 2:47:51 PM, FileAttributes: A
                47:52.1CodeAnalyst.exe3996CloseFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESS
                47:52.1CodeAnalyst.exe3996ReadFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdEND OF FILEOffset: 400, Length: 4,096
                47:52.1CodeAnalyst.exe3996CreateFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSDesired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
                47:52.1CodeAnalyst.exe3996ReadFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSOffset: 0, Length: 400, Priority: Normal
                47:52.1CodeAnalyst.exe3996CreateFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSDesired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
                47:52.1CodeAnalyst.exe3996QueryBasicInformationFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSCreationTime: 5/29/2012 2:47:49 PM, LastAccessTime: 5/29/2012 2:47:49 PM, LastWriteTime: 5/29/2012 2:47:51 PM, ChangeTime: 5/29/2012 2:47:51 PM, FileAttributes: A
                47:52.1CodeAnalyst.exe3996CloseFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESS
                47:52.1CodeAnalyst.exe3996ReadFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdEND OF FILEOffset: 400, Length: 4,096
                47:52.1CodeAnalyst.exe3996CloseFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESS
                47:52.1CodeAnalyst.exe3996CreateFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSDesired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened
                47:52.1CodeAnalyst.exe3996CreateFileMappingC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdFILE LOCKED WITH ONLY READERSSyncType: SyncTypeCreateSection, PageProtection:
                47:52.1CodeAnalyst.exe3996QueryStandardInformationFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSAllocationSize: 400, EndOfFile: 400, NumberOfLinks: 1, DeletePending: False, Directory: False
                47:52.1CodeAnalyst.exe3996CreateFileMappingC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESSSyncType: SyncTypeOther
                47:52.1CodeAnalyst.exe3996CloseFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESS
                47:52.1CodeAnalyst.exe3996CloseFileC:\tmp\caproj\Session 2.tbp.dir\Session 2.tbp.prdSUCCESS
                  • Re: "The profile file could not be written"

                    Hi guys,

                     

                    What were your profile session settings?  We can only do so much without reproducing the issue.  It looks like you were able to take the profile, but unable to translate the data to an aggregated profile data file.  How big were the .prd files?  Could you zip a problematic .prd and .ti file and attach it for us to try?

                     

                    Thanks,

                    -=Frank