uwp Windows.UI.Xaml.Markup.XamlParseException

58 views Asked by At

I found a crash on App Center, which reports that

ComCallHelpers.Call (__ComObject, RuntimeTypeHandle, Int32, Type__Impl.UnsafeType, Void*, Void*)

Windows.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found. Cannot create instance of type 'SMPlayer.MediaControl' [Line: 0 Position: 0]

Below is the code of my MediaControl.xaml.

[![enter image description here](https://i.stack.imgur.com/acgUZ.png)](https://i.stack.imgur.com/acgUZ.png)

This crash doesn't occur very often but it does affect a few users. What's wrong with my MediaControl? I believe this error means my xaml file has some illegal text but what is line 0 position 0? It is really confusing.

enter image description here

--- Update ---

This is my code for handling the crash

    private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
    {
        Log.Error("App_UnhandledException {0}", e.Exception);
        if (e.Exception is XamlParseException) 
        {
            return;
        }
        e.Handled = true;
        Helper.ShowEmailFeedbackNotification("UnknownExceptionOccurred", "UnknownExceptionOccurredEmailTitle", Helper.GetStackTraceMessage());
    }

But I'm still getting new non-xaml crashes.

enter image description here enter image description here

0

There are 0 answers