{"id":7423,"date":"2012-06-08T07:00:00","date_gmt":"2012-06-08T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2012\/06\/08\/how-can-i-determine-the-underlying-cause-of-a-exception_in_page_error-exception\/"},"modified":"2012-06-08T07:00:00","modified_gmt":"2012-06-08T07:00:00","slug":"how-can-i-determine-the-underlying-cause-of-a-exception_in_page_error-exception","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20120608-00\/?p=7423","title":{"rendered":"How can I determine the underlying cause of a EXCEPTION_IN_PAGE_ERROR exception?"},"content":{"rendered":"<p>\nA customer was using memory-mapped files and installed an\nexception handler to log\nin-page errors in the memory-mapped file region.\nThey wanted to know how they could obtain the real disk error\nthat resulted in the memory manager not being able to page-in\nthe requested data.\n<\/p>\n<p>\nFinding the answer\n<a HREF=\"http:\/\/www.letmebingthatforyou.com\/?q=EXCEPTION_IN_PAGE_ERROR\">\nisn&#8217;t that<\/a>\n<a HREF=\"http:\/\/lmgtfy.com\/?q=EXCEPTION_IN_PAGE_ERROR\">\nhard<\/a>.\nA quick search for\n<code>EXCEPTION_IN_PAGE_ERROR<\/code>\nreveals that\n<a HREF=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa363082(VS.85).aspx\">\nthe information is provided in the <code>Exception&shy;Information<\/code>\nmember of the\n<code>EXCEPTION_RECORD<\/code> structure<\/a>.\n<\/p>\n<blockquote CLASS=\"q\">\n<table RULES=\"all\" STYLE=\"border-collapse: collapse\">\n<tr>\n<td VALIGN=\"baseline\">EXCEPTION_IN_PAGE_ERROR<\/td>\n<td VALIGN=\"baseline\">\n<p>\n    The first element of the array\n    contains a read-write flag that indicates\n    the type of operation that caused the access violation.\n    If this value is zero, the thread attempted\n    to read the inaccessible data. If this value is 1,\n    the thread attempted to write to an inaccessible address.\n    If this value is 8, the thread causes a user-mode data\n    execution prevention (DEP) violation.\n<\/p>\n<p>\n    The second array element specifies the virtual address\n    of the inaccessible data.\n<\/p>\n<p>\n    The third array element specifies the\n    underlying NTSTATUS code that resulted in the exception.\n<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/blockquote>\n<p>\nIn other words,\n<\/p>\n<pre>\nif (GetExceptionCode() == EXCEPTION_IN_PAGE_ERROR)\n{\n    DiskError = GetExceptionInformation()-&gt;\n                ExceptionRecord-&gt;\n                ExceptionInformation[2];\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A customer was using memory-mapped files and installed an exception handler to log in-page errors in the memory-mapped file region. They wanted to know how they could obtain the real disk error that resulted in the memory manager not being able to page-in the requested data. Finding the answer isn&#8217;t that hard. A quick search [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-7423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>A customer was using memory-mapped files and installed an exception handler to log in-page errors in the memory-mapped file region. They wanted to know how they could obtain the real disk error that resulted in the memory manager not being able to page-in the requested data. Finding the answer isn&#8217;t that hard. A quick search [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/7423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=7423"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/7423\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=7423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=7423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=7423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}