Cause of "Failed to create empty document"
-
I'm trying to fix an MFC app that puts up a "Failed to create empty document" for some customers when they try to open a data file. It hasn't failed on any of our own systems or for our customers in North America, but only for a customer in Sweden and one in Australia. It fails in both Win XP and Vista. The user has admin privileges. I installed those on a test machine of my own, setting the language to Australian and the locale to Australia, and installing the same anti-virus as the Australian customer, but nothing I do can reproduce the problem locally. It's failing somewhere in MFC's OpenDocumentFile() function. Does anyone have an idea why it would work fine in the United States, but fail in Australia? It's not even reading a file yet, just trying to create an empty doc. Thanks in advance for your help.
Dave Goodman dgoodman@infoway.com dkgoodman.com/blog.html "Actio sequitur esse."
-
I'm trying to fix an MFC app that puts up a "Failed to create empty document" for some customers when they try to open a data file. It hasn't failed on any of our own systems or for our customers in North America, but only for a customer in Sweden and one in Australia. It fails in both Win XP and Vista. The user has admin privileges. I installed those on a test machine of my own, setting the language to Australian and the locale to Australia, and installing the same anti-virus as the Australian customer, but nothing I do can reproduce the problem locally. It's failing somewhere in MFC's OpenDocumentFile() function. Does anyone have an idea why it would work fine in the United States, but fail in Australia? It's not even reading a file yet, just trying to create an empty doc. Thanks in advance for your help.
Dave Goodman dgoodman@infoway.com dkgoodman.com/blog.html "Actio sequitur esse."
Dave, I was adding some functionality to an MFC app that has been running for 10 years. I started getting the "Failed to create empty document" message. I stepped into the constructor of my document class and its base class and all the other objects that were being created. The constructor of one of my objects was getting a pen style out of a configuration file that contained a bogus value. The class was attempting to create a pen with "new CPen(..." using the bogus pen style value. The constructor of CPen threw an exception eventually causing the document class to exception out resulting in the infamous "Failed to create empty document" message. Perhaps your customers in Sweden and Australia have some bogus data in either their data files or some configuration file.