Below is the error that was displayed and as it turned out later it was caused by Microsoft ForeFront.
After checking the Event logs and the ULS logs from SharePoint I did some Google and stumbled upon this blog from Will Pritchard. He made these two brilliant SQL Queries that made me happy again.
Query to see if you have any problems. If yes you can be happy this time, if no you’re back to square one.
select *
from AllDocs
where (VirusStatus > 0) and (VirusStatus is not null)
Query to fix the problem
update AllDocs
set VirusStatus = null
where (VirusStatus > 0) and (VirusStatus is not null)
In the end it turned out that the problem was caused by Microsoft ForeFront Security which has flagged my custom.masterpage as a virus. So boys and girls now we know whenever we see a HRESULT: 0X80041050 error we can relax and thank Will.