<?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>16.7ms in the life : Tools</title><link>http://blogs.msdn.com/peterrosser/archive/tags/Tools/default.aspx</link><description>Tags: Tools</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>DVB Guide issues - "cannot schedule recoding because guide data cannot be accessed"</title><link>http://blogs.msdn.com/peterrosser/archive/2006/02/15/DvbGuideProblem.aspx</link><pubDate>Thu, 16 Feb 2006 10:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:533073</guid><dc:creator>Peter Rosser</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/peterrosser/comments/533073.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterrosser/commentrss.aspx?PostID=533073</wfw:commentRss><wfw:comment>http://blogs.msdn.com/peterrosser/rsscomments.aspx?PostID=533073</wfw:comment><description>&lt;P&gt;We have been getting reports about Guide problems&amp;nbsp;from DVB users across&amp;nbsp;Europe and the world, hopefully in time for the next Rollup release (external date not yet announced, but should be late Q1 to early Q2).&amp;nbsp; The problem typically manifests itself when scheduling many shows to record, but can occur anytime.&amp;nbsp; Without a code fix, you cannot work around the issue cleanly/easily, but closing the shell (Media Center UI) and restarting the "Media Center Scheduler Service" (ehsched) will reset the state of the machine.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Edit: This is the "cannot schedule recording because guide data can't be accessed" issue.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We root-caused the problem to an unusual memory management problem in how we deal with the Guide data.&amp;nbsp; For performance reasons, we temporarily increase certain buffer sizes during a Guide download, and decrease them again later.&amp;nbsp; There is a timing issue with garbage collection events in some situations, though, that can cause the decrease to not take effect "in time", thus keeping the buffer sizes large.&amp;nbsp; This does not actually reduce the amount of real memory used, but it does exhaust the virtual address space eventually.&amp;nbsp; You can observe the behavior using &lt;A href="http://www.sysinternals.com/Utilities/ProcessExplorer.html"&gt;SysInternals' Process Explorer&lt;/A&gt; by adding the "Virtual Size" column (under the Process Performance tab) and observing its value for ehrec.exe.&lt;/P&gt;
&lt;P&gt;With better knowledge of the cause, though, comes a better workaround than "gun ehshell.exe and restart ehsched when it happens".&amp;nbsp; Until the fix comes out, the best thing to do to &lt;EM&gt;prevent&lt;/EM&gt; this problem from occurring is probably to set up a Scheduled Task to do those things for you at a predictable time.&amp;nbsp;To wit:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Download recycle_mce.cmd from&amp;nbsp;&lt;A href="http://pegasi.com/recycle_mce.zip"&gt;here&lt;/A&gt;.&amp;nbsp;(script to recycle ehshell.exe and TV services).&amp;nbsp; Unpack the script somewhere on your drive. 
&lt;LI&gt;Change your Guide download time to a time that you are not likely to have a need to either watch TV on your MCE or record a show.&amp;nbsp; 4am is pretty safe for me, but to each his own.&amp;nbsp; I wrote a tool that lets you edit this time easily, you can &lt;A href="http://www.pegasi.com/MceDlTimeEditor_0.1.zip"&gt;download it from my site&lt;/A&gt;. 
&lt;LI&gt;Create a Scheduled Task to run the script daily about 30 minutes after the time you configured the Guide to download.&amp;nbsp; If you have a modem, you may need to give it more time.&amp;nbsp; If you have a pretty fast computer and broadband, 30 minutes is very generous. &lt;A href="http://www.uwec.edu/help/WinXP/scheduledtasks.htm"&gt;Guide to creating scheduled tasks&lt;/A&gt;.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;It's not a perfect solution, since a) it presumes you have a time during the day you will not make recordings or watch TV, and b) it cannot prevent the problem 100%, especially if you are a "heavy" user.&amp;nbsp; If you run into the problem, though, running recycle_mce.cmd will at least reset your state.&lt;/P&gt;
&lt;P&gt;The real fix is coming with the next rollup, but since there are users out there feeling pain &lt;EM&gt;now&lt;/EM&gt;, I thought I'd try to help a little.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The programs, scripts, and instructions in this posting are provided AS-IS, with no warranties, and are not sanctioned nor released by Microsoft.&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=533073" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Media+Center/default.aspx">Media Center</category><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Tools/default.aspx">Tools</category></item><item><title>Visual Studio 2005 Shipping on my Birthday</title><link>http://blogs.msdn.com/peterrosser/archive/2005/10/31/487569.aspx</link><pubDate>Tue, 01 Nov 2005 08:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487569</guid><dc:creator>Peter Rosser</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/peterrosser/comments/487569.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterrosser/commentrss.aspx?PostID=487569</wfw:commentRss><wfw:comment>http://blogs.msdn.com/peterrosser/rsscomments.aspx?PostID=487569</wfw:comment><description>&lt;P&gt;You know I'm a geek when something like that gives me even a little bit of a thrill.&amp;nbsp; November 7th... not just an election day or my birthday, but also the VS2005 public ship day. ^_^.&amp;nbsp; I'm installing it now on my primary and backup dev boxes at work now... sometimes the perks of working here are pretty nice.&amp;nbsp;Mmm... generics.&lt;/P&gt;
&lt;P&gt;One of my coworkers suggested I take another look at Managed C++ (during our conversation I expressed my "dismay" at the prior version's foibles), so I'll take a peek at that as soon as I have a spare cycle or two.&amp;nbsp; It's pretty hard to get any free time with the painting at home and the heavy influx of&amp;nbsp;QFE issues we always get post release, but I'm sure I'll manage.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487569" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Coding/default.aspx">Coding</category><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Musing/default.aspx">Musing</category><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Tools/default.aspx">Tools</category></item><item><title>MceRepair 0.2</title><link>http://blogs.msdn.com/peterrosser/archive/2005/10/21/483723.aspx</link><pubDate>Sat, 22 Oct 2005 08:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:483723</guid><dc:creator>Peter Rosser</dc:creator><slash:comments>21</slash:comments><comments>http://blogs.msdn.com/peterrosser/comments/483723.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterrosser/commentrss.aspx?PostID=483723</wfw:commentRss><wfw:comment>http://blogs.msdn.com/peterrosser/rsscomments.aspx?PostID=483723</wfw:comment><description>&lt;P&gt;I've posted an update to MceRepair&amp;nbsp;at &lt;A href="http://www.pegasi.com/MceRepair_0.2.zip"&gt;http://www.pegasi.com/MceRepair_0.2.zip&lt;/A&gt;, which&amp;nbsp;adds additional error logging in case of problems.&amp;nbsp; If you tried 0.1&amp;nbsp;and it failed,&amp;nbsp;0.2 may work for you.&amp;nbsp; If not, at least you will have more complete information with which I can debug it. [;)]&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=483723" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Media+Center/default.aspx">Media Center</category><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Tools/default.aspx">Tools</category></item><item><title>MceRepair 0.1 (alpha)</title><link>http://blogs.msdn.com/peterrosser/archive/2005/10/20/482974.aspx</link><pubDate>Thu, 20 Oct 2005 10:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:482974</guid><dc:creator>Peter Rosser</dc:creator><slash:comments>25</slash:comments><comments>http://blogs.msdn.com/peterrosser/comments/482974.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterrosser/commentrss.aspx?PostID=482974</wfw:commentRss><wfw:comment>http://blogs.msdn.com/peterrosser/rsscomments.aspx?PostID=482974</wfw:comment><description>&lt;P&gt;Having gotten a little fed up with manually re-registering MCE files when MedCtrRO.exe fails, I have created &lt;A href="http://www.pegasi.com/MceRepair_0.1.zip"&gt;a new command-line utility&lt;/A&gt; to automate the task.&lt;/P&gt;
&lt;P&gt;MceRepair.exe will:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Repair the ACLs to get COM+ Services working again (&lt;A href="http://support.microsoft.com/kb/909444"&gt;see KB909444&lt;/A&gt;) 
&lt;LI&gt;Repair the registration for .NET Framework v1.1 libraries (should fix the "Entry Point Not Found in mscoree.dll" error during registration). 
&lt;LI&gt;Reinstalls all MCE Windows Services 
&lt;LI&gt;Re-registers COM components of MCE 
&lt;LI&gt;Reinstalls managed assemblies into the GAC 
&lt;LI&gt;Recreates native images for managed assemblies (ngen)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Of course, I can't warranty any of this stuff, but if you find it useful, feel free to use it.&amp;nbsp; If you run this and still cannot get things working on your machine, please let me know!&amp;nbsp; Please include your %windir%\MedCtrOC.log file, %windir%\ehome\ehshell.crash (if it exists), and if you're experiencing EPG problems, a zipped/RARed copy of your %ALLUSERSPROFILE%\Application Data\Microsoft\eHome\EPG folder.&lt;/P&gt;
&lt;P&gt;MceRepair 0.1 (alpha) is posted at &lt;A href="http://www.pegasi.com/MceRepair_0.1.zip"&gt;http://www.pegasi.com/MceRepair_0.1.zip&lt;/A&gt; [obsolete, use 0.2 below]&lt;/P&gt;
&lt;P&gt;EDIT: A newer version, 0.2, is now available at &lt;A href="http://www.pegasi.com/MceRepair_0.2.zip"&gt;http://www.pegasi.com/MceRepair_0.2.zip&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=482974" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Media+Center/default.aspx">Media Center</category><category domain="http://blogs.msdn.com/peterrosser/archive/tags/Tools/default.aspx">Tools</category></item></channel></rss>