Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I realized that this is happening months ago when I was not able to alter table structure in an instance of ArcMap after another instance was closed. When, for example, I remove or add some fields to a feature class in ArcMap, save and close the document and open ArcCatalog and attempt to delete that particular Feature Class I get the Delete Failed: Failed to delete selected object(s) error. This usually happens when an instance of ArcMap that contains layers which I am trying to delete is opened so the workaround is to fire up the Windows Task Manager and kill the ArcMap.exe processes that are for some reason still opened.

Anybody else having this issue?

Now running SP3 and the issue has not been solved.

enter image description here

EDIT: Just to add to the above information, I am running a very similar setup on a comparable machine and I do not have this issue there.

share|improve this question
YES! Please see my forum post on the ESRI forums. I am trying to reproduce it (seems random...) to get a ticket opened with ESRI. – SaultDon Oct 17 '11 at 21:02
Do you have any 3rd party extensions loaded? I wonder if an exception in IExtension.Shutdown might explain this. – Kirk Kuykendall Oct 17 '11 at 22:18
@kirk I have none and never installed any on this installation of v10. This is even a new installation of windows7. Similar to you, this has persisted since before SP1. – SaultDon Oct 17 '11 at 22:54
You are running almost 100 processes, it could be anything really, but I would be most suspicious of virus scanners, backup software and search indexing services. – blah238 Oct 17 '11 at 23:21
@Kirk - no extensions on this particular setup but I will double check when I get to work. I have a few of my own add-own tools. I have a similar setup on another Windows 7 machine with the same add-ons and no problems there. – Jakub Oct 17 '11 at 23:34

5 Answers 5

up vote 15 down vote accepted

Not your fault and not much you can do about it. However, if you are curious about the reason, what happens is that there is a COM circular reference (most likely to something listening to some event source - like the Editor) and when the applications attempts to exit it cannot, because some objects are keeping each other alive. This can be from an extension that you have installed, or even from within ESRI code itself. This used to happen all the time and it may only manifest itself under certain conditions, like certain commands being visible in the toolbar.

From an old ArcObjects tutorial on COM concepts:

When the application exits, it releases the reference it holds to the command. If the command also serves as an event sink, the application holds another reference to the command, which cannot be released until the command disconnects from the source. As the command does not know of a point at which it can disconnect other than its own destructor, this causes a circular reference whereby the application cannot exit without the command destroying and the command's destructor never gets called because the application holds a reference to the command. This causes the application to hang on exit.

If you are even more curious, delete (or backup) your Normal.mxt, which will wipe out all customizations and see if this problem persists.

share|improve this answer
+1 good explanation. Makes me wonder if closing all the commandbars except for one, then save and quit and try to reproduce the problem. I don't think ICommand.OnCreate gets called until the toolbar is visible. If you gradually turn on toolbars and repeat tests maybe you could narrow down your list of suspect commands. – Kirk Kuykendall Oct 18 '11 at 2:53
Good explanation. Thanks. @Kirk - I do have a 3rd party tool that I've forgotten about (ArcBruTile) I will remove that. My add-in does indeed do some event listening so I wonder my toolbar could be the source of the problem. The strange thing is that I have the same tools on my other machine as well as the same set of default toolbar loaded and I do not have this problem there. I will try to start with a fresh Normal.mxt, that's a good suggestion. – Jakub Oct 18 '11 at 12:45
Also, sometimes when the act of being just visible may not necessarily be enough to cause the circular reference - it may require some event to happen for that condition to manifest itself. For example, the command can be visible and everything is fine and dandy waiting for the "StartEditing" event to happen. Once that triggers, it decides to start grabbing references to other things - and there it sets up its other references which do cause the circular condition. This was a classic problem with VB extensions and even more with .NET commands because of the non-deterministic garbage collection – Ragi Yaser Burhum Oct 18 '11 at 13:42

Thank You @Kirk and @Ragi for solving this problem! Here is what I have done while monitoring the Task Manager Processes:

  1. Backed up and deleted Normal.mxt
  2. Started new ArcMap Document (ArcMap opened in default configuration)
  3. Closed ArcMap (Process closed as expected)
  4. Added Toobars: 3D Analyst, Advanced Editing, Data Frame Tools, Draw, Edit Vertices, Editor, Georeferenceing, Labeling, Layout, Snapping
  5. Arranged toolbars
  6. Closed ArcMap (Process closed as expected)
  7. Started new ArcMap Document
  8. Added my own custom toolbar with add-ins
  9. Closed ArcMap (Process closed as expected)
  10. Started an existing ArcMap Document
  11. Used custom start and stop editing on my toolbar as well as several custom tools
  12. Closed ArcMap (Process closed as expected)

