When you try to install SQL Server 2008 sample database AdventureWorks2008_SR4. If your sql server service not started before you will get the following error message
A fatal error occurred during installation.
Details: Object reference not set to an instance of an object.
Solution : Make sure SQL Server service is running