Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with Application Hangs / Deadlocks in C#

Question: Are there any ways of logging or determining where deadlocks occur in an application provided to a client (possibly by enabling some flags in the build process)?

Background: Usually when I am testing code and a deadlock occurs, I am running in Visual Studio, so I can hit debug all and find which thread is waiting and where, and I immediately know what the issue is. However, there is a certain issue which causes my application to freeze up very rarely (it is not detected in unit or integration tests). This happens on a clients machine where he is only running the executable binary. I'm interested in knowing if there are any features I can enable that can help report these issues, since it's hard to say exactly would could be the problem without a debugger.

like image 590
Anil Vaitla Avatar asked Oct 04 '22 06:10

Anil Vaitla


1 Answers

You can get the client to create a minidump from TaskManager or Process Explorer. See this article for more information.

like image 93
Ian Mercer Avatar answered Oct 10 '22 03:10

Ian Mercer