Symptoms
When creating a package you may receive the following error:
Object reference not set to an instance of an object.
Diagnoses
This error may occur because of the fact that controls on forms or views and/or SmartObjects become unbound. Either having been modified or if those items have been regenerated.
For packages which contain K2 for SharePoint workflows and forms it is recommended to open up the process again and go through all the activities and events with a special attention to the start activity of the workflow - it could be the case that the process still referencing and old SharePoint list which is no longer exist or something like this thus causing this error.
Resolution
A way you can resolve this issue is by running through the forms and views of the application and inspecting the bindings of the controls (including rules) and SmartObjects to see if anything has been misconfigured or changed.