Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom GP function in ArcGIS 10 written in C#. When the tool is run it takes ArcGIS about 5 minutes to close (as in the application closes but in Task manager ArcMap.exe and ArcSOCP.exe are still running). When closed ArcMap.exe will increase memory too about 170 - 250 MB.

To ensure it wasn't my code I created a blank GP Function with no code in the Execute function and return and empty paramarray value. Ran the tool and ArcMap still took ages too close.

I then opened ArcMap again and launched the tool but this time pressed cancel instead of go. ArcMap closed fine.

So as soon the tool enters the execute method it seems to then take ages to close when the Execute method finishes.

If I run one of the out of the box GP tools ArcMap closes fine.

Anyone encountered the same problem?

share|improve this question

closed as off-topic by PolyGeo Feb 14 at 21:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Does this happen with the Calculate Area sample tool too? Does it only happen when running from visual studio in debug mode? – Kirk Kuykendall Dec 20 '11 at 23:01
    
Hi Kirk - I've just done the same with the Calculate area tool. The same issue happens with this tool. It occurs whether in VS or not. – Rob Dec 22 '11 at 10:15

I think that the problem lies in the code that is being used. I have created a couple of custom geoprocessing tools for Arcgis 10, and I do not see the problem that you have mentioned. As Kirk has mentioned, does the problem occur when running the Sample tool?

I would check the code, to see if any reference is left open, and also try to see if an extra handles are open. This can be done by using SysInternal's Process Moniter tool

share|improve this answer
    
I tried Procman but it didn't highlight anything. When I close ArcMap it shows 4 ThreadExit events then just stops. No records are entered. Then after a few minutes, activity starts back up in procman with a CreateFile on C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin\AccessWorkspaceFactory.dll – Rob Dec 22 '11 at 10:38
up vote 0 down vote accepted

I was running this through Citrix, didn't seem to have the issue on my own machine. Couldn't find a solution in the end so implemented a different way of doing what I needed to do.

share|improve this answer

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