Laden...

ApplicationException nach einem Click

Erstellt von weismat vor 7 Jahren Letzter Beitrag vor 7 Jahren 1.426 Views
W
weismat Themenstarter:in
872 Beiträge seit 2005
vor 7 Jahren
ApplicationException nach einem Click

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?

3.003 Beiträge seit 2006
vor 7 Jahren

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)

W
weismat Themenstarter:in
872 Beiträge seit 2005
vor 7 Jahren

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.

3.003 Beiträge seit 2006
vor 7 Jahren

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)

W
weismat Themenstarter:in
872 Beiträge seit 2005
vor 7 Jahren

Das hat leider auch nicht funktioniert. Der Crash passiert immer noch, aber ich sehe keinen StackTrace.

709 Beiträge seit 2008
vor 7 Jahren

Bekommst du über das AppDomain.CurrentDomain.UnhandledException-Ereignis Infos?

W
weismat Themenstarter:in
872 Beiträge seit 2005
vor 7 Jahren

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!