AccessViolationException when profiling
slaneyrw
Posts: 46
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 \Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 109
at TFSTracker.WorkItemManager..ctor() in \Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 32
at TFSConnectTester.Program.Main(String[] args) in \Projects\Trigger\TFSConnectTester\Program.cs:line 14
Sample Code :
tfsServer = new TeamFoundationServer(serverName);
workItemStore = tfsServer.GetService(typeof(WorkItemStore)) as WorkItemStore;
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 \Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 109
at TFSTracker.WorkItemManager..ctor() in \Projects\Trigger\PVCSTriggerLib\TFSTracker\WorkItemManager.cs:line 32
at TFSConnectTester.Program.Main(String[] args) in \Projects\Trigger\TFSConnectTester\Program.cs:line 14
Sample Code :
tfsServer = new TeamFoundationServer(serverName);
workItemStore = tfsServer.GetService(typeof(WorkItemStore)) as WorkItemStore;
Comments
Thanks!
I've got the trial version right now, but I am getting the error when I try to run the performance profiler in Detailed Mode. It works fine in Fast Mode, but errors in Detailed Mode.
Thanks!
Ryan
I've emailed you information about the patch.
Thanks,
Coen