Pregunta

Una aplicación .Net 4.0 sigue fallando para un usuario, pero solo para él, no pude reproducir el error.Adjuntó el WERInternalMetadata.xml archivo generado por Windows Crash Reporter.Al abrirlo descubrí que es un System.IO.FileNotFoundException eso bloquea el software, sin embargo, no hay funciones llamadas en esa función que generarían ese tipo de excepción, por lo que el problema está en otra parte o es más profundo.

Esta es la parte "más interesante" del archivo.Contiene números (hexadecimales), pero no pude descubrir qué significan.

<ProblemSignatures>
    <EventType>CLR20r3</EventType>
    <Parameter0>rstvshowtracker.exe</Parameter0>
    <Parameter1>1.0.3842.33258</Parameter1>
    <Parameter2>4c374e79</Parameter2>
    <Parameter3>mscorlib</Parameter3>
    <Parameter4>4.0.0.0</Parameter4>
    <Parameter5>4ba1da6f</Parameter5>
    <Parameter6>1620</Parameter6>
    <Parameter7>14</Parameter7>
    <Parameter8>System.IO.FileNotFoundException</Parameter8>
</ProblemSignatures>

¿Hay alguna manera de averiguar qué código causa la excepción, o al menos de descubrir algunos detalles más que el FileNotFoundException?

¿Fue útil?

Solución

En primer lugar, esto es lo que hay en ese seguimiento WER:

<Parameter0>rstvshowtracker.exe</Parameter0> - your exe
<Parameter1>1.0.3842.33258</Parameter1> - version of your exe
<Parameter2>4c374e79</Parameter2> - exe timestamp
<Parameter3>mscorlib</Parameter3> - assembly / module
<Parameter4>4.0.0.0</Parameter4> - assembly version
<Parameter5>4ba1da6f</Parameter5> - assm timestamp
<Parameter6>1620</Parameter6> - methodDef token of faulting method 
<Parameter7>14</Parameter7> - IL offset of faulting instruction
<Parameter8>System.IO.FileNotFoundException</Parameter8> - exception

Podrías usar WinDBG y SOS para averiguar cuál es ese método (p. ej.1620).Vea el ejemplo aquí sobre cómo hacerlo:http://blogs.msdn.com/b/oanapl/archive/2009/01/30/windows-error-reporting-wer-and-clr-integration.aspx

...Como alternativa, puede conectar el evento unhandledException en su aplicación e imprimir el seguimiento de la pila de excepciones en un archivo de registro para ver qué causó el problema;p.ej.

static void MyHandler(object sender, UnhandledExceptionEventArgs args) 
{
   Exception e = (Exception) args.ExceptionObject;
   // print out the exception stack trace to a log
}

public static void Main() 
{
   AppDomain currentDomain = AppDomain.CurrentDomain;
   currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top