Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8758

WP8: splashscreen.hide() causes exception to be thrown

    XMLWordPrintableJSON

Details

    Description

      When calling the hide() method on splashscreen, on WP8, the call to Popup.IsOpen throws a TargetInvocationException due to invalid cross-thread access.

      I don't know the specifics, but most likely the threading model for how plugins are executed has changed over time, exposing this exception.

      + [System.Reflection.TargetInvocationException]

      {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Invalid cross-thread access. at MS.Internal.XcpImports.CheckThread() at System.Windows.DependencyObject.GetValueInternal(DependencyProperty dp) at System.Windows.FrameworkElement.GetValueInternal(DependencyProperty dp) at System.Windows.Controls.Primitives.Popup.get_IsOpen() at WPCordovaClassLib.Cordova.Commands.SplashScreen.hide(String options) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at WPCordovaClassLib.Cordova.Commands.BaseCommand.InvokeMethodNamed(String methodName, Object[] args) at WPCordovaClassLib.Cordova.Commands.BaseCommand.InvokeMethodNamed(String callbackId, String methodName, Object[] args) at WPCordovaClassLib.Cordova.NativeExecution.<>c__DisplayClass6.<ProcessCommand>b__2()}

      System.Reflection.TargetInvocationException

      Attachments

        Activity

          People

            Unassigned Unassigned
            dpolivy Dan Polivy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: