ESRIRegAsm.exe Error

7570
36
Jump to solution
02-20-2013 04:38 AM
JasonPike
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?
0 Kudos
36 Replies
JasonPike
Occasional Contributor
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++.


Thanks, Richard.

Here is the stack:

[INDENT]0:000> ~*kb

.  0  Id: 1058.1784 Suspend: 1 Teb: 7efdd000 Unfrozen
ChildEBP RetAddr  Args to Child             
WARNING: Frame IP not in any known module. Following frames may be wrong.
0019f03c 00030024 001a0804 0019f068 7efdd000 0x764f4913
0019f054 7767004d 001a0000 764f4913 00000002 0x30024
0019f394 7769c578 00000130 00000000 00000000 ntdll!KiUserApcDispatcher+0x25
0019f488 7769c3a9 0019f4d4 017601a0 00000000 ntdll!LdrpFindOrMapDll+0x333
0019f608 7769c4d5 0019f670 777601a0 00000000 ntdll!LdrpLoadDll+0x2b2
0019f640 776b25c5 777601a0 00000000 0019f670 ntdll!LdrLoadDll+0xaa
0019f6a8 776b24c5 0019f834 776b26e1 7efde008 ntdll!LdrpCorInitialize+0x106
0019f6b0 776b26e1 7efde008 051727e0 7efdd000 ntdll!LdrpCorValidateImage+0x13
0019f834 776a52d6 0019f8a8 77660000 75a4fee7 ntdll!LdrpInitializeProcess+0xfe2
0019f884 77699e79 0019f8a8 77660000 00000000 ntdll!_LdrpInitialize+0x78
0019f894 00000000 0019f8a8 77660000 00000000 ntdll!LdrInitializeThunk+0x10
[/INDENT]

Here is the loader info (including the second chance exception, which is the same as the first chance since it was unhandled):

[INDENT]1058:1784 @ 46868265 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
1058:1784 @ 46868265 - LdrpResolveFileName - RETURN: Status: 0x00000000
1058:1784 @ 46868265 - LdrpResolveDllName - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
1058:1784 @ 46868265 - LdrpResolveDllName - RETURN: Status: 0x00000000
1058:1784 @ 46868265 - LdrpSearchPath - RETURN: Status: 0x00000000
1058:1784 @ 46868265 - LdrpMapViewOfSection - ENTER: DLL name: C:\Windows\SYSTEM32\MSCOREE.DLL
ModLoad: 74080000 740ca000   C:\Windows\SysWOW64\MSCOREE.DLL
(1058.1784): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00030000 ebx=001a0000 ecx=0019f478 edx=77670010 esi=00000000 edi=001a0804
eip=764f4913 esp=0019f040 ebp=0019f054 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
764f4913 ??              ???
0:000> g
1058:1784 @ 46872859 - LdrpInitializeProcessWrapperFilter - ERROR: Process initialization raised exception 0xc0000005
Exception record: .exr 0019ED08
Context record: .cxr 0019ED58
(1058.1784): Access violation - code c0000005 (!!! second chance !!!)
eax=00030000 ebx=001a0000 ecx=0019f478 edx=77670010 esi=00000000 edi=001a0804
eip=764f4913 esp=0019f040 ebp=0019f054 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
764f4913 ??              ???
[/INDENT]

Here is the exception analysis via Application Verifier:
[INDENT]
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** ERROR: Module load completed but symbols could not be loaded for ESRIRegAsm.exe
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/ESRIRegAsm_exe/10_1_1_3143/5058c59b/unknown/0_0_0_0/bbbbbbb4/c0...

FAULTING_IP:
+25
764f4913 ??              ???

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 764f4913
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 764f4913
Attempt to read from address 764f4913

FAULTING_THREAD:  00001784

DEFAULT_BUCKET_ID:  BAD_INSTRUCTION_PTR

PROCESS_NAME:  ESRIRegAsm.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

EXCEPTION_PARAMETER1:  00000000

EXCEPTION_PARAMETER2:  764f4913

READ_ADDRESS:  764f4913

FOLLOWUP_IP:
ntdll!KiUserApcDispatcher+25
7767004d 8b8fcc020000    mov     ecx,dword ptr [edi+2CCh]

