Windows error 0x0000010A, 266

Detailed Error Information

CANNOT_COPY[1]

MessageThe copy functions cannot be used.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x8007010A.

APP_TAGGING_INITIALIZATION_FAILED[2]

This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x10A: APP_TAGGING_INITIALIZATION_FAILED.

HRESULT analysis[3]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[3][1]
DescriptionThe default facility code.[3][1]
Error Code266 (0x010a)

Possible solutions

3

How to catch system.xml.xmlexception

c#
.net
visual-studio
windows-phone-8

There must be some problem with the XML provided by e.Result. Details about this might be in the XmlException message but you only included part of the stack trace.

You will have to figure out what the problem is in the first place and you will probably have to add some logging of what happens BEFORE you call XDocument.Load if you are unable to reproduce the problem on your own system.

You can also add an exception handler but that does not fix the problem but makes your app more robust and allows it to provide a slightly better user interface if something unexpected happens. What you have done is adding an exception handler around the calls to the WebClient methods but you are not catching exceptions thrown by the handler for client.OpenReadCompleted. This is an asynchronous callback that will execute on a threadpool thread, and any uncaught exceptions thrown by this thread will terminate your app.

You need to handle the exception with code like this:

client.OpenReadCompleted += (sender, e) =>
{
    try
    {
        if (e.Error != null)
        {
            return;
        }
        else
            ....
    }
    catch (Exception ex)
    {
        .... log and report the exception to allow the app to continue
    }
 }

And if you decide to add logging to your app it will be very useful to you if you log the entire text returned by ex.ToString(). This will give you a good textual description of the problem including inner exceptions and full stack traces.

answered on Stack Overflow Jul 3, 2014 by Martin Liversage • edited Jul 3, 2014 by Martin Liversage
2

How to catch system.xml.xmlexception

c#
.net
visual-studio
windows-phone-8

Normally is good practice to do catch(Exception), in your case catch(system.xml.XmlException). However put a try-catch inside your else block because this is an asynchronous event and if occurs some exception inside that exception will be not catched:

try 
{
    WebClient client = new WebClient();
    client.OpenReadAsync(new Uri(Url, UriKind.Absolute));
    client.OpenReadCompleted += (sender, e) =>
    {
        if (e.Error != null)
        {
            return;
        }
        else
        {
           try
           {
              System.Xml.Linq.XDocument xmlDoc = XDocument.Load(e.Result);
              IEnumerable<string> strTestURL = from node in xmlDoc.Descendants("url") select node.Value;
              IEnumerable<string> strTestDescription = from node in xmlDoc.Descendants("copyright") select node.Value;
              IEnumerable<string> strTestDate = from node in xmlDoc.Descendants("enddate") select node.Value;
              string strURL = "http://www.bing.com" + strTestURL.First();
              strURL = strURL.Replace("1366x768", "800x480");
              Global.URL1 = strURL;
              Global.URLs[i] = strURL;
              Global.Descriptions[i] = strTestDescription.First();
              Uri Uri = new Uri(Global.URLs[i], UriKind.Absolute);
              Imageallgemein.Source = new BitmapImage(Uri);
              Imageallgemein.Tap += new EventHandler<System.Windows.Input.GestureEventArgs>(onImageTap);
              Imageallgemein.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(onImageTap);
              Description.Text = Global.Descriptions[i];
              string Year = strTestDate.First().Substring(0, 4);
              string Month = strTestDate.First().Substring(4, 2);
              string Day = strTestDate.First().Substring(6, 2);
              Date.Text = Day + "." + Month + "." + Year;
           }
           catch (XmlException)
           {
                MessageBox.Show(AppResources.Abort, AppResources.msgBoxUrlLoadError, MessageBoxButton.OK);
           }
        }
    };
}
catch (Exception)
{
    MessageBox.Show(AppResources.Abort, AppResources.msgBoxUrlLoadError, MessageBoxButton.OK);
}
answered on Stack Overflow Jul 3, 2014 by Ninita

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
  3. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0