none
[Universal App] WebView crashing when scrolling (windows phone 8.1)

    Question

  • Im trying to load html content from a string using WebView.NavigateToString.  The page loads fine but when I scroll before all content is loaded the app crashes And the debugger says the app exited normally. The memory usage is also normal there are no weird spikes so I don't think that could be the problem either. 

    I made an example app which can be downloaded from http://speedy.sh/aedfb/App2.rar. The app crashes less often when using the emulator compared to a real device (Lumia 520 in my case).

    Pick an article an article and scroll down as fast as you can.

    If you don't want to try the solution this is the code I have used:

    MainPage.cs

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;
    
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
    
    namespace App2
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class MainPage : Page
        {
            public MainPage()
            {
                this.InitializeComponent();
    
                this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Required;
            }
    
            /// <summary>
            /// Invoked when this page is about to be displayed in a Frame.
            /// </summary>
            /// <param name="e">Event data that describes how this page was reached.
            /// This parameter is typically used to configure the page.</param>
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                // TODO: Prepare page for display here.
    
                // TODO: If your application contains multiple pages, ensure that you are
                // handling the hardware Back button by registering for the
                // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
                // If you are using the NavigationHelper provided by some templates,
                // this event is handled for you.
            }
    
            private void article1_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage),"<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] Os melhores jogos gratuitos para Windows Phone #3</b></p><p style=\"text-align: justify;\">Hoje temos mais uma vez uma dica de 5 games gratuitos para Windows Phone. Se o seu jogo favorito não aparecer nesta seleção, confira os <a href=\"http://www.wpmania.com.br/2014/06/26/video-5-jogos-gratuitos-estilo-plataforma-01/\" target=\"_blank\">outros vídeos</a> pois ele pode estar lá e, caso não esteja, deixe o nome dele nos comentários para que o nosso parceiro Marcos possa fazer o vídeo com a dica para os demais leitores!</p><p style=\"text-align: justify;\"><strong>Sem mais delongas, confira o vídeo abaixo: </strong></p><p><iframe src=\"https://www.youtube.com/embed/rDiL8Z_nz0k\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p></body></html>");            
            }
    
            private void article2_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] Confira todas as estatísticas de seu Instagram, Twitter e Facebook com o Instatic!</b></p><p style=\"text-align: justify;\">Sempre ficamos curiosos para saber informações sobre nosso instagram. Quem nunca pensou: &#8220;Será que alguém q não me segue fica curtindo minhas fotos?&#8221;, ou então &#8220;Quem será a pessoa que eu mais curti fotos?&#8221;. Essa e muitas outras perguntas poderão ser respondidas pelo excelente aplicativo <strong>Instatic</strong>! Confira agora nosso <strong>Review </strong>do aplicativo!</p><p style=\"text-align: justify;\"><img class=\"aligncenter size-full wp-image-30714\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/08/Instatic-Ban.png\" alt=\"Instatic Ban\" width=\"800\" height=\"450\" /></p><p style=\"text-align: justify;\"><span style=\"color: #ff0000;\"><strong>Principais funções do aplicativo:</strong></span></p><ul><li>Confira seus novos seguidores.</li><li>Confira aqueles que não te seguem mais.</li><li>Confira aqueles que você segue e não te seguem de volta (haters).</li><li>Confira aqueles que você não segue e te seguem (fans).</li><li>Confira aqueles que curtem suas fotos mesmo sem te seguir.</li><li>Confira sua publicação mais curtida e sua publicação mais comentada.</li><li>Confira quem mais curte as suas fotos e também quem mais comenta suas fotos.</li><li>Confira a pessoa que você mais curtiu fotos.</li><li>Confira seus seguidores fantasmas (aqueles que não curtiram pelo menos uma de suas 50 ultimas postagens).</li><li>Confira sua média de likes, comentários e publicações.</li><li>Confira aqueles que curtiram pelo menos uma de suas ultimas 50 fotos.</li><li>Estatísticas sobre horário que você mais posta fotos.</li><li>Estatísticas sobre número de novos seguidores ou seguidores perdidos.</li><li>Estatísticas sobre suas fotos, como por exemplo: Likes, Comentários, Filtro mais usado, Hashtag mais usada.</li><li>Estatísticas sobre Likes de seguidores e não seguidores, Likes que você deu em seguidos e não seguidos.</li><li>Saiba quem foi seu primeiro seguidor, quem você seguiu primeiro e também sua primeira foto.</li></ul><p><span style=\"color: #ff0000;\"><strong>Outras funções:</strong></span></p><ul><li><strong>Facebook: </strong>Confira seus novos amigos e aqueles que você excluiu ou te excluiram.</li><li><strong>Twitter: </strong>Confira novos seguidores e aqueles que não te seguem mais. Confira seus Fans e seus Haters também!</li></ul><p><span style=\"color: #ff0000;\"><b>Futuras novidades do aplicativo:</b></span></p><ul><li>Aplicativo será totalmente e português.</li></ul><p>O desenvolvedor informou que também irá tentar colocar informações do Twitter como por exemplo: Tweet mais retweetado e mais curtido, quem mais te mencionou, quem você mais menciona, e etc.</p><p><span style=\"color: #ff0000;\"><strong>Confira nossa análise em vídeo sobre o aplicativo:</strong></span><br /><iframe src=\"https://www.youtube.com/embed/CUhXjGsigVM\" width=\"853\" height=\"480\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: center;\"><b>Para baixar o Instatic acesse a Windows Phone Store ou efetue leitura do QrCode abaixo:</b></p><p style=\"text-align: center;\"><a href=\"http://www.windowsphone.com/pt-br/store/app/instatic/406736e3-292d-4cba-b1aa-a29f52b6d06f\" target=\"_blank\"><img class=\"aligncenter size-full wp-image-30715\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/08/Instatic-Windows-Phone-QrCode.png\" alt=\"Instatic Windows Phone QrCode\" width=\"582\" height=\"130\" /></a></p><p>&nbsp;</p></body></html>");            
            }
    
            private void article3_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] Adicione emoticons no título das Live Folders!</b></p><p><img class=\"aligncenter size-full wp-image-30398\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/08/windows-phone-8.1-update-1-gdr1.png\" alt=\"windows phone 8.1 update 1 gdr1\" width=\"1000\" height=\"563\" /></p><p style=\"text-align: justify;\">Com a <a href=\"http://www.wpmania.com.br/2014/08/04/windows-phone-8-1-gdr1-ja-esta-disponivel-para-aqueles-que-usam-a-preview-for-developers/\" target=\"_blank\">chegada do Windows Phone 8.1 GDR1 Preview</a>, tivemos varias melhorias no Windows Phone, muitas destas estão &#8220;ocultas&#8221;, ou seja, a cada dia vamos encontrando novas funcionalidades. Como você já deve saber, uma das maiores novidades da GDR1 Preview é a criação de pastas nativamente, as chamadas &#8220;Live Folders&#8221;.  Mas o que pouca gente notou é possibilidade de adicionar emoticons junto ao nome da pasta. O nosso parceiro Marcos do canal WindowsPhoneTec percebeu e fez um vídeo demostrando como se adiciona estes emoticons no nome de uma determinada pasta.</p><p style=\"text-align: justify;\"><strong>Confira o vídeo abaixo: </strong></p><p><iframe src=\"https://www.youtube.com/embed/Q6fehKtFAwk\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p></body></html>");            
            }
    
            private void article4_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] Melhores apps da semana!</b></p><p><img class=\"aligncenter size-full wp-image-6368\" src=\"http://www.wpmania.com.br/wp-content/uploads/2013/02/windows-phone-7-apps-marketplace.jpg\" alt=\"windows-phone-7-apps-marketplace\" width=\"970\" height=\"584\" /></p><p>Hoje, terça feira, é dia do vídeo dos melhores apps da semana! Como muitos de vocês pedirão, na sexta feira teremos o vídeo dos melhores jogos e no sábado a matéria completa sobre todos os melhores aplicativos e games da semana!</p><p><strong>Confiram o vídeo abaixo: </strong></p><p><iframe src=\"https://www.youtube.com/embed/vEAtOdIe1AU\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p></body></html>");            
            }
    
            private void article5_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>Microsoft investe em propagandas!</b></p><p style=\"text-align: justify;\"><img class=\"aligncenter size-large wp-image-30381\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/08/Captura-de-Tela-20-1024x575.png\" alt=\"Windows Phone WPM\" width=\"620\" height=\"348\" />Parece que a Microsoft está mudando o seu posicionamento com relação as propagandas no Brasil. Antes era quase impossível ver propagandas dos Lumias na Tv ou mesmo na internet, mas atualmente as coisas estão mudando pois já é possível ver o Lumia 630 em algumas propagandas na Tv e no YouTube.</p><p style=\"text-align: justify;\"><strong>Veja a propaganda do mid-end da Microsoft que é passada <strong>na Tv e no </strong><strong>Youtube:</strong><strong> </strong></strong><br /><iframe src=\"https://www.youtube.com/embed/UW4NLDbRifg\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: justify;\">Hoje o programa Pânico na Band também fez uma propaganda do Lumia 630 com um jeito todo irreverente, <strong>confira o vídeo abaixo gravado pelo site FaixaMobi:</strong><br /><iframe src=\"https://www.youtube.com/embed/GCyZ0E2onwM\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: justify;\"><em>Via: <a href=\"http://faixamobi.com/2014/08/03/merchan-lumia630-panico-na-band/\" target=\"_blank\">FaixaMobi. </a></em></p></body></html>");            
            }
    
            private void article6_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] Live Folders da GDR1 do WP8.1</b></p><p style=\"text-align: justify;\"><img class=\"aligncenter size-full wp-image-29786\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/07/GDR1.jpg\" alt=\"GDR1\" width=\"982\" height=\"476\" /></p><p style=\"text-align: justify;\"> Enquanto muitos usuários estão esperando a Lumia Cyan, a Microsoft já está mostrando o que teremos de novo na GDR1 do WP8.1.</p><p style=\"text-align: justify;\">Alguns dias atrás noticiamos o anuncio da Microsoft sobre as novidades do Windows Phone 8.1 Update 1 preview que estará disponível para todos os desenvolvedores na próxima semana, dentre as novidades citadas pela Microsoft estavam a &#8220;Live Folder&#8221;, que é uma espécie de &#8220;pasta de tile&#8221; na qual você poderá organizar os aplicativos em pastas na tela inicial, você terá apenas que arrastar um aplicativo e solta-lo em cima de outro e a pasta será criada automaticamente podendo escolher o tamanho e o nome.</p><p style=\"text-align: justify;\"><img class=\"aligncenter size-full wp-image-30088\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/07/large-live-folder-collapsed-690x608.png\" alt=\"large-live-folder-collapsed-690x608\" width=\"690\" height=\"608\" /></p><p style=\"text-align: justify;\"><strong>Hoje um vídeo vazado no Youtube mostra estas &#8220;Live folders&#8221; em ação, confira o vídeo abaixo:</strong></p><p style=\"text-align: justify;\"><iframe src=\"https://www.youtube.com/embed/Ha_KnOVE6ow\" width=\"640\" height=\"480\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: justify;\"><em>Via: <a href=\"http://www.plaffo.com/2014/08/ufficiale-microsoft-annuncia-wp8-1-update-1-per-gli-sviluppatori-dalla-prossima-settimana/\" target=\"_blank\">Plaffo. </a></em><br /><em>  </em></p><p style=\"text-align: justify;\"></body></html>");            
            }
    
            private void article7_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>[Vídeo] O que os vendedores sabem do Windows Phone?</b></p><p><img class=\"aligncenter size-full wp-image-30132\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/07/Windows-Phone-8-logo.jpg\" alt=\"Windows-Phone-8-logo\" width=\"1000\" height=\"421\" /></p><p style=\"text-align: justify;\">Se você conhece um pouco o Windows Phone e já foi comprar algum aparelho com o sistema operacional móvel da Microsoft em alguma loja física provavelmente você já ouviu muita bobagem.</p><p style=\"text-align: justify;\">É porque os vendedores odeiam o sistema? Ou porque não conhecem? Não podemos adivinhar! Fato é que na maioria das vezes os vendedores das lojas do varejo raramente falam bem do Windows Phone, isso atrapalha nas vendas porque o Windows Phone já tem as suas carências e eles ainda inventam coisas que não existem, dificultando ainda mais o crescimento do Windows Phone.</p><p style=\"text-align: justify;\"><strong>O canal <span style=\"font-family: arial,helvetica,sans-serif;\"><a href=\"https://www.youtube.com/channel/UCJ34xihoe4mwgg7vD7wH9BQ\" target=\"_blank\"><span style=\"color: #003366;\">WPSouza</span></a></span> fez um vídeo para testar o conhecimento dos vendedores (eu já achei piores), confira o vídeo abaixo e tire as suas próprias conclusões:</strong></p><p>&nbsp;</p><p><iframe src=\"https://www.youtube.com/embed/iuiQgxZEGCU\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p></body></html>");            
            }
    
            private void article8_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>Nokia lança novo vídeo para promover o Lumia 530!</b></p><p style=\"text-align: justify;\"><img class=\"aligncenter size-large wp-image-29346\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/07/Lumia-530-1024x575.png\" alt=\"Lumia 530\" width=\"620\" height=\"348\" /></p><p style=\"text-align: justify;\">Depois do <a href=\"http://www.wpmania.com.br/2014/07/23/nokia-lumia-530-e-anunciado-oficialmente/\" target=\"_blank\">lançamento oficial</a> do Lumia 530, a Nokia já havia divulgado dois vídeos promocionais do aparelho e hoje a empresa lançou outro vídeo enfatizando o título &#8220;O poder para as pessoas&#8221;. O vídeo mostra diferentes tipos de usuários nos mais diversos lugares usando o aparelho em várias cores. Estas cores provavelmente não chegarão no Brasil, mas como a tampa do aparelho é removível poderemos encontrá-las nas lojas físicas da Nokia.</p><p style=\"text-align: justify;\"><strong>Confiram o vídeo abaixo:</strong></p><p style=\"text-align: justify;\"><iframe src=\"https://www.youtube.com/embed/NuwEwygXnOc\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"color: #393939; text-align: justify;\">Especificações:</p><ul style=\"color: #555555; text-align: justify;\"><li>Processador Quadcore 1.2 Qualcomm Snapdragon 200</li><li>Tela de 4 polegadas com uma resolução FWVGA (854 x 480)</li><li>Memória interna de 4 GB + microSD com suporte para até 128GB</li><li>Memória 512 MB de RAM</li><li>Câmera traseira de 5 MP</li><li>Dimensões 119,7 x 62,3 x 11,7</li><li>Peso 129g</li><li>Bateria 1430 mAh.</li><li>Cores disponíveis: verde, laranja, preto e branco</li></ul><p style=\"text-align: justify;\">Realmente o Lumia 530 tem tudo para ser um sucesso! Como informamos com exclusividade aqui no Windows Phone Mania, ele chega ao Brasil antes do Lumia 930 <a href=\"http://www.wpmania.com.br/2014/07/22/exclusivo-nokia-lumia-530-sera-lancado-no-brasil-por-r-39900/\" target=\"_blank\">custando R$399.</a> Resta apenas aguardar essa &#8220;belezinha&#8221; e torcer para que ele seja um sucesso assim como seu irmão mais velho, o Lumia 520.</p><p style=\"text-align: justify;\">Via: <a href=\"http://www.wpcentral.com/new-lumia-530-promo-video-shows-its-variety-apps-and-colors?utm_source=wpc&amp;utm_medium=twitter\" target=\"_blank\">WPC. </a></p></body></html>");            
            }
    
            private void article9_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>Gameplay da semana: Modern Combat 5</b></p><p><strong><img class=\"aligncenter size-full wp-image-29293\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/07/modern-combat-5-blackout-windows-phone-jogo.jpg\" alt=\"modern-combat-5-blackout-windows-phone-jogo\" width=\"609\" height=\"229\" /></strong></p><p>Há algumas semanas estamos postando gamplayes de lançamentos de jogos para Windows Phone, mas não tínhamos uma regularidade, porém, desde a semana passada iniciamos uma nova &#8220;série&#8221; aqui no Windows Phone Mania, todas as sextas-feiras <del>(ou quase todas)</del> teremos gameplays, sejam eles  lançamentos, ou uma dica de um jogo qualquer.</p><p>Hoje, trazemos o novíssimo <strong>Modern Combat 5: Blackout</strong>, <a href=\"http://www.wpmania.com.br/2014/07/24/modern-combat-5-blackout-finalmente-chega-ao-windows-phone/\">lançado ontem</a>!</p><p><strong>Confiram o vídeo abaixo:</strong><br /><iframe src=\"https://www.youtube.com/embed/1VXe2VEL0y8\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe><br /><strong>E vocês, gostaram da série de gameplays as sextas-feiras?</strong></p><p>&nbsp;</p><p>&nbsp;</p></body></html>");            
            }
    
            private void article10_Click(object sender, RoutedEventArgs e)
            {
                Frame.Navigate(typeof(webviewpage), "<!doctype html><html><head><style>img {display: block;margin-left: auto;margin-right: auto;margin-top: 20px; margin-bottom: 20px; width: 100%; height: auto} li { font-size: 2em; } ul { font-size: 25px; } iframe { width: 950; height: 720; display: block;margin-left: auto;margin-right: auto} blockquote { font-size: 3em; font-style:italic; }</style></head><body><p><b>Microsoft investe em propagandas!</b></p><p style=\"text-align: justify;\"><img class=\"aligncenter size-large wp-image-30381\" src=\"http://www.wpmania.com.br/wp-content/uploads/2014/08/Captura-de-Tela-20-1024x575.png\" alt=\"Windows Phone WPM\" width=\"620\" height=\"348\" />Parece que a Microsoft está mudando o seu posicionamento com relação as propagandas no Brasil. Antes era quase impossível ver propagandas dos Lumias na Tv ou mesmo na internet, mas atualmente as coisas estão mudando pois já é possível ver o Lumia 630 em algumas propagandas na Tv e no YouTube.</p><p style=\"text-align: justify;\"><strong>Veja a propaganda do mid-end da Microsoft que é passada <strong>na Tv e no </strong><strong>Youtube:</strong><strong> </strong></strong><br /><iframe src=\"https://www.youtube.com/embed/UW4NLDbRifg\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: justify;\">Hoje o programa Pânico na Band também fez uma propaganda do Lumia 630 com um jeito todo irreverente, <strong>confira o vídeo abaixo gravado pelo site FaixaMobi:</strong><br /><iframe src=\"https://www.youtube.com/embed/GCyZ0E2onwM\" width=\"640\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe></p><p style=\"text-align: justify;\"><em>Via: <a href=\"http://faixamobi.com/2014/08/03/merchan-lumia630-panico-na-band/\" target=\"_blank\">FaixaMobi. </a></em></p></body></html>");            
            }
        }
    }

    webviewpage.cs

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;
    
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkID=390556
    
    namespace App2
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class webviewpage : Page
        {
            public webviewpage()
            {
                this.InitializeComponent();
            }
    
            /// <summary>
            /// Invoked when this page is about to be displayed in a Frame.
            /// </summary>
            /// <param name="e">Event data that describes how this page was reached.
            /// This parameter is typically used to configure the page.</param>
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                browser.NavigateToString(e.Parameter.ToString());
            }
        }
    }

    App.xaml.cs

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.ApplicationModel;
    using Windows.ApplicationModel.Activation;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Media.Animation;
    using Windows.UI.Xaml.Navigation;
    #if WINDOWS_PHONE_APP
            using Windows.Phone.UI.Input;
    #endif
    
    // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
    
    namespace App2
    {
        /// <summary>
        /// Provides application-specific behavior to supplement the default Application class.
        /// </summary>
        public sealed partial class App : Application
        {
    #if WINDOWS_PHONE_APP
            private TransitionCollection transitions;
    #endif
    
    
    
            /// <summary>
            /// Initializes the singleton application object.  This is the first line of authored code
            /// executed, and as such is the logical equivalent of main() or WinMain().
            /// </summary>
            public App()
            {
                this.InitializeComponent();
                this.Suspending += this.OnSuspending;
    
                #if WINDOWS_PHONE_APP
                HardwareButtons.BackPressed += HardwareButtons_BackPressed;
    #endif
    
            }
    
            /// <summary>
            /// Invoked when the application is launched normally by the end user.  Other entry points
            /// will be used when the application is launched to open a specific file, to display
            /// search results, and so forth.
            /// </summary>
            /// <param name="e">Details about the launch request and process.</param>
            protected override void OnLaunched(LaunchActivatedEventArgs e)
            {
    #if DEBUG
                if (System.Diagnostics.Debugger.IsAttached)
                {
                    this.DebugSettings.EnableFrameRateCounter = true;
                }
    #endif
    
                Frame rootFrame = Window.Current.Content as Frame;
    
                // Do not repeat app initialization when the Window already has content,
                // just ensure that the window is active
                if (rootFrame == null)
                {
                    // Create a Frame to act as the navigation context and navigate to the first page
                    rootFrame = new Frame();
    
                    // TODO: change this value to a cache size that is appropriate for your application
                    rootFrame.CacheSize = 1;
    
                    if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                    {
                        // TODO: Load state from previously suspended application
                    }
    
                    // Place the frame in the current Window
                    Window.Current.Content = rootFrame;
                }
    
                if (rootFrame.Content == null)
                {
    #if WINDOWS_PHONE_APP
                    // Removes the turnstile navigation for startup.
                    if (rootFrame.ContentTransitions != null)
                    {
                        this.transitions = new TransitionCollection();
                        foreach (var c in rootFrame.ContentTransitions)
                        {
                            this.transitions.Add(c);
                        }
                    }
    
                    rootFrame.ContentTransitions = null;
                    rootFrame.Navigated += this.RootFrame_FirstNavigated;
    #endif
    
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    if (!rootFrame.Navigate(typeof(MainPage), e.Arguments))
                    {
                        throw new Exception("Failed to create initial page");
                    }
                }
    
                // Ensure the current window is active
                Window.Current.Activate();
            }
    
    #if WINDOWS_PHONE_APP
            /// <summary>
            /// Restores the content transitions after the app has launched.
            /// </summary>
            /// <param name="sender">The object where the handler is attached.</param>
            /// <param name="e">Details about the navigation event.</param>
            private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e)
            {
                var rootFrame = sender as Frame;
                rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() };
                rootFrame.Navigated -= this.RootFrame_FirstNavigated;
            }
    #endif
    
    #if WINDOWS_PHONE_APP
            void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e)
            {
                Frame rootFrame = Window.Current.Content as Frame;
    
                if (rootFrame != null && rootFrame.CanGoBack)
                {
                    e.Handled = true;
                    rootFrame.GoBack();
                }
            }
    #endif
    
            /// <summary>
            /// Invoked when application execution is being suspended.  Application state is saved
            /// without knowing whether the application will be terminated or resumed with the contents
            /// of memory still intact.
            /// </summary>
            /// <param name="sender">The source of the suspend request.</param>
            /// <param name="e">Details about the suspend request.</param>
            private void OnSuspending(object sender, SuspendingEventArgs e)
            {
                var deferral = e.SuspendingOperation.GetDeferral();
    
                // TODO: Save application state and stop any background activity
                deferral.Complete();
            }
        }
    }


    • Edited by VirgilW Friday, August 15, 2014 2:10 PM
    Friday, August 15, 2014 2:07 PM

