ESRIRegAsm.exe Error

4485
36
Jump to solution
02-20-2013 04:38 AM
Occasional Contributor
I am trying to run ESRIRegAsm.exe on a 64-bit Windows Server 2008 R2 Standard (Service Pack 1), non-development machine, but I'm getting the following error:

"The application was unable to start correctly (0xc0000005). Click OK to close the application."

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: ESRIRegAsm.exe
  Application Version: 10.1.1.3143
  Application Timestamp: 5058c59b
  Fault Module Name: StackHash_4c0d
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp: 00000000
  Exception Code: c0000005
  Exception Offset: 76c74913
  OS Version: 6.1.7601.2.1.0.16.7
  Locale ID: 1033
  Additional Information 1: 4c0d
  Additional Information 2: 4c0d4d78887f76d971d5d00f1f20a433
  Additional Information 3: 4c0d
  Additional Information 4: 4c0d4d78887f76d971d5d00f1f20a433

I have changed the ESRIRegAsm.exe.config file as follows:

  <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0.30319"/>
      <!--<supportedRuntime version="v2.0.50727"/>-->
  </startup>

I have also tried various compatibility modes and run the executable as Administrator with no change in results.

I have used the Dependency Walker to see if there were any differences on my development machine (Windows 7 Enterprise, Service Pack 1) and these were the only two discrepancies, which I believe to be inconsequential:

WLANAPI.DLL
Resolves to the following on my machine:
c:\windows\system32\WLANAPI.DLL

GDIPLUS.DLL
Resolves to the following on my machine:
c:\windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\GDIPLUS.DLL

I've already seen this thread and none of the suggestions helped.

Has anyone else encountered this problem? More importantly, does anyone know how to fix this problem?
Reply
0 Kudos
1 Solution

Accepted Solutions
Occasional Contributor
Well, another person on my team remembered having trouble with Symantec Endpoint Protection 12, so he uninstalled it and ESRIRegAsm.exe started working.

Apparently, my test, where I disabled all of the Symantec software wasn't thorough enough. The reason I thought I had Symantec ruled out was because Symantec stopped showing up in Process Monitor once I disabled it. However, it low-level hooks via C:\Windows\System32\sysferThunk.dll is the issue, which is some how related to SEP.

The problem seems to be a conflict between SEP 12 and Citrix XenApp:
http://www.symantec.com/connect/forums/sep-121-citrix-xenapp-causing-application-launch-failure

The article above mentions that uninstalling XenApp or SEP will fix the problem, but we've also found the XenApp works fine with SEP 11.

Big thanks to everyone who contributed to this thread!

View solution in original post

Reply
0 Kudos
36 Replies
Regular Contributor III
Are you following the instructions outlined here?  esriRegAsm is a command line utility but it sounds like you're trying to run it directly.

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/ESRIRegAsm_utility/0001...
Reply
0 Kudos
Occasional Contributor
Are you following the instructions outlined here?  esriRegAsm is a command line utility but it sounds like you're trying to run it directly.

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/ESRIRegAsm_utility/0001...


Neil,

I'm not sure what you mean by "run it directly." I am trying to execute it as part of an install script for an add-in. When I found out that the installer was failing to execute the ESRIRegAsm calls, I tried to do it manually (via the command prompt) to determine if it was a problem with my installer or with the tool. The tool failed as described above. I then tried to execute ESRIRegAsm on my development machine from the command prompt and it succeeded. This wasn't a surprise because it happens in the project's post-build steps.

Also, if you double-click the executable from Windows Explorer, you get a usage message box (I have attached a screenshot.) This, of course, happens on my development machine and not the Windows 2008 Server machine. The Windows 2008 machine has the same failure whether ESRIRegAsm is run from the install script, command prompt, or double-clicked in Windows Explorer.

Thanks,
Jason
Reply
0 Kudos
Regular Contributor III
By run directly I meant double-clicking it.  In order to run the utility from the command line, the cmd window will need to be started as an administrator.  To run it from an installer, the installer will have to run with elevated privileges.  Also, you mentioned this was an add-in.  Add-ins do not need to be registered; only the old-style COM components.  All of our desktop extensions are COM so I have to run this utility in our installers as well.  I have code in each installer class to run the utility.  We then use WinRAR to create a self-extracting exe that contains the installer exe and msi.  One of the settings on this self-extracting exe is to prompt to run with elevated privileges.  We've never ran into any problems with the registration on machines that were properly configured but I don't know if any of them were running that OS.
Reply
0 Kudos
Occasional Contributor
By run directly I meant double-clicking it.  In order to run the utility from the command line, the cmd window will need to be started as an administrator.  To run it from an installer, the installer will have to run with elevated privileges.  Also, you mentioned this was an add-in.  Add-ins do not need to be registered; only the old-style COM components.  All of our desktop extensions are COM so I have to run this utility in our installers as well.  I have code in each installer class to run the utility.  We then use WinRAR to create a self-extracting exe that contains the installer exe and msi.  One of the settings on this self-extracting exe is to prompt to run with elevated privileges.  We've never ran into any problems with the registration on machines that were properly configured but I don't know if any of them were running that OS.


