Monday, December 30, 2013

How to deal with "QuickBooks has encountered a problem and needs to close."

It's 2 days before the end of the year, a time for bookkeeping and regulatory filing, albeit not a lot of time left to meet the end-of-year deadlines, when this happens when launching QuickBooks:

Trying again produces the same error, over and over again. Then panic sets in, did I just lost all my financial information ? Why is this happening ? Probably my company file got corrupted, and QuickBooks can't deal with it. More on this later. Let's fix it first.

One way to recover from a corrupted company file is to restore it from a previously saved backup. If you don't have a recent backup ready, my method won't help you. First I need to locate the backup file. QuickBooks has the habit of moving the location of backups, as you upgrade to newer versions, so my best bet is to do a search for files with the extension ".QBB":

Alternatively, you may have a copy of the backup saved "in the cloud" - highly recommended in case something happens to your computer - not necessarily to use the online storage offered by Intuit. Any alternative will do.

Trying to open a local backup by double-clicking the file produces this message:

Yeah, thats very helpful, Intuit. I'm having problems exactly with opening QuickBooks, which by default will always try to open the company file. If that's corrupted, I'll keep getting the "encountered a problem" error message (meaning that in fact the program has crashed). To get out of that dead-end we could first locate the company file (should have the extension *.QBW - if you don't know it's location you can search, as I did above for *QBB).

 Then we can rename it to something else:

Now if I try to open QuickBooks I see:

Now we're getting somewhere. Click the "Open or restore an existing company" button:

And choose the "Restore a backup copy":

In my case I'll use a local backup:

Here QuickBooks will try to hold my hand:

But the original (corrupted) company file would have been already renamed, so I'll just use its original name:

Next, sweet victory:

We're back in business. Just remember, because this was recovered from a backup, some of the most recent transactions, since that backup was made, will be missing. You'll need to enter those again. That's why it's good practice to perform backups often.

Now let's talk about why this happens, and how Intuit could have dealt with it in a better way and not have us jump through all those hoops. I'm a software developer. It's right up my ally.

In my case the problem happened because I inadvertently launched QuickBooks twice. My computer had just rebooted after Microsoft installed a bunch of updates, and now was acting pretty sluggish (thanks Microsoft !). My initial attempt to open QuickBooks seemed to go nowhere, so I tried to open it up again. Upon closer inspection, using the task manager, I was able to see 2 instances of the QuickBooks app running. Uh-oh. Shortly after came the error message about the crash.

So the first failure of Intuit was to handle this common scenario, of trying to open the program multiple times. Obviously, when QuickBooks opens it must be writing something in the company file, and having multiple instances open causes them to step on each other's toes and results in corrupting that file. There are plenty of ways to ensure exclusive access to a file by a single process - pretty basic stuff - which Intuit failed to implement.

There are other ways in which the company file may get corrupted, for example if something happens with the application/operating system/computer while the file is in the process of being written. There are ways of dealing with those scenarios too, and indeed a well engineered app should try to prevent errors and data corruption. But those may happen anyway, despite our best intentions. So the next step would be automatic error recovery. Here Intuit fails again. They pretty much try to open the same corrupted file each time the app launches, resulting in crashing over and over.

A better way would be to catch that error and not let the app crash, or at least on subsequent launches detect that the app had previously crashed, and enter a recovery mode. The recovery could be made from a redundant copy of the company file or from a backup, as I manually did above.

These are 2 principles worth observing when doing software development. First do your best to prevent errors. Then assume that some errors will happen anyway and ensure that you can recover from them graciously.


Anonymous said...

QuickBook data recovery software specifically designed to help you recover any important data or .QBW files It Recovers All the Information related to Customers, Vendors ,Services, , and Employees stored in QuickBooks files. For more information

Anonymous said...
This comment has been removed by the author.
Unknown said...

The tool efficiently removes inconsistencies from your QuickBooks file and helps you resolve any erroneous situation.


Unknown said...
This comment has been removed by the author.
Unknown said...

The advanced QuickBooks recovery tool has highly sophisticated algorithms of scanning to repair the damaged and deleted QBW file and thereby it ensures a safe and secure QBW Recovery.


Unknown said...
This comment has been removed by the author.
Unknown said...

Found an easy solution to repair and rebuild the corrupt QuickBooks database files:

johnbarker said...

Here is an application which i found from Google, offer free trial version to recover corrupt QuickBooks files.

Unknown said...

QuickBooks Recovery utility is a great tool to recover your important data files such as .QBW (QuickBooks Primary Data File) and .QBB (QuickBooks Backup File) files in cases of corruption, damaged and inaccessible.

Read more:-

Sean Werner said...

Here is a simple and quick solution to repair and restore the damaged or corrupt QuickBooks database files easily:

This step by step method helped me to recover data from a severely damaged QuickBooks 2012 files.

Good Luck !
Sean Werner

Quickbooks Recovery said...

yes....I appreciate your effort.

Manoj said...

QuickBooks Recovery for Mac is a much-needed tool for all Mac users who are in the lookout for repairing damaged or corrupt QuickBooks files. The tool repairs the damage and recovers the data related to 'Company, 'Vendors', and 'Employees'. Supporting all major country editions, such as US, UK, Canada, Germany, Australia, New Zealand, and South Africa, the tool is works for the 2010, 2011, 2012, 2013, 2014, 2015 and 2016 versions.

For download :

Unknown said...

nice blog update...

Quickbooks Data Recovery Support services provide 24X7 tech support intuit quickbooks any Data Recovery Problem call +1-877-377-7005.