why windows 10 UWP app is crashing due to The application called an interface that was marshalled for a different thread?

0

I have a windows 10 UWP app and hockey app SDK integrated in it. I am unable to find the exact reason why app is crashing. I am providing the Hockey app crash log, please help me to fix the issue.

This is happening after installing and opening the app for the first time. From the next time onwards app is opening and not crashing and working fine.

Below is the hockey app crash log.

Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

Application Specific Information:

The application called an interface that was marshalled for a different thread. (Excep_FromHResult 0x8001010E)

Exception Stack:

Binary Images:
0x00007ffc23610000-0x00007ffc2500d000+Win.Appunknown<039259f40c314ebda8ccf39e237ab5c01>D:\xxx\xx\xx\Win.App\obj\x64\Staging\ilc\intermediate\Native\Win.App.pdb.

Thanks in advance.

uwp
windows-10-universal
uwp-xaml
xamarin.uwp
hockeyapp
asked on Stack Overflow Oct 15, 2018 by Suresh • edited Oct 17, 2018 by Nic3500

1 Answer

1

You must call your method in UI Thread.

This solve my problem :

        await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
           //Run Your code Here
        });
answered on Stack Overflow Oct 15, 2018 by Parsa Karami

User contributions licensed under CC BY-SA 3.0