After this topic came up 2 times already at the same customer I need to write it down somewhere to remind myself and why not share it with the community.
Problem Description
The silverlight console starts showing errors instead of loading the jobs and tasks details for a selected computer. Other Computer might still show the list of jobs and task run and running as usual.
Silverlight gives an error message about some unknown exception during loading the Taskhistory.
If you use the Resource Manager and check Jobs and Tasks Summary there you will still see all the Tasks run.
Cause
The silverlight module doesn't really like NULL values. In this case it was older deleted Tasks. When silverlight tries to get details for the Task Instance it will be presented with NULL for some of the Taskinstances of the computer. If you check in the database you will also find those Instance orphans.
Solution
Run the following SQL query to find all the taskinstances that don't have any taskversion or task/job item attached anymore. After a backup of the DB you could change the "select * " to "delete " and get rid of the orphaned taskinstances. If I missed something please feel free to comment.
select * from taskinstances where taskinstances.TaskInstanceGuid in(select ti.TaskInstanceGuid from taskinstances ti left join itemversions iv on ti.TaskVersionguid = iv.Versionguid left join item i on iv.Itemguid = i.guid join Taskinstanceresults tir on tir.TaskInstanceGuid = ti.TaskInstanceGuid where i.Name is NULL and i.Guid is NULL and iv.ItemGuid is NULL)