Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I am getting .net app crash unexpectedly.
My code and everything looks fine.

I am really struggling to figure this out

I got the below information from dump file(.dmp).

he
C#
PID__4120__Date__08_29_2016_Time_11_13_58AM__139__Second_Chance_Exception_C0000005.dmp the assembly instruction at ntdll!RtlpLowFragHeapFree+c5 in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to write to memory location 0x00000000 on thread 0


What I have tried:

Please help me solve this issue...

This is driving me crazy..

Thanks.
Posted
Updated 30-Aug-16 12:23pm
Comments
ZurdoDev 30-Aug-16 16:21pm    
How can we help with such little information?
PureNsanity 30-Aug-16 17:36pm    
That error is likely going to be deep in the call stack. When debugging make sure to have the exception settings set to throw all exceptions so hopefully while debugging you can see where this is originating from.
Dave Kreskowiak 30-Aug-16 17:38pm    
Well, it looks like your code tried to free a block of memory that was already freed up or it tried to free a block of memory that it didn't own.

Other that, it's impossible to tell you anything useful. We have no idea what your code looks like and no information on what line of code is throwing the exception.
Philippe Mori 30-Aug-16 18:27pm    
Is it reproductible? If so, look at available information when the error occurs using a debugger.
Foothill 31-Aug-16 17:40pm    
Well, for starters, 0x00000000 is a reserved address in Windows, as it is the NULL address. Most C programmers initialize pointers to the NULL address so programs die in this way so it's clear they forgot to assign something important a value. Since you are getting this particular error, I would start by looking for any points that the code jumps from .Net Managed to Win32 native, like System.IO, and make sure that all the parameters to the call are correct.

1 solution

You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.

The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html[^]
https://www.jetbrains.com/idea/help/debugging-your-first-java-application.html[^]

The debugger is here to show you what your code is doing and your task is to compare with what it should do.
When the code don't do what is expected, you are close to a bug.

You need to locate where the exception occurs on your code.
Since the debugger allow to run your program step by step, it should not be too complicated.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900