<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx</link><description>Then you wouldn't be able to debug your program.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9947152</link><pubDate>Tue, 12 Jan 2010 16:16:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947152</guid><dc:creator>fahadsadah</dc:creator><description>&lt;p&gt;To the above, apply sed expression s/gives previews/works with Aero Peek/&lt;/p&gt;
&lt;p&gt;OT: Alternatively, the sed expression can be written as: &amp;quot;segiv\es pr\evi\ewseworks with A\ero P\e\eke&amp;quot;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947152" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9947151</link><pubDate>Tue, 12 Jan 2010 16:13:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947151</guid><dc:creator>fahadsadah</dc:creator><description>&lt;p&gt;@Alexandre:&lt;/p&gt;
&lt;p&gt;Imagine this was done with Vista. There would be thousands of support calls: &amp;quot;X works with Aero, Y doesn't&amp;quot;. People blame Micros~1 for creating a buggy and inconsistent OS.&lt;/p&gt;
&lt;p&gt;Imagine it was done with 7. There would be thousands of support calls: &amp;quot;X gives previews, Y doesn't&amp;quot;. People blame Micros~1 for creating a buggy and inconsistent OS.&lt;/p&gt;
&lt;p&gt;It's not as bad if it's done with API calls only, though&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947151" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9947059</link><pubDate>Tue, 12 Jan 2010 12:23:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947059</guid><dc:creator>Vilx-</dc:creator><description>&lt;p&gt;He, I got hit by the heap manager too one day. I was writing a software for a computing olympiad. My program took as a parameter another program (.exe file) and ran it in a controlled environment - well, as much as I could control it. I set limits for memory and CPU time, limited the security tokens, and monitored it continuously if it was sleep()ing too much. I also attached as a debugger in order to provide as much information about a crash as possible. One contest entry then managed to hit this heap manager behaviour. It was completing the task almost instantly when run as standalone, but when run under my controller software it took more than 10 seconds of solid CPU time (the contest time limit was 1 second). Turns out that the program was allocating 10,000 vectors or something and each one of those was a separate memory allocation by the heap manager. Under the debugger this took way more time. :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947059" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9947017</link><pubDate>Tue, 12 Jan 2010 09:54:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947017</guid><dc:creator>Dhericean</dc:creator><description>&lt;p&gt;I know it's a bit of an aside but I felt I needed to share a very strange Heisenberg moment I had (almost 25 years ago).&lt;/p&gt;
&lt;p&gt;I was a postgrad solid state chemist, building my own computer-controlled Raman Spectrometer. &amp;nbsp;The spectrum was scanned by driving a stepper motor which turned a holographic grating. &amp;nbsp;We had bought the controller boards for the motor and were communicating with them through an IEEE-488 interface from APL (the GPIB drivers were the only non-trivial assembler I ever wrote and are a story on their own &amp;gt;.&amp;lt; ).&lt;/p&gt;
&lt;p&gt;The computer was communicating to the stepper motor controller fine, retrieving status and setting values, but the motor was not moving. &amp;nbsp;So I got an oscillosope and put it across the outputs to check that the correct wave form was being produced. &amp;nbsp;However when I put the oscilloscope on, the motor started to move; and when I took it off, it stopped again. &amp;nbsp;As a non-electronic engineer I was left trying to wonder how I was going to explain that I needed an oscilloscope permanently connected to my spectrometer.&lt;/p&gt;
&lt;p&gt;A more experienced hand diagnosed a floating ground on the low voltage side of the transformer (the wiring diagram provided did not show it being commoned) which was being grounded through the oscilloscope, and managed to rescue the instrument. &amp;nbsp;But for a moment I really wondered if I had proved Heisenberg.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947017" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946951</link><pubDate>Tue, 12 Jan 2010 06:38:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946951</guid><dc:creator>Drak</dc:creator><description>&lt;p&gt;@Tuesday: Ah, so you advocate leaving bugs in the OS that you know about, and can fix with a one-liner (Raymonds first function)? Let's never bugfix anything anymore :P&lt;/p&gt;
&lt;p&gt;@Mike Dimmick: Raymonds fix actually returns TRUE or FALSE, not TRUE or 0 :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946951" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946877</link><pubDate>Tue, 12 Jan 2010 02:30:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946877</guid><dc:creator>Tuesday</dc:creator><description>&lt;p&gt;Erm... Don't reinvent the wheel with every new OS version? Just leave &amp;quot;old&amp;quot; things alone and implement glasses and shakes as new interfaces? These workarounds wouldn't be necessary if the OS hadn't changed. So who is to blame?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946877" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946876</link><pubDate>Tue, 12 Jan 2010 02:27:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946876</guid><dc:creator>Nathan Tuggy</dc:creator><description>&lt;p&gt;It occurs to me that you know you're being a persistent annoyance if Raymond Chen starts aiming his Pre-emptive Comments at you... spare me from this fate!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946876" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946816</link><pubDate>Mon, 11 Jan 2010 23:49:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946816</guid><dc:creator>Matteo Italia</dc:creator><description>&lt;p&gt;Exactly like the heisenbug I'm after in these days. I must thank you, Raymond and Dale (and, indirectly, Yuhong Bao :P ), for that information: I was exactly wondering why an app run smoothly in the debug build, and in the release build when started by the debugger but crashes when run normally.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946816" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946753</link><pubDate>Mon, 11 Jan 2010 21:25:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946753</guid><dc:creator>Dale</dc:creator><description>&lt;p&gt;Larry Osterman raised the case of the debug heap being different, and causing a heisenberg bug, here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/larryosterman/archive/2008/09/03/anatomy-of-a-heisenbug.aspx"&gt;http://blogs.msdn.com/larryosterman/archive/2008/09/03/anatomy-of-a-heisenbug.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946753" width="1" height="1"&gt;</description></item><item><title>re: Why aren't compatibility workarounds disabled when a debugger is attached?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2010/01/11/9946339.aspx#9946731</link><pubDate>Mon, 11 Jan 2010 20:30:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9946731</guid><dc:creator>Mike Dimmick</dc:creator><description>&lt;p&gt;Gabe: or even recompile every shell extension in order to use Windows Explorer.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946731" width="1" height="1"&gt;</description></item></channel></rss>