Yet one small thing to remember and I hope that someone else will find this posting useful. Consider following scenario: SharePoint Workflow (Visual Studio Worklow -style) runs fine on development environment. From development the workflow is brought to testing (or production if not the happy world) by using wsp’s or other methods.
In testing the workflow immediately gives message “Error Occurred” and in SharePoint logs following line is found with category of Workflow Infrastructure: “Object reference not set to an instance of an object”. In this case I found that this error message is given as the Content Type that workflow uses is not found on Task List. Usually this one goes well when doing a new deployment but if you have deployed earlier and update your workflow with changes to content type then this is possible error.
Usually “Object reference not set to an instance of an object” means that something is missing. It can be missing column from the list or in this case missing content type. This is relatively easy to fix (associate a content type to tasklist or as update procedure delete existing tasklist and create new one from workflow association screen).