Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash because of State Container #8

Closed
plettb opened this issue Jul 12, 2015 · 10 comments
Closed

Crash because of State Container #8

plettb opened this issue Jul 12, 2015 · 10 comments

Comments

@plettb
Copy link

plettb commented Jul 12, 2015

Unfortunately, I haven't had time to go through this in detail to figure out what the problem is, but.... If I use Template10 and go through the "Navigation" session in "A Developer's Guide to Windows 10" (https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10/18/player?format=html5#time=8m51s), I get a crash when I perform the following:

  1. Enter something on the main page.
  2. Navigate to the second page to confirm it's working.
  3. Close the app, while on the second page.
  4. Open the app again. At this point, for me it comes up on the second page but with no "Back" button. That's the first indication of a problem.
  5. Hit "Back" anyway --> Crash!
@JerryNixon
Copy link
Member

How are you hitting Back without a Back button?

@plettb
Copy link
Author

plettb commented Jul 16, 2015

With the Windows key combination.

@JerryNixon
Copy link
Member

With Windows+BackSpace and hardware keys on your keyboard?

@plettb
Copy link
Author

plettb commented Jul 17, 2015

Sorry - I should have been more clear. [Alt][Left Arrow].

@JerryNixon JerryNixon changed the title Crash Crash because of State Container Jul 17, 2015
@plettb
Copy link
Author

plettb commented Jul 17, 2015

I take it, by the title change, that you've been able to reproduce this problem? If not, it's now even easier than before. If I download a completely clean copy of this solution (which, I'm delighted to say, now builds and doesn't appear to be missing files :-), use "Minimal" as my startup project, enter a value and go to page 2, close the app, open the app again, and click "Back", I get the crash.

@JerryNixon
Copy link
Member

You and I are equally delighted :) That being said, yes. This is clearly a problem. There was a race condition that was occurring. It might be resolved today. The good news is, this is not a crippling bug at this moment, developers can start to investigate the template without this coming up in most use cases. I sincerely appreciate you finding this bug for us. It would have taken a while before we got around to testing this behavior. Now we can fix it right away.

The fix will include a few things. The first is moving all the state logic out of the NavigationService and into the FrameFacade. This is just a logic move so that state for a frame is part of the frame. Just made sense. Then, there is the issue of the race condition. Changing the direct reference to the container to wrapped Setters is the start of the fix. The rest of the fix, honestly, is still being written so I can’t tell you more because there isn’t more yet. When it is all said and done, any developer using the template won’t even notice that we’ve made a chance :) That’s the goal.

From: plettb [mailto:notifications@github.com]
Sent: Friday, July 17, 2015 12:08 PM
To: Windows-XAML/Template10
Cc: Jerry Nixon
Subject: Re: [Template10] Crash because of State Container (#8)

I take it, by the title change, that you've been able to reproduce this problem? If not, it's now even easier than before. If I download a completely clean copy of this solution (which, I'm delighted to say, now builds and doesn't appear to be missing files :-), use "Minimal" as my startup project, enter a value and go to page 2, close the app, open the app again, and click "Back", I get the crash.


Reply to this email directly or view it on GitHub #8 (comment) .

@plettb
Copy link
Author

plettb commented Jul 17, 2015

I look forward to the fix. :-) (I'd gladly help, but I can't keep up with my OWN code, let alone help with this.)

By the way, I also get an exception any time I close the "Sample" app, but I'm guessing that's unrelated and I should add another issue about it. Unfortunately, as I alluded to, I just don't have nearly as much time for this kind of thing as I'd like!

@darenm
Copy link
Contributor

darenm commented Aug 10, 2015

I have noted occasional instability in the state code when exiting apps - I'll keep an eye out for the culprit (it may be a timing issue...)

@JerryNixon
Copy link
Member

I am going to leave this issue open until we can be confident that this has been resolved. I feel it has been, but I feel it has been resolved through general refactoring that has occurred not through a deliberate fix. So it feels right, but we can confirm it if it remains stable for the next little while.

@JerryNixon
Copy link
Member

Okay, I am confident now. I've tested your scenario and several others.

JerryNixon pushed a commit that referenced this issue Feb 29, 2016
JerryNixon pushed a commit that referenced this issue Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants