“Object reference not set…” – Salvaging a Busted Project

It’s been a while since the last post – I’ve been busy with an Endpoint Summit (I’ll post the likely embarrassing video after Symantec does) and several customers, and my free time has been consumed with family and Dark Souls II.  So it’s past time that I post something.

During a working session with a customer two weeks back, I ran into something I haven’t seen in a while.  After making some major changes with data types and mapping in the project, I attempted to spool the debugger, and got this:


Now, once upon a time, this error meant to me that “oh crap, there goes an hour’s worth of unsaved progress”, because this problem prevents saving the project as well.  While I don’t have a sincere diagnosis for the problem, I certainly figured out the hammer as a solution.

What this error seems to mean is that there is a really horrible problem somewhere in one of the models (possibly the primary model).  The only way I’ve been able to recover from this is to start at the primary model, select everything (Ctrl + A) and either: 1. Delete or 2. Cut (Ctrl + X).  Yes, as I said, it’s a hammer.  Then, attempt to save the project.  If the save works, then go ahead and Undo (Ctrl + Z, whether you deleted or cut) or Paste (Ctrl + V, if you cut).  If it’s a complex model, it may take a bit to restore the model.  After it’s restored, validate the model and attempt to save again.  If the save attempts are not successful, try other models one at a time.

So far, this issue has only occurred twice in 7.5 (earlier versions of 7.5, anyway), but it would happen once a day back when I did full time development in 7.1.  Suffice it to say that I really wish I’d known about this “fix” back then, because I lost a lot of work back in those days to this bug.

Hope that helps someone in the future!

2 thoughts on ““Object reference not set…” – Salvaging a Busted Project

  1. 95% of the time I run into this error in Symantec Workflow Solution, the issue is a null value / missing variable / property being passed into somewhere that does not expect / cannot handle a null value.

    An example:
    You have a variable myOrder that is of a custom datatype OrderType. Each OrderType variable has properties “id”, “contact” and “total_sum”. You have mapped the myOrder variable’s “total_sum” property into some component. But then you change the OrderType datatype so that you remove the “total_sum” property all together and reload the project.

    Now, some components realize that a property has dissapeared from the datatype, realize that an invalid mapping has occurred and display that nice little red exclamation mark. But some components do not raise an exception – they don’t realize that anything is wrong. However the debugger / compiler does see the problem and raises a “blank check” exception, where it cannot clearly identify the actual exception component.

    Whenever i get this exception, I try to think really hard about which components are or could be passing/mapping variables that I have modified after the last save. When the project is large, containing anywhere from 100 to 500 components and many linked or sub models, I try to solve the problem with the exactly same method as you described.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s