{"id":1333,"date":"2014-04-03T07:00:00","date_gmt":"2014-04-03T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2014\/04\/03\/why-does-the-access-violation-error-message-put-the-operation-in-quotation-marks-is-is-some-sort-of-euphemism\/"},"modified":"2014-04-03T07:00:00","modified_gmt":"2014-04-03T07:00:00","slug":"why-does-the-access-violation-error-message-put-the-operation-in-quotation-marks-is-is-some-sort-of-euphemism","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20140403-00\/?p=1333","title":{"rendered":"Why does the access violation error message put the operation in quotation marks? Is is some sort of euphemism?"},"content":{"rendered":"<p>When an application crashes with an access violation, the error message says something like<\/p>\n<blockquote class=\"q\"><p> The instruction at &#8220;XX&#8221; referenced memory at &#8220;YY&#8221;. The memory could not be &#8220;read&#8221;. <\/p><\/blockquote>\n<p> Why is the operation in quotation marks? Is this some sort of euphemism?\n The odd phrasing is a consequence of globalization. The operation name is a verb in the infinitive (&#8220;read&#8221;, &#8220;write&#8221;), but depending on how the containing message is localized, it may need to take a different form. Since the kernel doesn&#8217;t understand grammar, it just puts the words in quotation marks to avoid having to learn every language on the planet. Imagine if it tried:<\/p>\n<blockquote><p> The memory could not be readed. <\/p><\/blockquote>\n<p> The kernel tried to form the passive, which is normally done in English by adding &#8220;&ndash;ed&#8221; to the end of the verb. Too bad &#8220;read&#8221; and &#8220;write&#8221; are irregular verbs!\n The more conventional solution for this type of problem is to create a separate error message for each variant so that the text can be translated independently. <a href=\"http:\/\/msdn.microsoft.com\/en-us\/goglobal\/bb688118.aspx#EMB\"> rather than building sentences at runtime<\/a>,<\/p>\n<p> The access violation error message is in a pickle, though, because the underlying status code is <code>STATUS_ACCESS_VIOLATION<\/code>, and <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/cc704588%28prot.20%29.aspx\"> that message contains three insertions<\/a>, one for the instruction address, one for the address being accessed, and one for the operation. If there were three different status codes, like <code>STATUS_ACCESS_VIOLATION_READ<\/code>, <code>STATUS_ACCESS_VIOLATION_WRITE<\/code>, and <code>STATUS_ACCESS_VIOLATION_EXECUTE<\/code>, then a separate string could be created for each. But that&#8217;s not how the status codes folks decided to do things, and the translation team was stuck having to use the ugly quotation marks. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>When an application crashes with an access violation, the error message says something like The instruction at &#8220;XX&#8221; referenced memory at &#8220;YY&#8221;. The memory could not be &#8220;read&#8221;. Why is the operation in quotation marks? Is this some sort of euphemism? The odd phrasing is a consequence of globalization. The operation name is a verb [&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":[26],"class_list":["post-1333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>When an application crashes with an access violation, the error message says something like The instruction at &#8220;XX&#8221; referenced memory at &#8220;YY&#8221;. The memory could not be &#8220;read&#8221;. Why is the operation in quotation marks? Is this some sort of euphemism? The odd phrasing is a consequence of globalization. The operation name is a verb [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/1333","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=1333"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/1333\/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=1333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=1333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=1333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}