3

I have a program, which at unexplained times throws this error:

System.AccessViolationException was unhandled
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

This is an x64 binary under Windows Server 2008. If the program is compiled as an x86 binary, the problem is less frequent, but still occurs.

The program is a server port program, it receives data from the network (UDP) and then send it to a user (if there is a user connected).

It worked until I added LZMA.c# to compress the data.

The LZMA.c# appears to be working correctly based on logging its functions.

Now, even if I remove LZMA.c# from the program, it still crashes at seemingly random times.

I can see nothing useful at the stack trace, it always looks like this:

ntdll.dll!000000007771fefa()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] KernelBase.dll!000007fefd7a10ac()
clr.dll!000007fef47d45bf()
clr.dll!000007fef47d4577()
clr.dll!000007fef47d44f8()
clr.dll!000007fef4b523d2()
clr.dll!000007fef4b522f0()
clr.dll!000007fef4dd7b85()
clr.dll!000007fef4dd78ce()
clr.dll!000007fef4be74aa()
clr.dll!000007fef4d1163f()
clr.dll!000007fef4d14d1c()
clr.dll!000007fef4d14b77()
clr.dll!000007fef4d147e4()
clr.dll!000007fef4d10fc6()
clr.dll!000007fef4b79841()
clr.dll!000007fef4b7ca67()
clr.dll!000007fef4b789bc()
clr.dll!000007fef4b7babf()
clr.dll!000007fef4b516d2()
clr.dll!000007fef4d98fa4()
msvcr110_clr0400.dll!000007fef5b48ca6()
ntdll.dll!000000007770554d()
ntdll.dll!00000000776e5d1c()
ntdll.dll!000000007771fe48()
00000000f3468180()
clr.dll!000007fef481f713()
clr.dll!000007fef481f242()
clr.dll!000007fef481f30b()
clr.dll!000007fef48d27c1()
clr.dll!000007fef48c6d80()
clr.dll!000007fef48c6d0e()
clr.dll!000007fef48c6c85()
clr.dll!000007fef48c6dbb()
clr.dll!000007fef48d2728()
clr.dll!000007fef48c98cf()
clr.dll!000007fef48c97d3()
clr.dll!000007fef49566ae()
kernel32.dll!00000000775cf56d()
ntdll.dll!0000000077703281()

What's wrong is it? (maybe it is crashing when gc is collecting garbage?)

John Hascall
  • 9,176
  • 6
  • 48
  • 72
NorSD NorSD
  • 225
  • 4
  • 14
  • possible duplicate of [How to debug corruption in the managed heap](http://stackoverflow.com/questions/7064966/how-to-debug-corruption-in-the-managed-heap) If this happens only on one machine i would check your memory. Otherwise check the other article – Manuel Amstutz Feb 18 '15 at 11:23

0 Answers0