I also removed and deleted ArcBruTile

ArcMap Processes now close as expected

share|improve this answer
spoke too soon. The problem is back. – Jakub Oct 18 '11 at 20:17
Unfortunately, ESRI support has been copying and pasting the above answer as a solution, when it doesn't seem to be working :/ – MaryBeth Oct 31 '13 at 21:28
@Jakub Did you ever find a solution to this issue? I'm creating an addin and recently noticed multiple ArcMap process running after exiting. – Barbarossa Sep 18 at 18:58
It seems that the consensus is that the processes are opened and not properly closed by 3rd party addins / extensions. I build my own addins and I may have just gone through all my code ensuring all objects are released or, and more likely, the issue has been fixed at the source by ESRI as it is no longer happening in 10.3 and i believe already dissapeared in 10.2. If this is still happening, uninstall and or remove ALL 3rd party addins and see if the issue is still there. If not keep turning, adding one by one to locate the culprit. Hope this helps. – Jakub Sep 21 at 14:56

PsKill from the SysInternals Suite (a darn near mandatory toolkit in my opinion) can be linked to a shortcut and fired at will to clean up hung processes. Doing so is ugly in that it does nothing to solve the original problem, but it does allow one to carry on quickly and efficiently.

pskill -t arcmap.exe

I have been getting invisible arcmap.exe processes several times a week lately, not so often before, but it has been happening for some time. I'm usually using concurrent licensing. It seems to happen more often when I have more than one Arcmap session active. We use Sophos antivirus, on 64bit Win7.

share|improve this answer

Not trying to bring this post back from the dead, but while working with ESRI support on this issue with a Citrix server (users crash or log out, arcgiscachemanager.exe doesn't close out 20-30 minutes later or more if at all, users cannot get back in to ArcMap and then they have to rely on on of 2 server administrators to be available to log into the server and manually release them), ESRI is copying and pasting a solution from this page and it doesn't work. At least not when working in a Citrix environment.

For Citrix, we found that creating two registry keys (one for killing the hung process, one for pushing settings back to their original state) "fixed" the issue.

For non-Citrix, we've toyed with the idea of just creating a script to kill the process, but since when we are not in Citrix, we are already on the server, we decided it wasn't necessary.

Hope this helps.

-------copied data from escalated support ticket-------- Citrix has registry key settings that will help manage applications that spawn secondary processes in the background. You have a lot of the symptoms that should make this solution a plausible setup. Have a look through the following Citrix Knowledge Articles:

Graceful Logoff from a Published Application Renders the Session in Active State:

Active Sessions after User Logs Off in a XenApp Environment when Upgraded from Windows Server 2003 to Windows Server 2008:

XenApp 6.5 AppCenter Console Displays Application Status Application Not Running:

In these articles, it discusses how published applications can cause a session not to close or a user not being properly logged off. In those cases, sessions had to be reset/exited by an admin or by terminating the process from the server that was still running. What happens in Citrix is that you publish the main application, in your case ArcMap. Only that exe is closed when exiting an application (or if it crashes). As a result, any exe's associated with the application that were spawned when the application was opened are not be fully closed out in Citrix resulting in this state. So when the ArcGISCacheMgr.exe takes a long time to execute or the application crashes your end users are left unable to start a new session.

The articles discuss how you can add these secondary processes to a registry key to close them automatically on close of the main application. Another option you can explore is a logoff script to check for the processes and terminate them if they exist.

share|improve this answer

Create a .bat file and paste this in and save to desktop.

 taskkill /IM ArcGisCacheMgr.exe /f
 taskkill /IM ArcGisConnection.exe /f
 "C:\Program Files (x86)\ArcGIS\Desktop10.1\bin\ArcMap.exe"
share|improve this answer
An explanation of what these commands (and their options) are doing would help the uninitiated understand your solution. – whuber Apr 3 '14 at 16:01

protected by underdark Jun 3 '14 at 15:35

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.