FAILED_INSTRUCTION_ADDRESS:
+67092faf04cfdd50
764f4913 ??              ???

MOD_LIST: <ANALYSIS/>

NTGLOBALFLAG:  2000102

APPLICATION_VERIFIER_FLAGS:  48004

IP_ON_HEAP:  00030024
The fault address in not in any loaded module, please check your build's rebase
log at <releasedir>\bin\build_logs\timebuild\ntrebase.log for module which may
contain the address if it were loaded.

IP_IN_FREE_BLOCK: 764f4913

PRIMARY_PROBLEM_CLASS:  BAD_INSTRUCTION_PTR

BUGCHECK_STR:  APPLICATION_FAULT_BAD_INSTRUCTION_PTR_INVALID_POINTER_READ

FRAME_ONE_INVALID: 1

LAST_CONTROL_TRANSFER:  from 00030024 to 764f4913

STACK_TEXT: 
WARNING: Frame IP not in any known module. Following frames may be wrong.
0019f03c 00030024 001a0804 0019f068 7efdd000 0x764f4913
0019f054 7767004d 001a0000 764f4913 00000002 0x30024
0019f394 7769c578 00000130 00000000 00000000 ntdll!KiUserApcDispatcher+0x25
0019f488 7769c3a9 0019f4d4 017601a0 00000000 ntdll!LdrpFindOrMapDll+0x333
0019f608 7769c4d5 0019f670 777601a0 00000000 ntdll!LdrpLoadDll+0x2b2
0019f640 776b25c5 777601a0 00000000 0019f670 ntdll!LdrLoadDll+0xaa
0019f6a8 776b24c5 0019f834 776b26e1 7efde008 ntdll!LdrpCorInitialize+0x106
0019f6b0 776b26e1 7efde008 051727e0 7efdd000 ntdll!LdrpCorValidateImage+0x13
0019f834 776a52d6 0019f8a8 77660000 75a4fee7 ntdll!LdrpInitializeProcess+0xfe2
0019f884 77699e79 0019f8a8 77660000 00000000 ntdll!_LdrpInitialize+0x78
0019f894 00000000 0019f8a8 77660000 00000000 ntdll!LdrInitializeThunk+0x10


SYMBOL_STACK_INDEX:  2

SYMBOL_NAME:  ntdll!KiUserApcDispatcher+25

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: ntdll

IMAGE_NAME:  ntdll.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  4ec49b8f

STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~0s ; kb

FAILURE_BUCKET_ID:  BAD_INSTRUCTION_PTR_c0000005_ntdll.dll!KiUserApcDispatcher

BUCKET_ID:  APPLICATION_FAULT_BAD_INSTRUCTION_PTR_INVALID_POINTER_READ_BAD_IP_ntdll!KiUserApcDispatcher+25

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/ESRIRegAsm_exe/10_1_1_3143/5058c59b/unknown/0_0_0_0/bbbbbbb4/c0...
[/INDENT]
0 Kudos
RichardWatson
Frequent Contributor
I have 2 suggestions. 

The first is to try and load sos and look at the clrstack.

// If using .NET 3.5
.loadby sos mscorwks
!clrstack

// If using .NET 4.0
.loadby sos clr
!clrstack

The second is that I think that you are going to have to find the call stack yourself:

http://www.dumpanalysis.org/blog/index.php/2007/07/25/reconstructing-stack-trace-manually/
0 Kudos
JasonPike
Occasional Contributor
I have 2 suggestions. 

The first is to try and load sos and look at the clrstack.

// If using .NET 3.5
.loadby sos mscorwks
!clrstack

// If using .NET 4.0
.loadby sos clr
!clrstack

The second is that I think that you are going to have to find the call stack yourself:

http://www.dumpanalysis.org/blog/index.php/2007/07/25/reconstructing-stack-trace-manually/


Richard,

Those are great suggestions.

#1 Unfortunately, MSCOREE is the .NET Execution Engine and it loads before CLR.dll (or MSCORWKS.dll), so the exception occurs before a .NET stack would be helpful.

#2 I might try this if I'm ever given the ESRIRegAsm.exe symbol file. I don't think there we be much point in going through the pain without it.

