Options

AccessViolationException when profiling

I'm getting the following exception when trying to profile an application that connects to TeamFoundationServer.

Exception : AccessViolationException
Message : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Stack Trace

at ATL.AtlInternalQueryInterface(Void* pThis, _ATL_INTMAP_ENTRY* pEntries, _GUID* iid, Void** ppvObject)
at ATL.CComObject<CPsMetadataCacheSession>.QueryInterface(CComObject<CPsMetadataCacheSession>* , _GUID* iid, Void** ppvObject)
at CProdStudioBackendChannel.HrReinitCache(CProdStudioBackendChannel* )
at CProdStudioBackendChannel.HrInitialize(CProdStudioBackendChannel* , Char* pwzUrl, IPsMetadataCacheControl* pControl, Int32 hCredentials, CProdStudioDataStore* pStore, String callingProcessIdentity)
at CProdStudioDataStore.HrRefreshCache(CProdStudioDataStore* , Boolean fResynchOnly, Boolean bInit, Boolean fNoFire, Boolean fByPassFireOnThis, Int32 hCredentials, Char* bstrUserAccountName, Char* bstrUserFriendlyName, Char* bstrUserSid)
at CProdStudioDataStore.ConnectEx(CProdStudioDataStore* , Char* bstrUrl, Int32 hCredentials, Char* bstrDefaultCachePath, Char* bstrInstanceId, Char* bstrUserAccountName, Char* bstrUserFriendlyName, Char* bstrUserSid)
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreClass.ConnectEx(String connectionString, Int32 hCredentials, String defaultCachePath, String instanceId, String userSamName, String userFriendlyName, String userSid)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.InitializeInternal()
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Microsoft.TeamFoundation.Client.ITeamFoundationServerObject.Initialize(TeamFoundationServer teamFoundationServer)
at Microsoft.TeamFoundation.Client.TeamFoundationServer.CreateITFSObjectInstance(Type serviceType)
at Microsoft.TeamFoundation.Client.TeamFoundationServer.GetService(Type serviceType)
at TFSTracker.WorkItemManager.Connect() in D:\Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 109
at TFSTracker.WorkItemManager..ctor() in D:\Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 32
at TFSConnectTester.Program.Main(String[] args) in D:\Projects\Trigger\TFSConnectTester\Program.cs:line 14


Sample Code :

tfsServer = new TeamFoundationServer(serverName);
workItemStore = tfsServer.GetService(typeof(WorkItemStore)) as WorkItemStore;

Comments

Sign In or Register to comment.