RecordingDepth and other recording-related stuff

Aug 4, 2011 at 4:24 PM


I finally got my display connected and working on my HTPC.  It was an up-hill battle due to some incompatibility between my display and my USB controllers.

So... I am using the RecordingDepth tag to display the number of simultaneous recordings.  It definitely displays more than 4.  However, when I exceed 4 recordings, function 1 gets a little weird.  It doesn't seem to know how to display anything when there are that many recordings running.

Also, when I stop the recordings, the RecordingDepth never goes back to zero.  Even after I close LCD Smartie and start it again, RecordingDepth displays 1... and there are no recordings running.  I also got a memory protection fault from the mce_dll after I restarted LCD Smartie.  I'm sorry, but I didn't do a screen shot to get the exact error message.  It was then unable to load the DLL.

I closed Smartie and started it again.  This time, I didn't get the memory protection fault, but it was still displaying that 1 recording was running... and function 1 was complaining about channel 0 or something.

I'll be happy to test future versions to get the recording stuff straightened out.

Thanks for your time and effort!


Aug 4, 2011 at 6:35 PM

I've uploaded a version which should cope with up to 9 simultaneous recordings.  As I said before this is a flaky area of the code since MCE doesn't seem very consistent about sessions. I ca't get my RecordingDepth to go over 4 but I'll keep trying. The fact that LCDSmartie/Mce_dll ran up and indicated one recording would sound like you have a similar problem to me in that even if no recording is active when TCPIPController is first connected to by mce_dll it sends a false recording=true message. To circumvent this on my system I included the tag IgnoreSpuriousRecording. You can check if you have this problem by running MCE_tracer (it can be run at the same time as mce_dll) and examining the first message returned. If this indicates a recording=true even when no recording is active then you have the bug and should include IgnoreSpuriousRecording=1 in the mce_dll.cfg file. If this is the case I'd be interested to know what version of TCPIPController you are using.

I'd really like to know what the memory protection fault was so if it happens again i'd be really interested in the details.

Let me know how it goes with this.



Aug 4, 2011 at 7:36 PM

Thanks, I'll try to test it tonight.  The wife really doesn't understand why I'm spending so much time on this.

By the way, is there a way to suppress the message that says "channel 1234 not found"?  I know I can add the channels and names to the INI file, but I'm not very interested in channel names being displayed.

Aug 4, 2011 at 8:31 PM

Okay, found a couple of bugs in the recording code and added an ability to override the channel nn not found message (put 'ChannelNotFound=' in the cfg file). remember to put a blank line after the last thing in the cfg file though.

These changes are in change set 8100.


Aug 4, 2011 at 11:57 PM

I downloaded build 8100.  I started 6 recordings, then stopped them. mce_dll continued to report 6 until I stopped LCD smartie and then started it again.  This time, it reported 1 after restarting LCD smartie.  I then closed smartie and set the spurious recording setting in the config file.  It no longer reports the 1 recording.  I'll need to try starting a bunch of recordings again to see what happens now.

Aug 5, 2011 at 12:02 AM

After setting the spurious recording tag, I started 5 recordings.  When I stopped one of them, the number decremented to 4.  Then, when I stopped the other 4, it remained at 4.  Stopping and then starting smartie brought it back to zero.  There is definitely a problem.  I'll try to monitor it under more normal circumstances (recordings that end normally instead of being stopped manually).

Aug 5, 2011 at 9:42 AM


      How are you stopping the recording (so I can replicate it for testing).? There are at lease 3 different ways this can be done.

Aug 5, 2011 at 1:12 PM

I go to Recorded TV, then press Info (Control-D on a keyboard), and choose Stop Recording.

I have a couple of other issues.  I'm using the bignum plugin to display a big clock.  Something weird about my USB controllers makes bignum get scrambled after resuming from standby.  So, I wrote a batch script to kill LCD Smartie (taskkill) right before going into standby, then another script that starts smartie after resuming from standby.  This makes bignum work correctly, but then smartie fails to load mce_dll.  The only way to make it load mcd_dll is to exit smartie correctly (as opposed to killing it).  This will cause smartie to load mce_dll even if I start smartie from my batch script. 

I'm have WinBatch, so I'm going to try writing a WinBatch script that will exit Smartie the correct way to see if I can get around this problem.

I rebooted the machine today and I got the memory error from mce_dll.  Here's the message:

"Load of plugin failed: LoadLibrary failed with #998: Invalid access to memory location."

Aug 5, 2011 at 4:11 PM
Edited Aug 5, 2011 at 6:07 PM

I wrote a program that will close a Windows program gracefully.  I can't see how to attach something here, but you can get it at Google Docs by clicking the link below.

It works as follows:

CloseProg.exe <parameter1>

The parameter can be one of the following:

  • "WinItemize" - This will create a text file with a list of all open windows in your session.  It will then open the file in Notepad.  The file will be in your My Documents folder and will be named CloseProg.txt.  Make sure to turn off word wrap when you view the file because some window names are quite long and it will be confusing to look at it when they wrap.
  • "Window Name" - see info below.

Once you figure out the window name you want to close (by looking at the CloseProg.txt file), run the program like this:

CloseProg.exe "Window Name"