Answers

All replies

  • Hi,

    I will suggest you enable the Application.UnhandledException Event in app.xaml.cs and dump the inner exception and call stack for further investigation. That will be very helpful for troubleshooting this issue.

    Hope I have the luck to reproduce the issue on my side.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Saturday, August 16, 2014 6:23 AM
    Owner
  • If I wait a little longer after the app crashed i get the following error:

    The program '[3960] App2.WindowsPhone.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

    @Alan_Yao

    The event Application.UnhandledException is not being raised. 

    This is the code I've used:

    public App()
            {
                this.InitializeComponent();
                this.Suspending += this.OnSuspending;
                Application.Current.UnhandledException += Current_UnhandledException;
    
                #if WINDOWS_PHONE_APP
                HardwareButtons.BackPressed += HardwareButtons_BackPressed;
                
                
                
    #endif
    
            }
    
            void Current_UnhandledException(object sender, UnhandledExceptionEventArgs e)
            {                        
                Debug.WriteLine(e.Message);
                throw new NotImplementedException();            
            }

    Saturday, August 16, 2014 10:17 PM
  • I made a video on how you can make the sample app crash.

    http://youtu.be/-hUfrD8ke7o


    • Edited by VirgilW Tuesday, August 19, 2014 5:01 PM
    Tuesday, August 19, 2014 5:00 PM
  • Hi VirgilW,

    Thanks very much for your fully cooperation. I played your app on emulator and phone. But I still cannot reproduce the issue. And I can see you code is very simple without any code can cause such kind of issue.

    I think it might be related to the OS version we have. I don't have a lumia 520 on hand, but I have htc 8x which has same RAM space as yours.

    Is your WP OS on developer preview version?

    Here is my OS version which I saw in setting->about->more info: 8.10.12397.895

    If it is on preview version, could you please update to the latest version and make sure we are working on a known issue that has already been resolved.

    If it still doesn't work, I have to escalate this to engage someone who can perform the test on lumia 520.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, August 21, 2014 4:34 AM
    Owner
  • Hi VirgilW,

    I want to double check your debug method.

    Have you tried to connect the device to your PC via the USB cable and then directly debug your app on device via visual studio to reproduce issue?

    Did you see any exception occurred in visual studio when you reproduce the issue?


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, August 21, 2014 5:26 AM
    Owner
  • Hi Alan_Yao,

    I am using OS version 8.10.14157.200, but this also happens on previous versions. If you want to make the app crash make sure you use a real device it's harder to make it crash on the emulator from Visual Studio. I can also make it crash on a lumia 920 and lumia 930 if i just scroll real fast after i pressed an article in the sample app.  I also have an app in the Windows Phone Store it's a public beta and in the dev center there are 0 crashes available, but people are complaining about this issue. 

    This is the full output from visual studio when I debug the app. I always connect the phone to my pc when i debug an app. Only in the video I did not connect it to the pc. it takes a while after the app exits before I get the last line of the output "The program has exited......"

    'App2.WindowsPhone.exe' (CoreCLR: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\Data\SharedData\PhoneTools\AppxLayouts\8c48ab73-719d-4945-ac3c-56724ac523d7VS.Debug_AnyCPU.Virgil\App2.WindowsPhone.exe'. Symbols loaded.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\WinMetadata\Windows.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.INTEROPSERVICES.WINDOWSRUNTIME.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.DIAGNOSTICS.DEBUG.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.COLLECTIONS.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'App2.WindowsPhone.exe' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.NI.DLL'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    The program '[3092] App2.WindowsPhone.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

    Monday, August 25, 2014 3:57 PM
  • Hi, Tobi from Poki here.

    Is there no way to check if this bug has already been fixed?

    I own a 520 and 920 with the Update 1 Developer Preview. Both crash.

    This is also the case for Brandon from Tweetium and the creator of the other thread which is about the same issue

    This does also happen for apps in the Store, yes. And afaik the bug did not occur before Update 1.

    The Store does not display the crashs (and BugSense as well). Maybe because they are only displaying exceptions from managed code?!

    Friday, August 29, 2014 9:21 AM
  • Hi Alan,

    I found this thread by searching. I also met the same issue on my Lumia 920, WP8.1 Update 1 developer preview (8.10.14157.200) but not sure if it's ok on previous version because I only have this device. 

    I have never repro this on emulator. (The emulator is 8.1 not 8.1 update)

    If I try to scroll the WebView to the bottom edge of the page before all contents loaded, the app crashes every time. It's normal if I wait until all content loaded. VS2013 doens't catch any exception and break point. After a while, the debug session exit with Access Violation.

    XXXX has exited with code -1073741819 (0xc0000005) 'Access violation'.

    So I also want to know the resolution. It's really annoying. 

    It's easier to repro this if you visit a large page with large scroll height, or it finished loading too fast.




    • Edited by RemyCao Sunday, August 31, 2014 7:49 AM
    Sunday, August 31, 2014 7:33 AM
  • Hi all,

    Finnally~

    I reproduced the issue. Thanks for all your experience sharing here. But it is really very hard to troubleshoot as the only useful information is "The program '[2884] App2.WindowsPhone.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'."

    I will report this and update the progress here.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 01, 2014 9:17 AM
    Owner
  • Thanks a lot, Alan!
    Tuesday, September 02, 2014 3:49 PM
  • FYI Alan, you can get much more information from a native debugger. The call stack includes only DirectManipulation.dll and minuser.dll, and occurs on the delegate input thread.

    My contacts in DevPlat say they have a confirmed fix. But that was weeks ago and there's still no fix or even an ETA. And now the new HTC phone is shipping with this bug. We really need a fix for this ASAP.

    Wednesday, September 03, 2014 10:59 PM
  • It's nice to hear that Microsoft is aware of this and working on a fix.  I landed here after a very frustrating search on this bug.  I have an M8 and it is doing this.  It seems to happen most often on WebView controls that only have a couple of lines of text.
    Tuesday, September 09, 2014 11:48 PM
  • I'm working on a mixed project Direct3D/XAML universal app, there is no WebView control involved, but the same exception happend to me at random time.
    Unhandled exception at 0x76AE6E0F (MINUSER.DLL) in ....: 0xC0000005: Access violation reading location 0x00000010
    Lumia 820, 8.10.14157.200
     
    If it makes any sense for MS guys, call stacks at the moment of exception:
     
    Call stack for DIRECTMANIPULATION.DLL thread:
    MINUSER.DLL!76ae6e0e()
    MINUSER.DLL!76ace29a()
    MINUSER.DLL!76ac4e3c()
    MINUSER.DLL!76ac4aaa()
    MINUSER.DLL!76ac4a48()
    DIRECTMANIPULATION.DLL!68acc8be()
    DIRECTMANIPULATION.DLL!68ac8ef8()
    DIRECTMANIPULATION.DLL!68ac9dee()
    DIRECTMANIPULATION.DLL!68acc34e()
    DIRECTMANIPULATION.DLL!68aca3a0()
    MINUSER.DLL!76ac4d94()
    MINUSER.DLL!76ac4d0c()
    MINUSER.DLL!76ac4b08()
    MINUSER.DLL!76ad7498()
    MINUSER.DLL!76ace498()
    MINUSER.DLL!76ac7924()
    MINUSER.DLL!76ac767a()
    DIRECTMANIPULATION.DLL!68add736()
    DIRECTMANIPULATION.DLL!68add8d4()
    NTDLL.DLL!77dd6436()
     
    The same time, call stack for MINUSER.DLL thread:
    NTDLL.DLL!77d922ee()
    KERNELBASE.DLL!77b16308()
    CoreMessaging.dll!76a473a2()
    CoreMessaging.dll!76a47048()
    CoreMessaging.dll!76a47dea()
    CoreMessaging.dll!76a49b54()
    CoreMessaging.dll!76a494a4()
    MINUSER.DLL!76ad4984()
    MINUSER.DLL!76ad4794()
    MINUSER.DLL!76ad1a5e()
    MINUSER.DLL!76ad25d8()
    MINUSER.DLL!76ad1cb8()
    MINUSER.DLL!76acf80a()
    MINUSER.DLL!76ad6604()
    NTDLL.DLL!77dd6436()
    Tuesday, September 16, 2014 10:13 PM
  • The bug is resolved for me in 8.10.14176.xx.

    • Marked as answer by VirgilW Thursday, September 25, 2014 4:15 PM
    Thursday, September 25, 2014 7:31 AM
  • Works for me too now. 

    Only now we have to wait until it gets released to the public :(

    Thursday, September 25, 2014 4:16 PM
  • Hi 

    Will it work in 10.0.14393.448. I am facing this crash issue. Please revert me back

    Thanks and Regards

    Anbarasi K


    • Edited by DHASHURI Thursday, November 17, 2016 9:45 AM
    Wednesday, November 16, 2016 6:50 AM
  • I can confirm. Version 14393 crashing. Never had a chance to confirm the fix in the previous version but this one is definitely crashing.

    Alex

    Thursday, February 09, 2017 9:50 PM