Answered by:
Stress test webview display on frame switch

Question
-
Hi,
I've a C# metro project in where I display a webview with an HTML content and some pages. When I switch page I check by reflection in my current display if I've a webview. After retreive it I set its source to my HTML file and my content is displayed. All this is async and enque in a worker.
But after switch 100 time between pages my content is replaced by my desktop background.
With the debugger I ve check webview attribut and all is clean.
Did some one have allready see an issue like this? How can I ensure my webview will be correctly displayed all the time?
- Edited by harckline Thursday, March 27, 2014 11:00 AM add
Thursday, March 27, 2014 10:55 AM
Answers
-
Hi,
So I ve investigate more and I found my mistake...
Every time I create a page I set an handler and I never detach it.
Sorry for all of this I ve failed.
- Marked as answer by harckline Friday, March 28, 2014 3:43 PM
Friday, March 28, 2014 3:42 PM
All replies
-
What kind of stress do you expect your application to run into? Maybe there's a bug, maybe there's a problem with your graphics card - I don't know. Do you think this is a real-world scenario?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Thursday, March 27, 2014 1:00 PMModerator -
Hi Matt,
Yes for me it's a scenario to check because if a user use this app to show pictures he can navigate more than 100 times.Since this morning I have caught two time a ressource exception when I try to display my webview. But it seems that in C# metro app we can't manage directly ressources. So I can't release ressources use by my webview. I ve see making tests that it wasn't directly the webview which crash but the frame which can't load the webview.
Morethan I ve try to change navigation method of Page class making it sync, async, in an other thread pool... But nothing fix this issue.
Thursday, March 27, 2014 1:15 PM -
Can you reproduce the problem on other machines?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Thursday, March 27, 2014 2:48 PMModerator -
Yes on 4 devices: 2 computer with windows 8.0, 1 with windows 8.1 and on a winrt surface
If you want my package to test by yourself please give me a place to post my package and the version you want (arm, x86, x64)
- Edited by harckline Thursday, March 27, 2014 3:25 PM
Thursday, March 27, 2014 2:53 PM -
Please post to OneDrive, x86.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Thursday, March 27, 2014 4:05 PMModerator -
https://onedrive.live.com/redir?resid=9D3284E6D45DC971!149&authkey=!AJiLsndTg5zKQbc&ithint=file%2c.rar
Thursday, March 27, 2014 4:20 PM -
I got it, what do I do?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Thursday, March 27, 2014 8:40 PMModerator -
Hi,
Sorry I ve forgot to give you the notification file.
Here you can take it : https://onedrive.live.com/redir?resid=9D3284E6D45DC971!150&authkey=!AOi5r1hqPMPSxdE&ithint=file%2c.txt
Download it and in your application package on folder "LocalState" past it.
After that you could see the webview in the app.
To produce the error just change page until notification display fail.
Friday, March 28, 2014 8:18 AM -
Hi,
So I ve investigate more and I found my mistake...
Every time I create a page I set an handler and I never detach it.
Sorry for all of this I ve failed.
- Marked as answer by harckline Friday, March 28, 2014 3:43 PM
Friday, March 28, 2014 3:42 PM