Random AccessViolationException

7468
12
02-19-2015 10:42 AM
KeithMacIntyre
New Contributor III

This error occurs randomly, sometimes within a couple of hours of running the application, sometimes, over a day.  From the stack trace it appears to be coming from the Runtime.  The error occurs even when nothing is happening in our application

ntdll.dll!77ab73e6()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77a5863c()
ntdll.dll!77ab5e0d()
ntdll.dll!77a583d0()
ntdll.dll!77ab6612()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
ntdll.dll!77a11354()
ntdll.dll!77ab5bca()
ntdll.dll!77a583d0()
ntdll.dll!77ab5e0d()
ntdll.dll!77a583d0()
ntdll.dll!77ab6612()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
ntdll.dll!77ab5bca()
ntdll.dll!77a583d0()
ntdll.dll!77ab5e0d()
ntdll.dll!77a583d0()
ntdll.dll!77ab6612()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
ntdll.dll!77a583d0()
ntdll.dll!77ab5e0d()
ntdll.dll!77a583d0()
ntdll.dll!77ab6612()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
ntdll.dll!77a11354()
ntdll.dll!77ab6631()
ntdll.dll!77ab6612()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
msvcr120.dll!0fd1ed63()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
msvcr120.dll!0fd1ee1f()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05afe6f4()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05afe15a()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05afdd14()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05cdde4a()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05cd843e()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05cd7282()
RuntimeCoreNETDesktop.dll!05add73a()
RuntimeCoreNETDesktop.dll!05adca8d()
RuntimeCoreNETDesktop.dll!05adca8d()
user32.dll!762f791c()
user32.dll!762f7b7a()
user32.dll!762f7a7f()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f7b7a()
user32.dll!762f7a7f()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f9859()
[External Code]
>xxx.exe!xxx.StartupWindow.Start() Line 575 + 0xe bytesC#
xxx.exe!xxx.StartupWindow.LoadScenario.AnonymousMethod__b() Line 540 + 0x8 bytesC#
user32.dll!762f791c()
user32.dll!762f7b7a()
user32.dll!762f7a7f()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f7b7a()
user32.dll!762f7a7f()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f97f4()
user32.dll!762f9859()
user32.dll!762f9859()
[External Code]
mscoreei.dll!73baec94()
kernel32.dll!754c9820()
mscoree.dll!73c2bbcc()
kernel32.dll!754c919f()
ntdll.dll!77a2b5af()
ntdll.dll!77a2b57a()

And the best I could get was the disassembly where the error occurs.  The pointer was at 77AB73E6

77AB73BB  ja          77AB73BD 

77AB73BD  add         byte ptr [eax],al 

77AB73BF  add         byte ptr [ebx+esi*2-55h],cl 

77AB73C3  ja          _RtlpValidateHeap@8+2Dh (77AB7421h) 

77AB73C5  jae         _RtlDebugZeroHeap@8+0C1h (77AB7372h) 

77AB73C7  ja          _RtlDebugZeroHeap@8+0A8h (77AB7359h) 

77AB73C9  nop 

77AB73CA  nop 

77AB73CB  nop 

77AB73CC  nop 

_RtlpBreakPointHeap@4:

77AB73CD  mov         eax,dword ptr fs:[00000030h] 

77AB73D3  cmp         byte ptr [eax+2],0 

77AB73D7  je          _RtlpBreakPointHeap@4+21h (77AB73EEh) 

77AB73D9  mov         byte ptr [_RtlpHeapInvalidBreakPoint (77AD1660h)],1 

77AB73E0  mov         dword ptr [_RtlpHeapInvalidBadAddress (77AD1664h)],ecx 

77AB73E6  int         3 

77AB73E7  mov         byte ptr [_RtlpHeapInvalidBreakPoint (77AD1660h)],0 

77AB73EE  ret 

77AB73EF  nop 

77AB73F0  nop 

77AB73F1  nop 

77AB73F2  nop 

77AB73F3  nop 

_RtlpValidateHeap@8:

77AB73F4  mov         edi,edi 

77AB73F6  push        ebp 

77AB73F7  mov         ebp,esp 

77AB73F9  sub         esp,1Ch 

77AB73FC  and         dword ptr [ebp-0Ch],0 

77AB7400  and         dword ptr [ebp-4],0 

77AB7404  push        ebx 

77AB7405  push        esi 

77AB7406  push        edi 

77AB7407  mov         bl,dl 

77AB7409  mov         edi,ecx 

77AB740B  xor         dl,dl 

77AB740D  mov         dword ptr [ebp-10h],edi 

77AB7410  call        _RtlpValidateHeapHeaders@8 (77AB78C9h) 

77AB7415  test        al,al 

77AB7417  je          _RtlpValidateHeap@8+228h (77AB761Ch) 

77AB741D  xor         eax,eax 

77AB741F  inc         eax 

77AB7420  test        bl,bl 

77AB7422  jne         _RtlpValidateHeap@8+3Dh (77AB7431h) 

77AB7424  test        dword ptr [edi+40h],20000000h 

77AB742B  je          _RtlpValidateHeap@8+24Dh (77AB7641h) 

77AB7431  and         dword ptr [ebp-14h],0 

77AB7435  lea         ecx,[edi+0C0h] 

77AB743B  mov         ebx,dword ptr [ecx] 

77AB743D  and         dword ptr [ebp-1Ch],0 

77AB7441  jmp         _RtlpValidateHeap@8+0B9h (77AB74ADh) 

77AB7443  cmp         dword ptr [edi+4Ch],0 

77AB7447  lea         esi,[ebx-8] 

77AB744A  je          _RtlpValidateHeap@8+7Ah (77AB746Eh) 

77AB744C  mov         eax,dword ptr [edi+50h] 

77AB744F  xor         dword ptr [esi],eax 

77AB7451  mov         al,byte ptr [esi+2] 

77AB7454  xor         al,byte ptr [esi+1] 

77AB7457  xor         al,byte ptr [esi] 

77AB7459  cmp         byte ptr [esi+3],al 

77AB745C  je          _RtlpValidateHeap@8+7Ah (77AB746Eh) 

77AB745E  push        ecx 

77AB745F  mov         edx,esi 

77AB7461  mov         ecx,edi 

77AB7463  call        _RtlpAnalyzeHeapFailure@12 (77AB81ADh) 

77AB7468  lea         ecx,[edi+0C0h] 

77AB746E  movzx       eax,word ptr [esi] 

77AB7471  mov         ebx,dword ptr [ebx] 

77AB7473  mov         dword ptr [ebp-8],eax 

0 Kudos
12 Replies
AsserSwelam1
Occasional Contributor

Hi Keith,

Would you share what your app doing and which layers are you using? I tried to reproduce the issue with a Desktop app with just a base tiled layer and didn't see the error.

Thanks,

Asser

0 Kudos
KeithMacIntyre
New Contributor III

I have been trying to reproduce it with a scaled down sample application without success.

It is happening in a scenario where I have one online layer:

World Imagery, ServiceUri="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"

We have a military message layer with a few minefields and wire obstacles.

There are multiple graphics layers with basic polygon graphics, but a large number of them

There is a graphics layer that has many custom rendered symbols that we set the symbol image using SetSourceAsync(stream)

When it crashes, the application isn't doing anything at all.  I did notice when I had all exceptions turned on that I would occasionally get a WebException, so the runtime does seem to be accessing the internet even though the map extent hasn't changed.

0 Kudos
KeithMacIntyre
New Contributor III

I am still unable to have it crash in my sample application, however, occasionally in our main application it doesn't happen either, although it does happen relatively often and on development and test machines.  I wonder if it would be worth generating a debug version of the runtime for us with the .pdb files (source code even better), and we may be able to better understand exactly what part is causing the problem since it's difficult to reproduce

0 Kudos
AsserSwelam1
Occasional Contributor

I have been trying to reproduce it too with no luck even with the app running overnight.

Sorry I don't think it would be possible to do what you ask for, It will be better to contact the support regarding this issue. 

-Asser

0 Kudos
AsserSwelam1
Occasional Contributor

Keith, are you using .NET SDK 10.2.4 or 10.2.5 ? because if you using 10.2.4 you should try to see if the same issue happening with 10.2.5 or not, there is huge stability fixes added in 10.2.5.

Thanks,

Asser

0 Kudos
JonDicken
New Contributor II

Hi, we are also seeing Access Violation Exceptions occurring in our application, and unfortunately they are crashing the entire application. We saw this in 10.2.4 and have also seen the same issue since moving to 10.2.5.

The issue seems to occur most frequently when adding/updating labels on larger feature layers - so we presume this is in some way related.

Looking at the crash dumps from our application we can see it is coming from the RuntimeCoreNETDesktop dll. Analyzing the exception using WinDBG gives us the following info & stack trace:

FAULTING_IP:

RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+22c1a4

112b9d14 8b5e04          mov     ebx,dword ptr [esi+4]

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)

ExceptionAddress: 112b9d14 (RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x0022c1a4)

   ExceptionCode: c0000005 (Access violation)

  ExceptionFlags: 00000000

NumberParameters: 2

   Parameter[0]: 00000000

   Parameter[1]: 0000000c

Attempt to read from address 0000000c

STACK_TEXT: 

WARNING: Stack unwind information not available. Following frames may be wrong.

19dcf988 112b7be5 2b291290 2409c454 2b291220 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x22c1a4

19dcf9e0 112b9c5f 00000046 2b291290 00000046 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x22a075

19dcf9f4 11797197 00000046 2b291290 2b827848 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x22c0ef

19dcfa30 11795def 1a4bf9b0 01291220 1a45f840 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x709627

19dcfa5c 11796b5c 2409c7a4 1a1eabe4 10a47bc0 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x70827f

19dcfc34 11798eb5 2409c18c 1a1ab0a8 19dcfc64 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x708fec

19dcfc70 11238a52 112bc2a7 2409c14c 1a1ab0a8 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x70b345

19dcfcbc 112bbd50 34209c00 2409c134 00000000 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x1aaee2

19dcfcf8 110955f7 2409c0d8 1a1f6b54 19dcfd30 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x22e1e0

19dcfd14 11810a8a 1a1ab0a8 2409c0f0 1a2a3f90 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x7a87

19dcfd3c 11810a37 1a2a3f90 1a1ce370 19dcfd5c RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x782f1a

19dcfd4c 1159738e 1a2a3f90 1a3a64a8 19dcfdd0 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x782ec7

19dcfd5c 77919512 1a1ce370 4668941a 005611c8 RuntimeCoreNETDesktop!AGRS_ValidateLicenseInfo+0x50981e

19dcfdd0 77904429 1a1ce370 1a3a64a8 466896fa ntdll!RtlpTpWorkCallback+0x11d

19dcff30 7584338a 005611c0 19dcff7c 778e9f72 ntdll!TppWorkerThread+0x572

19dcff3c 778e9f72 005611c0 466896b6 00000000 kernel32!BaseThreadInitThunk+0xe

19dcff7c 778e9f45 77903e85 005611c0 00000000 ntdll!__RtlUserThreadStart+0x70

19dcff94 00000000 77903e85 005611c0 00000000 ntdll!_RtlUserThreadStart+0x1b

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  runtimecorenetdesktop!AGRS_ValidateLicenseInfo+22c1a4

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: RuntimeCoreNETDesktop

IMAGE_NAME:  RuntimeCoreNETDesktop.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  54bef6ac

STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~24s; .ecxr ; kb

FAILURE_BUCKET_ID:  NULL_CLASS_PTR_DEREFERENCE_c0000005_RuntimeCoreNETDesktop.dll!AGRS_ValidateLicenseInfo

The nature of the crash is obviously catastrophic for the rest of our application, and far from ideal.

Thanks,

Jon

0 Kudos
KeithMacIntyre
New Contributor III

We are not using feature layers at all.  It looks like your crash is coming from the License check function.  That would be something that could be occurring when the application is doing nothing, like in our case.  Another thing we have in our application is a second small overview map on the same window.  Maybe having two mapview's in the same window could cause a problem?

0 Kudos
RexHansen
Esri Contributor

We have seen this issue before, but reproducing it has been elusive.  Keith, you mentioned trying to create a sample app but were not able to repro.  If you guys are able to provide a sample app to reproduce at some point in the future, please share.          

Thanks

-Rex

0 Kudos
KeithMacIntyre
New Contributor III

I have not seen the Access Violation since we upgraded to 10.2.5, however, just this afternoon I have many times started receiving the following error and our application crashing:

Unhandled exception at 0x770a2f71 in xxx.WPF.exe: 0xC0020001: The string binding is invalid.

> KernelBase.dll!770a2f71()

  [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]

  clr.dll!59d6b06b()

  clr.dll!59d6b06b()

  clr.dll!59e34ab9()

  clr.dll!59ab27fe()

  RuntimeCoreNETDesktop.dll!0f3d1c8a()

  RuntimeCoreNETDesktop.dll!0f3d0f9f()

  RuntimeCoreNETDesktop.dll!0f433371()

  msvcp120.dll!0556ef56()

0 Kudos