locked
Windows phone 8.1 Update 1 ACCESS VIOLATION when navigating using 'tapped event'

    Question

  • I have an app for windows phone 8.1 based on WinRT. Here's explanation of a problem I'm facing after 8.1 update 1:
    On the main page I have an image that can be moved around (composite transform) and is also bound to tapped event which navigates to a different page. The app is crashing randomly when we tap it (sometimes it does, sometimes doesn't).

    However if I navigate to same page using button, it works fine.

    Here's the sequence of events:

    1) Tapped event is called.

    2) onNavigatedTo on the new page is completed

    3) Tapped event is completed

    This is the time when app just closes. Debugger cannot catch what the error line. It just shows:

    The program '[656] MyProgram.exe' has exited with code -1073741822 (0xc0000002).

    OR

    exited with code (0xc0000005) access violation

    It used to work perfectly on 8.1. Is there some bug in 8.1 update 1?

    Can anyone help?

    NOTE: The SDK on my computer is still 8.1 while my device is 8.1 update 1. Still, since the app is crashing, there must be some change/bug in update 1 that's causing this issue. I will update to SDK update 1 to see if debugger catches the error line

    • Edited by Saurabh3300 Thursday, August 07, 2014 7:02 AM added a note
    Thursday, August 07, 2014 6:37 AM

All replies

  • Found the fix
    Just use Dispatcher to call Frame.Navigate
    Thursday, August 07, 2014 3:17 PM
  • Hi, I got this issue like you. Maybe bug of 8.1 update 1
    Friday, August 08, 2014 9:48 AM
  • Hi,

    Using Dispatcher solved my problem. You can try this:

    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    Frame.Navigate(typeof(SecondPage));

    • Proposed as answer by Marais van Zyl Wednesday, August 13, 2014 5:47 PM
    Friday, August 08, 2014 1:36 PM
  • Hi,

    Using Dispatcher solved my problem. You can try this:

    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
                    Frame.Navigate(typeof(SecondPage));

    Thanks Saurabh3300. Btw, do you know this issue was post to windows phone bug list?
    Monday, August 11, 2014 3:19 AM
  • I am still getting this issue, but only when using Frame.GoBack (or NavigationHelper.GoBack), even when using the dispatcher. Does anyone know if there is a further fix? Did updating to SDK Update 1 fix anything?
    Tuesday, August 12, 2014 9:51 PM