1

I have an app running on a client machine, that uses threading, and is working fine, until the problem arrives. The app crash every 2 or 3 days, and I have to restart it. This is the error information I can get from the Event Viewer on the client machine.

Nombre de la aplicación con errores: SEM.CCQ.exe, versión: 1.15.0.0, marca de tiempo: 0x5b4488d8
Nombre del módulo con errores: ntdll.dll, versión: 6.1.7601.24094, marca de tiempo: 0x5abee643
Código de excepción: 0xc0000374
Desplazamiento de errores: 0x00000000000bf6b2
Id. del proceso con errores: 0x18700
Hora de inicio de la aplicación con errores: 0x01d41a9f081a1380
Ruta de acceso de la aplicación con errores: C:\SEM.CCQ\SEM.CCQ.exe
Ruta de acceso del módulo con errores: C:\Windows\SYSTEM32\ntdll.dll
Id. del informe: 1fa3b455-8919-11e8-9638-ec8eb5708651

It's crazy to try to locate the problem. Don't know how to start as the problem is not coming very often. Is there any way to debug/catch this kind of problem to try to solve it? Any help will be appreciated.

Jortx
  • 707
  • 1
  • 7
  • 22
  • Hi, I don't know if you're aware, but there is a spanish language version of stack overflow at https://es.stackoverflow.com/ There aren't so many spanish speakers here :-) – David Wilson Jul 17 '18 at 12:10
  • 1
    @DavidWilson : Since he asked his question in english I don't see why he would switch sites? The error can be easily translated with Google Translate. But the only really important part is the error code (0xc0000374). – Visual Vincent Jul 17 '18 at 12:33
  • 2
    @Jortx : If an error occurred inside the .NET runtime (i.e. by your application) there should be two logs in the Event Viewer: `Application Error` and `.NET Runtime`. You've posted the former. Can you check if a `.NET Runtime` log is also present? And if so, can you post it here? It includes more useful error information. – Visual Vincent Jul 17 '18 at 12:36
  • 1
    You might also want to look into handling the [**`AppDomain.UnhandledException`**](https://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception(v=vs.110).aspx) event. With it you can catch and properly log _all_ unhandled errors that occurs in your application. Remember to log both the message and the stack trace. – Visual Vincent Jul 17 '18 at 12:42
  • 2
    Regarding the error code (0xc0000374) I managed to find this: [Heap Corruption Exception 0xC0000374](https://blogs.msdn.microsoft.com/calvin_hsia/2015/01/30/heap-corruption-exception-0xc0000374/). Are you doing any Platform Invocation (P/Invoking), or in any way working with unmanaged memory? **EDIT:** Regarding the Event Viewer, also look for an entry called `CLR20r3`. – Visual Vincent Jul 17 '18 at 12:50
  • 1
    @VisualVincent: Searching for the .Net Runtime record in Event Viewer I have to tell you that I found it for other errors. I can see the "Application Error" and just below I can find the related .NET runtime record. But not in the case of ntdll.dll errors, they are just an isolated Application Error, without any related .NET runtime error... – Jortx Jul 27 '18 at 09:23
  • 1
    Hard to diagnose then... All I can advise you is to check your P/Invoke signatures (if you have any) and make sure that you access your variables in a thread-safe manner (`SyncLock`, invoking and whatnot). – Visual Vincent Jul 27 '18 at 14:40

0 Answers0