I am trying to run a function from Arc Hydro tools in ArcMap 10.1; Sink evaluation. But before it can finish it returns an error message, that, frankly, I don't understand at all. It goes System.runtime.interopservices.comexception (0x80004005): error hresult e_fail .

Can anyone help me solve this? I have tried all I can think of. Run the function from the toolbox instead of dropdown menus, shorten paths, restart ArcMap, reinstall AHT, open new map documents, restart my computer, wait till next day and see if it automagically have fixed itself...

After searching this forum I found a possible duplicate, although it's got no answers. Now I'm all out of ideas, can anyone please help me?!

enter image description here

I'm using ArcMap 10.1 SP1 basic license and Windows 7.

I think I have narrowed it down a bit, still not clear what's wrong though. Sink evaluation uses a series of functions in Arcmap, of which one is Zonal statistics as table. That's the one it gets stuck on. The input raster somehow does not exist, path unknown. I guess this is some intermediary raster.

enter image description here

After consulting the Arc Hydro team, I got the advice not to use grids stored in a gdb (which I didn't). I have also tried to change target locations, thanks to @G.Oxsen. Unfortunately neither of those solved the issue. According to the Arc Hydro team, GPL0 that I asked about earlier is an in-memory grid, so probably no problem there.

I am currently pursuing that it is related to the installation of SP1. Anyone out there using AHT with SP1 and got Sink evaluation working?

Uninstalling SP1 did not change anything, unfortunately. Still working on this, but with less intensity. Seems like I'll have to find workarounds...

By reducing the number of sinks in need of processing I managed to get Sink evaluation running. Having the files not stored in a gdb seem to help as well, as mentioned earlier, and using integer grids. Changing the "Maximum number of unique values to render" in ArcMap Options (Customize menu), tab Raster --> Raster dataset is another tip that I got (from the Arc Hydro Team). Restarting ArcMap after running every one or two functions also helps keeping things stable.

  • I had a problem with the ArcHydro 10.1 beta as well. What fixed it for me was running Windows Update and installing some patches that I had missed, including some "Optional" patches. It sounds weird, but it worked for me.
    – dmahr
    Apr 4, 2013 at 13:01

6 Answers 6


I got a little bit different error(s) while running Sink evaluation and basic deranged terrain processing.

Anyhow, these steps might solve other errors too so here's what helped:

  1. I moved all of my data under C:\data\
  2. I created new file geodatabase (named testing.gdb) under that folder
  3. I increased the max number of unique values to render
  4. I set out the targets (C:\data for raster and C:\data\testing.gdb for vector files) using ApUtilites
  5. I set out the processing extent to the extent of my DEM (Geoprocessings>Environments>Processing extent ) )
  6. I saved my project as testing.mxd under C:\data
  7. I set testing.gdb to be default workspace. (this finally solved the last errors I was getting)
  8. I also named my data frame simply to "data" since ArcHydro -tools tend to add data frame name to output-file paths. I'm not sure if step this is needed.
  • Very nice ideas! I should check them out next time I'm calculating catchments, since I still get these error messages regularly.
    – Martin
    Feb 17, 2014 at 9:33
  • I think what's the most helpful is keeping everything at C:/ instead of a network drive, along with avoiding shapefiles. This is also a very useful ArcHydro forums thread.
    – Martin
    Mar 20, 2014 at 8:15

I had a similar problem with archydro tools in ArcGIS 10.0 Try going to the archydro tool bar and go to ApUtilities>Set Target Location. Go into each section in that list and edit the Raster Data target locations. Make sure the location is targeted to a standard folder and not a .gdb or .mdb (in the selection window make sure the "Show of type:" field is set to "Shapefile/Raster Workspace" and not "Personal/File Geodatabase"). You may be able to accomplish the same goal through the environment options (Geoprocessing drop down menu ) by changing the workspace environment to a regular folder and not a .gdb or .mdb, but I would not mess with the workspace environment unless I had to. Changing the workspace environment will affect all of the processes not just the raster environment for archydro tools. Let me know if this helps.

  • I'm afraid it didn't :( Thanks for your help though! It might be related to SP1 of Arcmap 10.1, but still looking in to that. I'll get back here with a solution as soon as I find it.
    – Martin
    Apr 5, 2013 at 8:10

The problem seems to be long folder names and / or folder names with spaces. If you set the target locations to a simple folder name & path, then all tools work.

  • Hello! While this might be a part of the solution, I'd also recommend looking at the other answers if you encounter further problems.
    – Martin
    May 4, 2015 at 6:05

Well I had that problem with Hec-geoHMS while trying to create the basin model file.

To fix this I implemented the steps mentioned above and I did not change the output destinations of any files on any operation starting from (Preprocessing) so by default it stored them in a folder called (Layers). The error didn't happen again due to me "going with the flow".

Now if you're interested in what I was doing wrong, I deliberately changed the output destination to the file geodatabase I was working on (I did that as a work-around a previous error, little did I know I was making things worse). The "RawDEM" file was gone and couldn't be selected or found so I had to use the original DEM I had-That was a sure sign that something was wrong-. It was a huge mess. Anyways the HRESULT error is no more.


I had this HRESULT error once. It was happening because I used to change the output destination manually each time ( starting from the operations inside the Preprocessing menu ) instead of letting the program decide by default. So simply go with the suggestions mentioned above - especially the ones about vector and raster files output destinations - and just go with the flow and don't change anything.


The database is the main problem. If you want to solve this problem create a new geodatabase or copy the original geodatabase from your document folder to your currently working on project folder. Then set the copied geodatabase as default geodatabase and start sinking. notice:

  1. After creating the new windows account run the ArcMap for the first time then close it.
  2. Go to my document and copy the ArcGIS folder to work on the new project folder.(in fact make a backup from your original geodatabase folder)
  3. Start ArcMap again
  4. Start new project
  5. Set the copied geodatabase as default geodatabase for you project
  6. Save new project with any name in your working on project folder.
  7. Input your DEM file and sink it.
  • 1
    Could you please expand on why #1 is necessary?
    – Midavalo
    Apr 19, 2016 at 7:18
  • Also, why would I need to copy my database from Documents? What's the difference from just creating a new one?
    – Martin
    Apr 19, 2016 at 13:21

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