Neil,

I used an incorrect term, Add-in, to describe what I'm attempting to install. I apologize. I'm trying to install a product that consists of commands, tools, and auto-updaters. I'm new to ArcGIS, so I haven't quite gotten the hang of all the terminology, yet.

I did run the installer with elevated privileges and start the command prompt in administrator mode.

I'm starting to suspect that the machine may be missing some updates, but I don't have permissions to make those kinds of changes. I'll report back as I find more.

Thanks,
Jason
Reply
0 Kudos
Regular Contributor III
Are you running:

C:\Program Files\Common files\ArcGIS\Bin\ESRIRegasm.exe

or

C:\Program Files (x86)\Common files\ArcGIS\Bin\ESRIRegasm.exe?

My suggestion, which you are not going to like, is to not run ESRIRegAsm in order to install your product.  The way that we handle is to register the COM component and copy the ecfg file to the appropriate directory.
Reply
0 Kudos
Occasional Contributor
Are you running:

C:\Program Files\Common files\ArcGIS\Bin\ESRIRegasm.exe

or

C:\Program Files (x86)\Common files\ArcGIS\Bin\ESRIRegasm.exe?

My suggestion, which you are not going to like, is to not run ESRIRegAsm in order to install your product.  The way that we handle is to register the COM component and copy the ecfg file to the appropriate directory.


Well, I'm hesitant to mark this as the answer because it doesn't help me get ESRI's tool to work. On the other hand, it solves my problem and is a viable workaround.

That said, I like your answer, but I'm annoyed that ESRI's tool isn't working for me. Thanks for your help!
Reply
0 Kudos
Occasional Contributor
Neil,

I used an incorrect term, Add-in, to describe what I'm attempting to install. I apologize. I'm trying to install a product that consists of commands, tools, and auto-updaters. I'm new to ArcGIS, so I haven't quite gotten the hang of all the terminology, yet.

I did run the installer with elevated privileges and start the command prompt in administrator mode.

I'm starting to suspect that the machine may be missing some updates, but I don't have permissions to make those kinds of changes. I'll report back as I find more.

Thanks,
Jason


I was able to get the permissions needed to update the machine to the very latest, but ESRIRegAsm still doesn't run on the machine. ESRI support has been helping us and these are some of the other things we have tried/verified:

- Verified that .NET 3.5 SP1 is installed. Windows 2008 R2 SP1 has this by default and won't let you remove it.
- Ran process monitor to identify any permission problems. No permissions issues were encountered.
- Disabled the antivirus software to ensure it wasn't interfering. No change.
- Copied ESRIRegAsm.exe from a machine that it succeeds on to the machine it is failing on. No change.
- Verified that ESRIRegAddIn.exe is working. I'm not sure what they were looking for by testing this.
Reply
0 Kudos
Occasional Contributor
I was able to get the permissions needed to update the machine to the very latest, but ESRIRegAsm still doesn't run on the machine. ESRI support has been helping us and these are some of the other things we have tried/verified:

- Verified that .NET 3.5 SP1 is installed. Windows 2008 R2 SP1 has this by default and won't let you remove it.
- Ran process monitor to identify any permission problems. No permissions issues were encountered.
- Disabled the antivirus software to ensure it wasn't interfering. No change.
- Copied ESRIRegAsm.exe from a machine that it succeeds on to the machine it is failing on. No change.


I have asked for the ESRIRegAsm.exe symbol file (it is not present on ESRI's symbol server)--and haven't gotten it, yet--so that I could try and debug the problem myself. I set the "show loader snaps" flag in GFlags and attached WinDbg (albeit without the ESRIRegAsm.exe symbol files) and got the following:

[INDENT]122c:0f38 @ 41562921 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
122c:0f38 @ 41562921 - LdrpResolveFileName - RETURN: Status: 0x00000000
122c:0f38 @ 41562921 - LdrpResolveDllName - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
122c:0f38 @ 41562921 - LdrpResolveDllName - RETURN: Status: 0x00000000
122c:0f38 @ 41562921 - LdrpSearchPath - RETURN: Status: 0x00000000
122c:0f38 @ 41562921 - LdrpMapViewOfSection - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
ModLoad: 74080000 740ca000   C:\Windows\SysWOW64\MSCOREE.DLL
(122c.f38): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.[/INDENT]

I have a couple of suspicions based on this:

1) ESRIRegAsm.exe was built against a version of .NET that didn't have the latest security patches.
2) There is some kind of side-by-side DLL hell issue.

Does anyone else have thoughts or comments based on the information I've provided (or completely independent of my research)?
Reply
0 Kudos
Regular Contributor III
First chance access violations can be normal.  It is the second chance access violations that crash the process.

Suggest that you go until you get one of those and then post the stack trace.

FWIW, ESRIRegAsm appears to be unmanaged C++.
Reply
0 Kudos