{"id":2243,"date":"2005-11-24T09:00:00","date_gmt":"2005-11-24T09:00:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/net-oddities-3\/"},"modified":"2016-07-28T10:48:42","modified_gmt":"2016-07-28T10:48:42","slug":"net-oddities-3","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/net-oddities-3\/","title":{"rendered":".NET Oddities #3"},"content":{"rendered":"<p>OK, so I&#8217;ll admit this is a bit cheeky: this entry should almost certainly be <b>.NET Oddities #2a<\/b> because it&#8217;s so closely related to #2, but there. You may have noticed, and in fact I already knew this, that <b>OutOfMemoryException<\/b> (like <b>StackOverflowException<\/b>) has a null value for its StackTrace property. Again, this can be a total pain in the butt, however fortunately for me it was Dan that did the hard work and tracked it down this morning (for which I&#8217;m exceedingly grateful). Of course, things are never quite that simple, and it turned out that the bug behind all of this was actually elsewhere in the code, so I didn&#8217;t totally escape having to do some work.<\/p>\n<p> I should also qualify all of this by saying that it isn&#8217;t just .NET that behaves in this way. The most recent version of Java that I used in anger (1.4.2) also behaves like this: no stack trace from <b>OutOfMemoryError<\/b>. Now admittedly I want to have my cake and eat it, but how useful would it be if the JVM and CLR provided this information, even if it was only a partial stack trace from the point where the exception\/error occurred back up through a few stack frames? I think that would be very cool indeed, although somehow the VMs in question would need to reserve enough memory to pull off this little trick, and it could well be a complete pain to implement, and, well you get the picture&#8230; but in an ideal world, how cool would it be?<\/p>\n<p> Anyway, &#8220;You may say that I&#8217;m a dreamer&#8230;&#8221; \ud83d\ude09<\/p>\n<p> That&#8217;s all for now. The new version of <b>DTS Package Compare<\/b> (formerly <b>DTS Compare<\/b>) is coming along a treat so I&#8217;m going to get back to it. Watch this space.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OK, so I&#8217;ll admit this is a bit cheeky: this entry should almost certainly be .NET Oddities #2a because it&#8217;s so closely related to #2, but there. You may have noticed, and in fact I already knew this, that OutOfMemoryException (like StackOverflowException) has a null value for its StackTrace property. Again, this can be a&#8230;&hellip;<\/p>\n","protected":false},"author":221714,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[],"coauthors":[],"class_list":["post-2243","post","type-post","status-publish","format-standard","hentry","category-blogs"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221714"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=2243"}],"version-history":[{"count":2,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2243\/revisions"}],"predecessor-version":[{"id":41340,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2243\/revisions\/41340"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=2243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=2243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=2243"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=2243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}