<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Bugs</title>
        <link>http://ayende.com/Blog/category/499.aspx</link>
        <description>Bugs</description>
        <language>en-US</language>
        <copyright>Ayende Rahien</copyright>
        <managingEditor>Ayende@ayende.com</managingEditor>
        <generator>Subtext Version 2.0.0.0</generator>
        <item>
            <title>Is select (System.Uri) broken?</title>
            <link>http://ayende.com/Blog/archive/2010/03/04/is-select-system.uri-broken.aspx</link>
            <description>&lt;p&gt;I can’t really figure out what is going on!&lt;/p&gt;  &lt;p&gt;Take a look:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/IsselectSystem.Uribroken_10CA2/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/IsselectSystem.Uribroken_10CA2/image_thumb.png" width="973" height="271" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p /&gt;  &lt;p&gt;The value :&lt;/p&gt;  &lt;p&gt;&lt;a title="http://localhost:58080/indexes/categoriesByName?query=CategoryName%3ABeverages&amp;amp;start=0&amp;amp;pageSize=25" href="http://localhost:58080/indexes/categoriesByName?query=CategoryName%3ABeverages&amp;amp;start=0&amp;amp;pageSize=25"&gt;http://localhost:58080/indexes/categoriesByName?query=CategoryName%3ABeverages&amp;amp;start=0&amp;amp;pageSize=25&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And the problem is that I can’t figure out why calling this once would fail, but calling it the second time would fail. That is leaving aside the fact this looks like a pretty good url to me.&lt;/p&gt;  &lt;p&gt;Any ideas? This is perfectly reproducible on one project, but I can’t reproduce this on another project.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Updates:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;This is System.Uri&lt;/li&gt;    &lt;li&gt;The issue that it fails the first time, and works the second!&lt;/li&gt;    &lt;li&gt;The exception is:&lt;/li&gt;    &lt;p&gt;System.ArgumentNullException: Value cannot be null.     &lt;br /&gt;Parameter name: str      &lt;br /&gt;   at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)      &lt;br /&gt;   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)      &lt;br /&gt;   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)      &lt;br /&gt;   at System.Uri.ParseConfigFile(String file, IdnScopeFromConfig&amp;amp; idnStateConfig, IriParsingFromConfig&amp;amp; iriParsingConfig)      &lt;br /&gt;   at System.Uri.GetConfig(UriIdnScope&amp;amp; idnScope, Boolean&amp;amp; iriParsing)      &lt;br /&gt;   at System.Uri.InitializeUriConfig()      &lt;br /&gt;   at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException&amp;amp; e)      &lt;br /&gt;   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)      &lt;br /&gt;   at System.Uri..ctor(String uriString)      &lt;br /&gt;   at Raven.Scenarios.Scenario.GetUri_WorkaroundForStrangeBug(String uriString) in C:\Work\ravendb\Raven.Scenarios\Scenario.cs:line 155&lt;/p&gt;    &lt;li&gt;This is a &lt;em&gt;console application&lt;/em&gt;.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Okay, I can reproduce this now, here it how it got there:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Strange : MarshalByRefObject
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WTF()
    {
        Console.WriteLine(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
        &lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(&lt;span class="str"&gt;"http://localhost:58080/indexes/categoriesByName?query=CategoryName%3ABeverages&amp;amp;start=0&amp;amp;pageSize=25"&lt;/span&gt;);
    }
}

&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Program
{
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()
    {
        var instanceAndUnwrap = (Strange) AppDomain.CreateDomain(&lt;span class="str"&gt;"test"&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; AppDomainSetup
        {
            ConfigurationFile = &lt;span class="str"&gt;""&lt;/span&gt;
        }).CreateInstanceAndUnwrap(&lt;span class="str"&gt;"ConsoleApplication5"&lt;/span&gt;, &lt;span class="str"&gt;"ConsoleApplication5.Strange"&lt;/span&gt;);
        instanceAndUnwrap.WTF();
    }
}&lt;/pre&gt;
  &lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;/blockquote&gt;

