Navigation is not allowed crash.

4 posts, 0 answers
  1. MNP
    MNP avatar
    40 posts
    Member since:
    Apr 2008

    Posted 19 Apr 2011 Link to this post

    Can duplicate. I have a simple setup where I set the animation to be a RadTileAnimation to a container in a list box.

    this.SetValue(RadTileAnimation.ContainerToAnimateProperty, this.TileContainerListBox);

    If this case, the tile does a EmailComposeTask(). It works fine if I let the animation run, but if I "double tap"..ie. tap it again before the email compose screen comes up, it crashes with the following:

    Navigation is not allowed when the task is not in the foreground. Error: -2147220990
     
    ErrorStackTrace=   at Microsoft.Phone.Shell.Interop.ShellPageManagerNativeMethods.CheckHResult(Int32 hr)   at Microsoft.Phone.Shell.Interop.ShellPageManager.NavigateTo(ShellPage page)   at System.Windows.Navigation.Journal.AddHistoryPoint(JournalEntry journalEntry)   at System.Windows.Navigation.NavigationService.Navigate(Uri source)   at System.Windows.Controls.Frame.Navigate(Uri source)   at Telerik.Windows.Controls.RadPhoneApplicationFrame.TransitionControl_OldContentTransitionEnded(Object sender, EventArgs e)   at Telerik.Windows.Controls.RadTransitionControl.OnOldContentTransitionEnded()   at Telerik.Windows.Controls.RadTransitionControl.OldContentAnimation_Ended(Object sender, EventArgs e)   at Telerik.Windows.Controls.RadAnimation.OnEnded()   at Telerik.Windows.Controls.RadTileAnimation.OnEnded()   at Telerik.Windows.Controls.RadAnimation.OnStopped(PlayAnimationInfo info)   at Telerik.Windows.Controls.RadAnimationManager.StopStoryboard(PlayAnimationInfo info)   at Telerik.Windows.Controls.RadAnimationManager.OnStoryboardCompleted(Object sender, EventArgs e)   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

    Let me know if you need anything more.

    -Matt
  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 20 Apr 2011 Link to this post

    Hello Matt,

    Thanks for contacting us and for sending the stack trace of the issue that you experience.

    Based on the stack trace we could only guess what might cause this exception. Therefore we would kindly like to ask you to prepare a sample Windows Phone 7 application that we can use to reproduce the case and directly see what goes wrong.

    Please note that you will have to open a new support ticket in order to be able to attach a project.

    Thanks for your understanding and for the time taken.

    Best wishes,
    Deyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. MNP
    MNP avatar
    40 posts
    Member since:
    Apr 2008

    Posted 20 Apr 2011 Link to this post

    Hi Deyan,

    In Telerik's WP7 example, if you modify the PhoneApplicationFrame > Wizard > TileTransitionStartPage.xaml to the following,

    private void DoNavigate()
        {
            this.SetValue(RadTileAnimation.ContainerToAnimateProperty, this.TileContainerListBox);
     
            //MainViewModel.Instance.MainFrame.Navigate(new Uri("/PhoneApplicationFrame/Wizard/TileTransitionEndPage.xaml", UriKind.RelativeOrAbsolute));
         
            EmailComposeTask email = new EmailComposeTask();
            email.To = "support@bnid.ca";
            email.Subject = "WP7 Own This World Support";
            email.Body = "Hey BNID Admin, I'm having an issue with Own This World...";
     
            email.Show();
     
        }
    Then, double tap, or tap 2 times quickly it will crash. (This is on 2011 Q1 SP1 as well). 

    If you put a try/catch around the EmailComposeTask, it will catch it, however I think the underlying problem is the animation is taking the tap a 2nd time causing the call again, which errors out because the current window is now the email window.

    Let me know if you still want a small project.

    -Matt
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 25 Apr 2011 Link to this post

    Hello Matt,

    You need to set a check in your code, so that when the EmailTask is open -> to not open it again.

    The exception is thrown from the WP7 framework - it do not allows to open a new email task when one is already opened.


    Kind regards,
    Valentin.Stoychev
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top