dls104824

I'm using Visual Studio 2005 SP1.

When I try to add a class with the class wizard, the wizard appears to complete, but soon after completion Visual Studio shows a dialog box with the error icon and the text: "Cannot access data for the desired file since it is in a zombie state."

Sometimes when this error occurs, a second dialog box with the error icon and the text: "Visual Studio has encountered an unexpected error." appears.

In all cases, parts of the class-addiiton occur. An RGS file is added to the project, as is the _*_Events_CP.h file; however, this file is empty.

I've disabled all add-ins using the Tools/Options/Environment/Add-in & Macros Security settings with no change.

Thanks for information,

David



Re: Visual C++ General Strange error in class wizard

Bite Qiu - MSFT

Try the workaround in this report: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=121644, although the situation is different, but the errors and result seems the same, I hope it helps.




Re: Visual C++ General Strange error in class wizard

dls

Hmm,

The problem in feedback report 121644 has a workaround that says to not use solution folders. It seems a little ambiguous, but I've tried several variations.

I tried creating a new project (type ATL Project) with and without the "Create directory for solution" option. In both cases, no solution folders appear, all projects are added directly to the root of the solution. I still see the error message when using the class wizard.

I also tried removing all the filters from the project. I still see the error message when using the class wizard.





Re: Visual C++ General Strange error in class wizard

dls

In a somewhat related question: Does this work for anyone

I had to follow Yuriy Tarasov's advice in this thread (http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=496927&SiteID=1) before my ATL Server project was considered an ATL supporting project by the class wizard, so I have some confidence that the testing wasn't very deep in this area.

I'd rather not go through a clean installation process on VS2005 + Team Explorer + SP1 if it's not likely to yield results.





Re: Visual C++ General Strange error in class wizard

dls

Related information:

The machine hosting the IDE is running IE7.





Re: Visual C++ General Strange error in class wizard

dls

Related information:

The failure only occurs if the project is unattributed. Attributed ATL projects succeed. Unfortunatly, this doesn't help me.





Re: Visual C++ General Strange error in class wizard

Boris Jabes

David, can you specify which wizard you're running to be exact Does this error occur every single time If so, can you package it into a repro/zip and send it my way

Thanks,






Re: Visual C++ General Strange error in class wizard

dls

Hi Boris,

I'm running the ATL Simple Object wizard from the "VC\VCWizards\CodeWiz\ATL\Simple" subdirectory.

This error occurs every single time I perform the following:

  1. Use new project wizard in VS2005 (ctrl-shift-n) to create a Visual C++/ATL Project.
    1. I have tried using both settings for the Create directory for solution option.
  2. In the ATL Project Wizard do not select the Attributed checkbox.
    1. I have tried using all Server type options.
    2. For the server types that support it, I have tried selecting the Allow merging of proxy/stub code option.
  3. After the project is created successfully, start the ATL Simple Object wizard
    1. Either by context menu with in the Solution Explorer, or by the Project/Add Class... menu item.
  4. Add a class with the ATL Simple Object wizard.
    1. Do not select the Attributed option on the Names page of the wizard.
  5. After completing the wizard, an error dialog or pair appear as I noted in an earlier post from this thread.

I've been doing some checking using wizard.YesNoAlert, and the error seems to occur in the AddCoclassFromFile function from VC\VCWizards\1033common.js in the following line (line 921):

oCM.IDLLibraries(1).EndPointOf(vsCMPartBody, vsCMWhereDefinition).CreateEditPoint().Insert(strInsertText);

If I comment out the call to AddCoclassFromFile from default.js, then the similar line in AddInterfaceFromFile causes a similar error.

I've tried quite a few things including repairing VS2005, disabling all IE7 add-ons, and uninstalling IE7. Nothing's worked so far.

I'll send a test project (Test). The state it's in is as it is after the error occurs while adding a class with the short name Class. Note that some of the wizard's additions remain (e.g. Class.rgs). I'll also include the default.js and common.js files.

Thanks,

David





Re: Visual C++ General Strange error in class wizard

dls

Boris,

Sorry to ask, but the MTA made me. Is borisj at online dot microsoft dot com a correct contact





Re: Visual C++ General Strange error in class wizard

Boris Jabes

actually it isn't, but I see you've already figured out the correct address.




Re: Visual C++ General Strange error in class wizard

dls

Boris,

Thanks for the advice, so far and sorry to lead you on a bad-configuration-management chase. I've just created a clean installation on a virtual machine and the class wizard works as expected.

I've tried un-installing and re-installing the installation of visual studio that was failing and the problem hasn't gone away. Any other plausible ideas before I pave the machine





Re: Visual C++ General Strange error in class wizard

Brian98045

I believe the Non-Compile-Browse file is in a confused state. I have SP1 and I still got this error:

>

> "Cannot access data for the desired file since it is in a zombie state"

>

In my case I received this error when I went to add an ATL simpleclass to my ATL project. I fixed this problem on my machine by:

1. selecting ClassView and deleting any partial objects I had created.

2. closing the problem project.

3. opening the project and double-clicking on the .rc file which opened the ResourceView.

4. deleting any partialy created objects referenced here

5. closing the project again

6. deleting the .ncb file in the project directory

7. now I was free to add my classes with no error.

As a workaround for the future (until I hear of a solid fix) - I will close my projects and delete the .ncb before adding any new classes with the ATL Wizard. I recommend the same to anyone else who is experience this problem.

Brian





Re: Visual C++ General Strange error in class wizard

tsgomez

Thanks Brian. I experienced the same problem and your workaround did the trick.

Is this a system configuartion error or an IDE error






Re: Visual C++ General Strange error in class wizard

skraps

Delete your .APS file and try it again. Worked for me when I ran into the same problem.