locked
Search activation when snapped bug?

    Question

  • Hi everyone,

    I seem to be running into a bug when I activate my app to search from snapped viewState. What seems to be happening is, is that since the search activation first navigates to the search page and THEN unsnaps the app, the updateLayout (and initializeLayout) functions are called twice in quick succession. Something seems to go wrong here, because when I comment out the updateLayout code the app does not crash. I believe it may also have something to do with the listView, but I can't be sure.

    I have made a quick demo project to show the error (just the grid template with search contract added)  : http://sdrv.ms/NhE7a1

    To repro:

    1. Snap the app
    2. Windows+Q to search
    3. Enter search string
    4. Select the App from the Search List
    5. (probably) Crash

    I write probably, as for some reason this does not happen 100% of the time, which seems to indicate a timing issue.
    If anyone could give this a go and just let me know if this is indeed a bug I would be very grateful.

    Thanks,

    Censored

    Wednesday, July 11, 2012 7:22 PM

Answers

All replies

  • I tried to reproduce this with our app but didn't run into a crash after a couple of tries. Could still be a problem with the default grid template/search contract combination, though.
    Thursday, July 12, 2012 8:44 AM
  • Hi,

    The only way for me to reproduce this issue is to debug the application, open search, run until the search result page's UI shows up, and hit the break point in the initializeLayout method. It never occurs during normal usage. So I think it is probably caused by the break point.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    Monday, July 16, 2012 4:43 PM
    Moderator
  • Hi,

    thanks for giving it a shot to both of you!

    I just gave this another try and on both my laptop and desktop this seems to happen regardless of whether a breakpoint is defined or not. Even just running without Visual Studio open I can repro this. I still have no clue as to what causes this issue, however the fact that it also happens in a basic template test project seems to suggest it's not directly related to my app, rather a problem with the way the template code works.

    Thanks for any help,

    Censored

    Monday, July 16, 2012 5:23 PM
  • Hi,

    Since the issue cannot be reproduced on my side, if you treat it as a bug, you can also report it on http://connect.microsoft.com/VisualStudio to see whether it helps.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    Tuesday, July 17, 2012 10:39 AM
    Moderator