Craig Box's journeys, stories and notes...


Archive for May, 2007

Debugging .NET - "Common Language Runtime Debugging Services Application has generated an exception that could not be handled"

Friday, May 11th, 2007

ProfileTool doesn't work on half the machines I try it on. I get an error like:

Profiletool.exe Common Language Runtime Debugging Services
Application has generated an exception that could not be handled.
Process ID=0x14 (1300), Thread Id=0xe8(232)

Click OK to terminate the application.
Click CANCEL to debug the application.

There's no point searching Google for the process ID and thread number; they're unique to your instance.

What can you do here? You get an error suggesting that 'debugging failed' if you hit Cancel - this is correct, because you don't have a debugger installed!

First step, if you're running your .NET application off the network, stop, move it to your local disk, and try again. The default security policy doesn't let you do this - you can edit it in the Administrative Tools if you need to.

Now, if you still get the error, drop to a command line, and run the following:

ProfileTool 2>error.log

This redirects the standard error output to error.log, which you can then read. Linux/UNIX outputs this to the terminal by default; Windows hides it.

Thanks to Frank Racis, by way of Mohamed Yehia.

The actual error, in this case, was "No mapping between user accounts and security IDs was done", which really means "don't catch System.SystemException when you are throwing System.Exception". And when you're testing new builds, don't sit behind an ISA server which aggressively caches the old build.

Freeview and MythTV

Wednesday, May 2nd, 2007

With the launch of Freeview, I've decided to upgrade my TV capture setup.

I bought a TechniSat SkyStar2 from Martin at Digiview.co.nz (he has them listed for $145 on Trade Me with a 1 year warranty).  Go buy one off him and tell him I sent you.

Thanks to David Zanetti's in-depth information at pvr.geek.nz, and the always up-to-the-minute information from Steven Ellis on the mythtvnz mailing list, I found out everything I needed to know. And, as you've come to expect, processed it into an easy-to-replicate format, and wrote it up: Freeview MythTV setup. I'm running Ubuntu Edgy, and other than some DVB test utilities I chose to play with, didn't have to install anything - a complete "out of the box" experience.

I'm enjoying watching Stargate SG-1 on the TVNZ widescreen test channel. Unfortunately, I'm going to have to plug the aerial back into Sky eventually.

Next step, moving the card into my server, retiring the dedicated MythTV machine, and setting up XBMC's MythTV scripts.