After designing an InfoPath form and as you try to upload and register the form to SharePoint, through the Central Administration site for example, you may see the following error:
Object reference not set to an instance of an object
You may also see the following error when previewing the form within InfoPath Designer:
InfoPath cannot open the selected form. There was an error while loading the XML Schema for the form.