Ich habe das Problem, dass ich seit heute auf einer Maschine mit meiner WPF Applikation bei einem bestimmten Click immer einen Crash habe.
Auf anderen Maschinen läuft es und den Crash gab es gestern mit dem gleichen Code auf besagter Maschine auch nicht.
Der Stack-Trace im Event Log ist auch nicht aufschlussreich.
Fehlermeldung:
<Data>Application: xxx.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ApplicationException at DynamicClass.ExceptionHelper(System.Object) at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart(System.Object)
Mit viel Logging sehe ich auch nicht viel - hat jemand von Euch eine Idee, was ich machen sollte?
Hm. Ich nehme an, die ApplicationException behandeln und schauen, was dort im Stack ist, hast du schon probiert?
LaTino
"Furlow, is it always about money?"
"Is there anything else? I mean, how much sex can you have?"
"Don't know. I haven't maxed out yet."
(Furlow & Crichton, Farscape)
Wie mache ich das denn?
public partial class App : Application
{
private static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
Logger.Fatal(e.Exception);
e.Handled = true;
}
}
funktioniert nicht....Ich habe bisher keine App Klasse gehabt und habe mich nur um das MainWindow gekümmert.
App_DispatcherUnhandledException ist nur ein Eventhandler. Das Event selbst muss noch abonniert werden:
<Application
DispatcherUnhandledException="App_DispatcherUnhandledException">
...als Attribut zum sonstigen Geraffel in app.xaml hinzufügen.
LaTino
"Furlow, is it always about money?"
"Is there anything else? I mean, how much sex can you have?"
"Don't know. I haven't maxed out yet."
(Furlow & Crichton, Farscape)
Das hat leider auch nicht funktioniert. Der Crash passiert immer noch, aber ich sehe keinen StackTrace.
Das wars....3rd Party Komponente mit eigener App-Domain.
Jetzt weiß ich, was ich machen muss.
Vielen Dank für die tolle und kompetente Hilfe!