The Window Name is CASE SENSITIVE and can be a partial window name as follows:

  • "Some Partial Name" will match any window that BEGINS with the text in your string.
  • "Exact Window Name~" with a tilde at the end will match any window that EXACTLY matches your string.
  • "~Partial Name~" with a tilde at both ends will match any window that ENDS with your string.
  • "~Partial Name" with a tilde at the beginning will match any window that CONTAINS your string.

Understand that if you have multiple windows that match the string, it will select the one that was most recently accessed.


  • CloseProg.exe WinItemize
  • CloseProg.exe "LCD Smartie"

Here's the link:

Aug 6, 2011 at 3:15 AM

Funny, I don't ever get the "Failed to load dll"  or the memory error (after rebooting or going in and out of standby) and I have two instances of smartie running - one for the LCD and one using VirtualLCD which I can access from my Ipad wirelessly)

I do however start LCDSMARTIE using the Windows 7 Task Scheduler since there are some issues with the Windows 7 security.

I've been having a look at the recording issues and come to the conclusion that VMCController is not returning sensible info for the second and subsequent recordings (i.e. no start session and no endsessions) when recordings are selected from the guide but it might just be my HTPC setup. It also never ever sends a Recording=False message which explains the issue of the false recording=true when it starts.

I'll continue to investigate but it might mean I have to delve inside VMCController but my c# skills are pretty poor. Meanwhile if you get the chance to test recording again (wife allowing) can you run mce_tracer in a command window and set it's output to a text file (e.g. mce_tracer >test1.txt and email the file to me at please.

Aug 10, 2011 at 6:12 PM


I think some of my problems are related to the USB problems that I was having.  The display worked fine after resume from standby on a different computer.  I'm not the only one having problems with my particular type of display on certain motherboards.  I've had to take a step backward because of some other problems.  Since I installed Smartie, mce_dll, and SpeedFan, I have been experiencing stuttering in Media Center playback.  I'm trying to narrow down the cause, so my mce_dll testing is postponed for the moment.

Right now, I am running TCIP controller and Speed Fan and there is no stuttering in the playback.  For my next step, I'll get Smartie running with only the time of day displayed to see if that makes the stuttering come back.  Then, I'll add screens to display information from SpeedFan to see if that makes the stuttering return.

I'll try your suggestion of running Smartie from the task scheduler with elevated privileges... that's how I'm running SpeedFan also.

Aug 10, 2011 at 9:51 PM
Edited Aug 10, 2011 at 9:53 PM


I forgot to mention... I wonder if it's possible to persuade Herman at to give you the part of his source code for MCE Standby Tool that directly communicates with Media Center to figure out the recording state, play/pause states, etc.

EDIT: Oops... I meant LEDS Driver, not MCE Standby Tool.

Aug 11, 2011 at 4:14 PM

He appears to use the Media State Aggregation service which is the same thing that TCPIPController is based on. I'm looking at this.

Aug 11, 2011 at 5:56 PM

There's a guy on (WEC) who wrote software to be able to control his audio receiver via RS232 based on events in Media Center.  He is using MSAS also.  I asked him to send me the source code for his project.  I just got a private message from him on WEC with a link to his software.

It's written in C#.  I haven't looked at his software yet.  I'll send you a private message here on codeplex with a link to his code.  Maybe that will help you out.

Aug 12, 2011 at 9:29 AM

Thanks Brian, this seems to be based on the FileWriter sample from the previous MCE SDK. I'm working on it but it may take a bit of time.

Aug 12, 2011 at 2:29 PM

I haven't taken the time to look at the MCE SDK.  It interests me, but when I can find software that has already been written by someone else, why re-invent the wheel?

I've been having some serious stability problems since I started messing with LCD Smartie.  I've removed everything except Speed Fan (I like the notification capabilities in Speed Fan) and TCP Controller.  I think I'll remove TCP Controller next.  Have you had any problems since you installed TCP Controller?

Aug 12, 2011 at 2:35 PM

I completely agree about not re-inventing the wheel. My problem is understanding c# and other people's coe but i'm trying and will eventually get there! I've not noticed any real issues on my htpc with TCPController installed however I did have some issues with CPU use whilst testing something else when I reduced the refresh interval down from 300ms to 100ms but it could have been the code I was testing which was pretty cpu intensive.

Aug 12, 2011 at 2:38 PM

I know what you mean about C#.  I've never written anything in any flavor of C.  I'd like to learn C#, so I'm planning to make some changes to IR Server Suite, because it's not really supported by team-mediaportal anymore, and it has a few bugs.  I've been communicating with some of their development folks to learn my way around.

Aug 12, 2011 at 10:53 PM


About your stuttering issue, did you check for a conflict between serial devices ?? Both your LCD and LEDs are exposed as serial ports to Windows and they may be set as ports that share the same IRQ (ports 1-3 use IRQ4, ports 2-4 use IRQ3).

As troubleshooting steps I suggest first eliminating the possibility of a software issue with running Smartie without the LCD output, then trying out the LCD with all other serial devices disconnected (they are no longer ubiquitous in modern PCs so there may be only the LEDs to disable). You may also want to pay a visit to bios setup and disable on-board serial ports, that is unless you actually use them, if they exist.

I may be completely mistaken, but this all sound like an old dial-up modem/serial mouse conflict, 1995 style.

Out of curiosity, what make of LCD display do you use ??

Hope this helps or at least gives you more hints.