Thanks,
Jason
0 Kudos
nicogis
MVP Frequent Contributor
try and check if you have problems with .net frameworks installed on your machine http://www.microsoft.com/en-us/download/details.aspx?id=30135
0 Kudos
JasonPike
Occasional Contributor
try and check if you have problems with .net frameworks installed on your machine http://www.microsoft.com/en-us/download/details.aspx?id=30135


Thanks, Domenico. That was a very good idea. I used the tool and repaired the .NET framework installations via the tool (even though it didn't find any problems), but it did not solve my problem--I get the exact same error.
0 Kudos
nicogis
MVP Frequent Contributor
I have a machine 64-bit Windows Server 2008 R2 Standard (Service Pack 1) and I haven't problems.
-Have you installed all patchs available in windows update?
-Have you seen if you have conflits with antivirus?
-Have you emptied the temp folder?
-Have you further details in event viewer?
-Have you more versions of c++ on machine?
0 Kudos
JasonPike
Occasional Contributor
I have a machine 64-bit Windows Server 2008 R2 Standard (Service Pack 1) and I haven't problems.
-Have you installed all patchs available in windows update?
-Have you seen if you have conflits with antivirus?
-Have you emptied the temp folder?
-Have you further details in event viewer?
-Have you more versions of c++ on machine?


-Have you installed all patches available in windows update?
Yes (noted in previous post)

-Have you seen if you have conflicts with antivirus?
I disabled the anti-virus to test this. No change (as noted in a previous post)

-Have you emptied the temp folder?
I had not tried this, but I verified that it is empty. Why do you recommend this?

-Have you further details in event viewer?

Here is the info from the Application Error entry in the event viewer:
Faulting application name: ESRIRegAsm.exe, version: 10.1.1.3143, time stamp: 0x5058c59b
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x74d84913
Faulting process id: 0x548
Faulting application start time: 0x01ce19e0383cc67d
Faulting application path: C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe
Faulting module path: unknown
Report Id: 7634b979-85d3-11e2-8a1f-005056ab028c

Here are the contents of the Windows Error Reporting file (pointed to from the event log.):
Version=1
EventType=APPCRASH
EventTime=130069890052609209
ReportType=2
Consent=1
ReportIdentifier=7634b97a-85d3-11e2-8a1f-005056ab028c
IntegratorReportIdentifier=7634b979-85d3-11e2-8a1f-005056ab028c
WOW64=1
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=ESRIRegAsm.exe
Sig[1].Name=Application Version
Sig[1].Value=10.1.1.3143
Sig[2].Name=Application Timestamp
Sig[2].Value=5058c59b
Sig[3].Name=Fault Module Name
Sig[3].Value=StackHash_4c0d
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=00000000
Sig[6].Name=Exception Code
Sig[6].Value=c0000005
Sig[7].Name=Exception Offset
Sig[7].Value=74d84913
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.16.7
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=4c0d
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=4c0d4d78887f76d971d5d00f1f20a433
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=4c0d
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=4c0d4d78887f76d971d5d00f1f20a433
UI[2]=C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe
UI[3]=ESRIRegAsm.exe has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe
LoadedModule[1]=C:\Windows\SysWOW64\ntdll.dll
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=ESRIRegAsm.exe
AppPath=C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe

-Have you more versions of c++ on machine?
This is not a development machine. Here are the versions of the Microsoft Visual C++ Redistributables that are installed:
2005
2008
2012
0 Kudos
RichardWatson
Frequent Contributor
If you have a small project that you can share then do so.  I'll build it and see if I can register it.
0 Kudos
JasonPike
Occasional Contributor
If you have a small project that you can share then do so.  I'll build it and see if I can register it.


Richard,

I appreciate the offer, but I don't think that would tell us much.

1) I can register all my DLLs on other (non-Windows 2008) machines. I have had the same failure with all of the Windows 2008 machines I've tried. However, our Win7 64-bit and WinXP 32-bit machines work just fine.

2) I don't have to specify a DLL for the tool to fail--you can double-click the executable in explorer (or right-click and Run as Administrator) and it fails in exactly the same way

Thanks,
Jason
0 Kudos
nicogis
MVP Frequent Contributor
I am not sure but could be relate to Microsoft Visual C++ Redistributables installed.
temp emptied for be sure for possible dirty memory store in temporary files.
0 Kudos