0

I am new to developing for Microsoft's UWP platform after developing for 2 years on Silverlight.

I have started working on a project to get XML from a website and parse it to display it inside a Windows UWP app. The code that I use works fine in the Debug Configuration on ARM, but fails to work in Release Configuration.

Here is my code:

protected override async void OnNavigatedTo(NavigationEventArgs e)
{
    // Loading xml from storagefile
    ...

    // Parsing Xml
        XElement xmlitems = XElement.Parse(myXml);
        List<XElement> elements = xmlitems.Descendants("item").ToList();

    ...
}

This code works fine in Debug Config, but crashes the app in Release config. A try-catch block also fails to identify and prevent the app from crashing.

Update:

I did some tests and found out that the app crashes during parsing, so it is not related to the way I get the XML. The xml is read from the file correctly and is valid based of w3school's XML validator and other third party validators.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Does the app just crash without any further exception information? Try enabling `Compile with .NET Native tool chain` for the `Debug` configuration. The error should then occur with the `Debug` build as well, hopefully providing you more information. – Damir Arh Feb 05 '16 at 06:19
  • Does the problem only occur on an actual ARM device? Does it work ok for you in the Phone emulator? I created a minimum sample trying to reproduce your issue, without success. I don't have a WP10 device at hand, though, so I only tried it in the emulator. – Damir Arh Feb 05 '16 at 06:41
  • Hello. Thanks for the prompt response. The problem does only occur on an actual W10M ARM device. I think it is something to do with the ARM Config as emulators run as x86 or x64 config and no errors occur in emulator as well as the desktop. – Pranav Kulkarni Feb 08 '16 at 01:01

0 Answers0