&lt;p&gt;That took some time to figure out.&lt;/p&gt;

&lt;p&gt;The reason that I got this issue is that I am running this code as part of a unit test, and the xUnit seems to be running my system under the following conditions. &lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11352.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/03/04/is-select-system.uri-broken.aspx</guid>
            <pubDate>Thu, 04 Mar 2010 19:05:00 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11352.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/03/04/is-select-system.uri-broken.aspx#feedback</comments>
            <slash:comments>20</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11352.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Where do git repositories go when they die?</title>
            <link>http://ayende.com/Blog/archive/2010/03/02/where-do-git-repositories-go-when-they-die.aspx</link>
            <description>&lt;p&gt;My RDB repository started giving me this error;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;fatal: Not a git repository (or any of the parent directories): .git&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I don’t think that I did anything to it, but it is still dead.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Wheredogitrepositoriesgowhentheydie_BF6D/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Wheredogitrepositoriesgowhentheydie_BF6D/image_thumb.png" width="760" height="227" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Any ideas how to recover this?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Found why Git doesn't like my repository, it doesn't have .git\objects, but I have no idea where it could have gone to… or why.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11346.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/03/02/where-do-git-repositories-go-when-they-die.aspx</guid>
            <pubDate>Tue, 02 Mar 2010 13:33:00 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11346.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/03/02/where-do-git-repositories-go-when-they-die.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11346.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Answer: Debugging a resource leak</title>
            <link>http://ayende.com/Blog/archive/2010/02/11/answer-debugging-a-resource-leak.aspx</link>
            <description>&lt;p&gt;As it turns out, there are a LOT of issues with this code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; QueueActions : IDisposable
{
    UnmanagedDatabaseConnection database;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Name { get; &lt;span class="kwrd"&gt;private&lt;/span&gt; set; }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; QueueActions( UnmanagedDatabaseConnectionFactory factory)
    {
         database = factory.Create();
         database.Open(()=&amp;gt; Name = database.ReadName());
    }

   &lt;span class="rem"&gt;// assume proper GC finalizer impl&lt;/span&gt;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Dispose()
    {
          database.Dispose();
    }
}&lt;/pre&gt;
  &lt;style type="text/css"&gt;&lt;![CDATA[

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;/blockquote&gt;

&lt;p&gt;And the code using this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt;(var factory = CreateFactory())
{
   ThreadPool.QueueUserWorkItem(()=&amp;gt;
   {
          &lt;span class="kwrd"&gt;using&lt;/span&gt;(var actions = &lt;span class="kwrd"&gt;new&lt;/span&gt; QueueActions(factory))
          {
               actions.Send(&lt;span class="str"&gt;"abc"&lt;/span&gt;);     
          }
    });
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;To begin with, what happens if we close the factory between the first and second lines in QueueActions constructors?&lt;/p&gt;

&lt;p&gt;We already have an unmanaged resource, but when we try to open it, we are going to get an exception. Since the exception is thrown from the constructor, it will NOT invoke the usual using logic, and the code will not be disposed.&lt;/p&gt;

&lt;p&gt;Furthermore, and the reason for the blog post about it. &lt;em&gt;Dispose itself can also fail&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Here is the actual stack trace that caused this blog post:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Microsoft.Isam.Esent.Interop.EsentErrorException: Error TermInProgress (JET_errTermInProgress, Termination &lt;span class="kwrd"&gt;in&lt;/span&gt; progress)
at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) &lt;span class="kwrd"&gt;in&lt;/span&gt; Api.cs: line 1492
at Microsoft.Isam.Esent.Interop.Api.JetCloseTable(JET_SESID sesid, JET_TABLEID tableid) &lt;span class="kwrd"&gt;in&lt;/span&gt; Api.cs: line 372
at Microsoft.Isam.Esent.Interop.Table.ReleaseResource() &lt;span class="kwrd"&gt;in&lt;/span&gt; D:\Work\esent\EsentInterop\Table.cs: line 97
at Microsoft.Isam.Esent.Interop.EsentResource.Dispose() &lt;span class="kwrd"&gt;in&lt;/span&gt; EsentResource.cs: line 63
at Rhino.Queues.Storage.AbstractActions.Dispose() &lt;span class="kwrd"&gt;in&lt;/span&gt; AbstractActions.cs: line 146 &lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;img src="http://ayende.com/Blog/aggbug/11312.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/02/11/answer-debugging-a-resource-leak.aspx</guid>
            <pubDate>Thu, 11 Feb 2010 10:00:00 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11312.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/02/11/answer-debugging-a-resource-leak.aspx#feedback</comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11312.aspx</wfw:commentRss>
        </item>
        <item>
            <title>A marketing mistake: WCF Data Services &amp;amp; WCF RIA Services</title>
            <link>http://ayende.com/Blog/archive/2010/02/07/a-marketing-mistake-wcf-data-services-amp-wcf-ria-services.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://www.insearchofstupidity.com/illustrations.htm"&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px" alt="Illustration 3" align="right" src="http://www.insearchofstupidity.com/Illustrations/lii3.jpg" /&gt;&lt;/a&gt;There are some things that I just don’t understand, and the decision to name two apparently different technologies working in the same area using those two names is one of them.&lt;/p&gt;  &lt;p&gt;The image on the right is from &lt;a href="http://www.insearchofstupidity.com/"&gt;In Search Of Stupidity&lt;/a&gt;, an excellent and funny book, which talks about a lot of marketing mistakes that software, dedicate a whole chapter for this error.&lt;/p&gt;  &lt;p&gt;Coming back to WCF Data Services &amp;amp; WCF RIA Services, I &lt;a href="http://blogs.msdn.com/endpoint/archive/2010/01/04/wcf-data-services-ria-services-alignment-questions-and-answers.aspx"&gt;read this page&lt;/a&gt;, and I am still confused. It appears that the major difference in that RIA services will generate the Silverlight client classes as part of the build process, where as using Data Services this is a separate process.&lt;/p&gt;  &lt;p&gt;And I am not sure even of that.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11306.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/02/07/a-marketing-mistake-wcf-data-services-amp-wcf-ria-services.aspx</guid>
            <pubDate>Sun, 07 Feb 2010 10:00:00 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11306.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/02/07/a-marketing-mistake-wcf-data-services-amp-wcf-ria-services.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11306.aspx</wfw:commentRss>
        </item>
        <item>
            <title>When the design violates the principle of least surprise, you don&amp;rsquo;t close it as By Design</title>
            <link>http://ayende.com/Blog/archive/2010/01/21/when-the-design-violates-the-principle-of-least-surprise-you.aspx</link>
            <description>&lt;p&gt;I don’t actually have an opinion about the actual feature, but I felt that I just &lt;em&gt;have&lt;/em&gt; to comment on &lt;a href="http://bradwilson.typepad.com/blog/2010/01/required-doesnt-mean-what-you-think-it-does.html"&gt;this post&lt;/a&gt;, from Brad Wilson, about the [Required] attribute in ASP.Net MVC 2.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Approximately once every 21.12 seconds, someone will ask this question on the &lt;a href="http://forums.asp.net/1146.aspx"&gt;ASP.NET MVC forums&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;…&lt;/p&gt;    &lt;p&gt;The answer is the title of this blog post. ([Required] Doesn’t Mean What You Think It Does)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If this is the case, I have to say that the design of [Required] is misleading, and should be change to match the expectations of the users.&lt;/p&gt;  &lt;p&gt;We have a pretty common case of plenty of users finding this behavior problematic, the answer isn’t to try to educate the users, the answer is to &lt;em&gt;fix the design so it isn’t misleading&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;I am pretty sure that when the spec for the feature was written, it made sense, but that doesn’t mean that it works in the real world. I think it should either be fixed, or removed. Leaving this in would be a constant tripwire that people will fall into.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11287.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/01/21/when-the-design-violates-the-principle-of-least-surprise-you.aspx</guid>
            <pubDate>Thu, 21 Jan 2010 07:14:26 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/11287.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2010/01/21/when-the-design-violates-the-principle-of-least-surprise-you.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11287.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How to opt out of Program Compatibility Assistant?</title>
            <link>http://ayende.com/Blog/archive/2010/01/12/how-to-opt-out-of-program-compatibility-assistant.aspx</link>
            <description>&lt;p&gt;A recent change in the profiler has resulted in the following dialog showing up whenever you close the application on x64 Vista/Win7 machines. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/HowtooptoutofProgramCompatibilityAssista_8150/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/HowtooptoutofProgramCompatibilityAssista_8150/image_thumb.png" width="556" height="342" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Just to be clear, I am not &lt;em&gt;using &lt;/em&gt;flash in any way, but something &lt;em&gt;is&lt;/em&gt; triggering this check.&lt;/p&gt;  &lt;p&gt;Basically, I think that somewhere a call like the one described &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/866281ae-396e-4ff9-9d40-db2d40a5fc22"&gt;here&lt;/a&gt; is made. Checking for the presence of flash, and that is what triggers the PCA dialog. That makes a sort of sense, mostly because we now shell out to IE to do some stuff for us (we use WPF’s builtin WebBrowser control).&lt;/p&gt;  &lt;p&gt;Now, the &lt;a href="http://msdn.microsoft.com/en-us/library/bb756937.aspx"&gt;documentation for that&lt;/a&gt; says:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;PCA is intended to detect issues with older programs and not intended to monitor programs developed for Windows Vista and Windows Server 2008. The best option to exclude a program from PCA is to include, with the program, an application manifest with run level (either Administrator or as limited users) marking for UAC. This marking means the program is tested to work under UAC (and Windows Vista and Windows Server 2008). PCA checks for this manifest and will exclude the program. This process applies for both installer and regular programs.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The problem, however, is that even &lt;em&gt;after&lt;/em&gt; I included the &lt;em&gt;$@#$&lt;/em&gt;&lt;em&gt;(@# &lt;/em&gt;manifest, it is &lt;em&gt;still &lt;/em&gt;showing the bloody dialog.&lt;/p&gt;  &lt;p&gt;I find it quite annoying. Here is the custom manifest that comes with the profiler.&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&lt;/span&gt; &lt;span class="attr"&gt;standalone&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:asm.v1"&lt;/span&gt; &lt;span class="attr"&gt;manifestVersion&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:trustInfo&lt;/span&gt; &lt;span class="attr"&gt;xmlns:v3&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:asm.v3"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:security&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:requestedPrivileges&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:requestedExecutionLevel&lt;/span&gt; &lt;span class="attr"&gt;level&lt;/span&gt;&lt;span class="kwrd"&gt;="asInvoker"&lt;/span&gt; &lt;span class="attr"&gt;uiAccess&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:requestedPrivileges&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:security&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:trustInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;/blockquote&gt;

&lt;p&gt;As far as I can see, it &lt;em&gt;should&lt;/em&gt; work.&lt;/p&gt;

&lt;p&gt;Any ideas?&lt;/p&gt;

&lt;p&gt;And &lt;a href="http://twitter.com/xpaulbettsx/status/7661407599"&gt;twitter&lt;/a&gt; came to the rescue and told me that I need to specify that I am compatible on Win7, the current manifest, which fixes the issue, is:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;="utf-8"&lt;/span&gt; &lt;span class="attr"&gt;standalone&lt;/span&gt;&lt;span class="kwrd"&gt;="yes"&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:asm.v1"&lt;/span&gt; &lt;span class="attr"&gt;manifestVersion&lt;/span&gt;&lt;span class="kwrd"&gt;="1.0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:trustInfo&lt;/span&gt; &lt;span class="attr"&gt;xmlns:v3&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:asm.v3"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:security&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:requestedPrivileges&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;v3:requestedExecutionLevel&lt;/span&gt; &lt;span class="attr"&gt;level&lt;/span&gt;&lt;span class="kwrd"&gt;="asInvoker"&lt;/span&gt; &lt;span class="attr"&gt;uiAccess&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:requestedPrivileges&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:security&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;v3:trustInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;compatibility&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="urn:schemas-microsoft-com:compatibility.v1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;application&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="rem"&gt;&amp;lt;!--The ID below indicates application support for Windows Vista --&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;supportedOS&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="{e2011457-1546-43c5-a5fe-008deee3d3f0}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="rem"&gt;&amp;lt;!--The ID below indicates application support for Windows 7 --&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;supportedOS&lt;/span&gt; &lt;span class="attr"&gt;Id&lt;/span&gt;&lt;span class="kwrd"&gt;="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;application&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;compatibility&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;assembly&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;/blockquote&gt;

&lt;p&gt;I would like to &lt;a href="http://blog.paulbetts.org/"&gt;Paul Betts&lt;/a&gt; for handing me the answer in less than 3 minutes.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11282.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2010/01/12/how-to-opt-out-of-program-compatibility-assistant.aspx</guid>
            <pubDate>Tue, 12 Jan 2010 07:10:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2010/01/12/how-to-opt-out-of-program-compatibility-assistant.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11282.aspx</wfw:commentRss>
        </item>
        <item>
            <title>The operation was successful, but the patient is still dead&amp;hellip; deferring the obvious doesn&amp;rsquo;t work</title>
            <link>http://ayende.com/Blog/archive/2009/12/26/the-operation-was-successful-but-the-patient-is-still-deadhellip.aspx</link>
            <description>&lt;p&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px" align="right" src="http://www.napoleonguide.com/images/maps_retrussia_borissov.gif" width="240" height="120" /&gt;So, I have a problem with the profiler. At the root of things, the profiler is managing a bunch of strings (SQL statements, stack traces, alerts, etc). When you start pouring large amount of information into the profiler, the number of strings that it is going to keep in memory is going to increase, until you get to say hello to OutOfMemoryException.&lt;/p&gt;  &lt;p&gt;During my attempt to resolve this issue, I figured out that string interning was likely to be the most efficient way to resolve my problem. After all, most of the strings that I have to display are repetitive. String interning has one problem, it exists forever. I spent a few minutes creating a garbage collectible method of doing string interning. In my first test, which was focused on just interning stack traces, I was able to reduce memory consumption by 50% (about 800Mb, post GC) and it is fully garbage collectible, so it won’t hung around forever.&lt;/p&gt;  &lt;p&gt;Sounds good, right?&lt;/p&gt;  &lt;p&gt;Well, not really. While it is an interesting thought experiment, using interning is a great way of handling things, but it only mask the problem, and that only for a short amount of time. The problem is still an open ended set of data that I need to deal with, and while there are a whole bunch of stuff that I can do to delay the inevitable, defeat is pretty much ensured. The proper way of doing that is not trying to use hacks to reduce memory usage, but to deal with the root cause, keeping everything in memory.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11256.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/12/26/the-operation-was-successful-but-the-patient-is-still-deadhellip.aspx</guid>
            <pubDate>Sat, 26 Dec 2009 10:00:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/12/26/the-operation-was-successful-but-the-patient-is-still-deadhellip.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11256.aspx</wfw:commentRss>
        </item>
        <item>
            <title>NHProf.com downtime, and using windows as a server system</title>
            <link>http://ayende.com/Blog/archive/2009/11/30/nhprof.com-downtime-and-using-windows-as-a-server-system.aspx</link>
            <description>&lt;p&gt;Yesterday &lt;a href="http://nhprof.com"&gt;nhprof.com&lt;/a&gt; was down, there was a YSOD and when I logged into the server to try to figure out what the problem was, I got this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHP.comdowntimeandusingwindowsasaservers_DF04/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHP.comdowntimeandusingwindowsasaservers_DF04/image_thumb.png" width="675" height="299" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The server has been running with no issues for over a year, so it is not an issue with not activating after installation. This is a Windows 2008 Server, and I find it &lt;em&gt;incovievable &lt;/em&gt;that a server would go down because of activation. To spread more salt on the wound, it wasn’t a problem that could be fixed remotely, I had to call my host and ask them to fix that (they did in a remarkably short time).&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Annoying!&lt;/em&gt;&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11225.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/11/30/nhprof.com-downtime-and-using-windows-as-a-server-system.aspx</guid>
            <pubDate>Mon, 30 Nov 2009 13:47:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/11/30/nhprof.com-downtime-and-using-windows-as-a-server-system.aspx#feedback</comments>
            <slash:comments>25</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11225.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Debugging Win32 crash in NH Prof</title>
            <link>http://ayende.com/Blog/archive/2009/11/13/debugging-win32-crash-in-nh-prof.aspx</link>
            <description>&lt;p&gt;One of the things that happened when I pushed the UberProf build of NH Prof out is that people started complaining that trying to load a saved snapshot would crash the application. It took me a while to reproduce that, but I finally manage to get this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_thumb.png" width="379" height="191" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When I tried to debug it, all I got was this, and native stack trace that I had no way of actually resolving.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_thumb_1.png" width="528" height="234" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Trying to reproduce the problem in the debugger resulted in the same experience. I tried playing around with WinDbg for a while, but I am not very good at that, so I gave up and tried something that I find useful in the past. Tell Visual Studio that I want it to capture all types of exceptions, not just CLR exceptions:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_thumb_2.png" width="735" height="368" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p /&gt;  &lt;p /&gt;  &lt;p&gt;Using this mode, I managed to get:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_thumb_3.png" width="740" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This led me to inspect the CancellableWaitBoxView.xaml, which contains:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/DebuggingWin32crashinNHProf_E84/image_thumb_4.png" width="974" height="307" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p /&gt;  &lt;p&gt;And now it all made sense. With the UberProf builds, each profiler has a distinct assembly name. The problem is that this XAML refer to the master assembly name (which I use for development).  &lt;/p&gt;  &lt;p&gt;The reason this issue was hard to fix was that it is WPF window failing, and then somehow that exception is being swallowed and translated into a native error dialog, I am not quite sure why. Once I knew what the problem was, the fix was quite simple (using assembly resolve).&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11206.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/11/13/debugging-win32-crash-in-nh-prof.aspx</guid>
            <pubDate>Fri, 13 Nov 2009 10:00:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/11/13/debugging-win32-crash-in-nh-prof.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11206.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Select N+1 is also applicable for user interface</title>
            <link>http://ayende.com/Blog/archive/2009/11/10/select-n1-is-also-applicable-for-user-interface.aspx</link>
            <description>&lt;p&gt;I just opened Messenger for the first time in maybe a year, here is what it end up looking like (and this is the truncated list):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/SelectN1isalsoapplicableforuserinterface_1869/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/SelectN1isalsoapplicableforuserinterface_1869/image_thumb.png" width="179" height="666" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And it doesn’t seems to end…&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/11202.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2009/11/10/select-n1-is-also-applicable-for-user-interface.aspx</guid>
            <pubDate>Tue, 10 Nov 2009 10:00:00 GMT</pubDate>
            <comments>http://ayende.com/Blog/archive/2009/11/10/select-n1-is-also-applicable-for-user-interface.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/11202.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>