StrataFrame Forum

AccessViolationException in BOM v1.6.5.3

http://forum.strataframe.net/Topic18722.aspx

By Edhy Rijo - 8/25/2008

I am getting the following error:

AccessViolationException
  Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source     : EnvDTE

Stack Trace:
   at EnvDTE.ProjectItem.get_Name()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(Project A_0, String A_1)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(String A_0, Project A_1)

AccessViolationException
  Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source     : EnvDTE

Stack Trace:
   at EnvDTE.ProjectItem.get_Name()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(Project A_0, String A_1)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜀ(String A_0, String A_1, Project A_2)

I get the error when right click a BO in BOM and choose Rebuild, and after the error the BOM Results forms show everything as OK, but the BO classes are not rebuild.

By Dustin Taylor - 8/26/2008

It looks like an environment issue trying to access your project information.

Does this happen to all of your development machines or just the one? When did it start?

By Edhy Rijo - 8/26/2008

Hi Dustin,

I only have one development machine.  I was working with one project which I had to rename its name all over using the Find and Replace, so far the project worked just fine, not error at compilation level, and it ran just fine.  Then when using the BOM I started getting that error.

I even tried with other projects and got the same BOM error, so it looks like that the renamed process of the previous project caused some problem with the SF BOM data. 

Should I look for any reference in the SF database for my previous project's name related to the BOM metadata?

By Edhy Rijo - 8/26/2008

Hi Dustin,

For the record, I am not able to do anything with the BOM, I am still getting those error messages with any project I use and try to generate the BO.

Is there anything I could try to fix this?

By Edhy Rijo - 8/26/2008

Just in case this has something to do with the SF database, you can download a copy of my SF database here.

I also removed SF and re-installed with the latest version available, but still  I am not able to use the BOM to generate the partial classes.

By Edhy Rijo - 8/27/2008

Dustin, Trent,

I would really appreciate if you can take a look at this issue.  I am stock and not able to use the BOM with any project.

I installed the latest SF released today.

Thanks! Tongue

By Dustin Taylor - 8/27/2008

Don't worry, we haven't forgotten about you! Trent's in a meeting all morning, I'll grab him to get another set of eyes on it once he gets out.

In the mean time, what did you rename your project from and to? I'm looking through your strataframe database and don't see any funkyness so far, just need to know what to look for.

Thanks!

By Edhy Rijo - 8/27/2008

Thank you Dustin.

The orignal project name started with atr_crm and this was replaced with FixTrack.  I replaced all occurrences of atr_crm in the solution and all projects, also I did the same in the SF database.

Then after that, I get the original error posted in 1st tread for all BOM projects.  Just to confirm, the project is compiling and running fine with no errors, only the BOM is complaining here Cool

By Edhy Rijo - 8/27/2008

I uploaded a video of what is happening with the BOM in this case.

http://www.progytech.com/videos/SF_BOM_AccessViolationError\SF_BOM_AccessViolationError.htm

By Dustin Taylor - 8/27/2008

Ok, Trent took a look at this and he actually isn't sure the issue is within the strataframe database. To test that. Backup your existing strataframe database and then create a new (blank) one. From there, go into the BOM and try to create a new project for your FixTrack solution, and let's see what happens. If nothing else it will give us a better idea of where the problem lies.
By Edhy Rijo - 8/27/2008

Hi Dustin,

I tried your suggestion, but I still get the same error.

AccessViolationException
  Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source     : EnvDTE

Stack Trace:
   at EnvDTE.ProjectItem.get_Name()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(Project A_0, String A_1)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(String A_0, Project A_1)

Obviously this method EnvDTE.ProjectItem.get_Name() is the one where the error is being generate, what does this method do?

Since this is happening with all my projects, then could it be something with VS2008?

That reminds me the old VFP problems with the resource files, is there something in VS/VB.NET that may need to be clean up?

By Edhy Rijo - 8/27/2008

Well Google is always one of our best friend Smile

Since you didn't have a clue of what may have gone wrong, and it was not the SF database,  then I did a search on Google and found many links related to the same AccessViolationException error.  One of the post indicated to re-install .NET 2.0 which I did and guess what? that solved the problem Tongue.

In my case I simply repaired the installation of Microsoft .NET Framework 2.0 SDK (x64).

By Dustin Taylor - 9/2/2008

Well that certainly would cause things to go funky, wouldn't it? When the .NET framework gets hosed it allways manifest in the strangest ways!

Glad you got it going BigGrin

By Keith Chisarik - 1/10/2009

I just got this too... just one machine (the one I care about of course) , others seems fine and it only manifests in the BO Mapper.

In my case repair hasn't worked, I'm going to go drink I think Sad

By Keith Chisarik - 1/11/2009

Repair and reinstall of .NET 2.0 has not helped. If you guys have any ideas as to what this error means or how to fix it, I would appreciate it. It is exactly the same as Edhy had. So far as I can see, nothing outside the BO mapper is unhappy as a result of this error. It is just on one PC and I can work by rebuilding on another workstation, but I have to fix it eventually. Think it is SF or .NET related?

AccessViolationException
  Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source     : EnvDTE

Stack Trace:
   at EnvDTE.ProjectItem.get_Name()
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(Project A_0, String A_1)
   at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(String A_0, Project A_1)

By Edhy Rijo - 1/12/2009

Hi Keith,

Try using the Windows Restore feature to restore your Windows to an earlier day of the problem showing up.

Probably something was installed in your computer that mess up the registry.

By Trent L. Taylor - 1/12/2009

I really don't what would cause this.  I will tell you this though.  Since I have loaded SP1 for VS2008 (a number of months ago) it is not uncommon for me to get blown out of VS once ot twice a day with an "Out of Memory" exception.  This has definitely been an extreme frustration, but there is generally no stack trace and/or a way to track down where the root of the issue resides.  When the devenv environment is getting shaky due to this, then if I go into the BO Mapper which will tax the DTE then an error may occur....but the environment is already hosed at this point.
By Trent L. Taylor - 1/12/2009

Hey Keith, you know why this is happening don't you?  It is because you rooted for a team that was really mean to the Cowboys BigGrin
By Keith Chisarik - 1/12/2009

I have been avoiding any form of gloating due to fear of my posts mysteriously falling silent Tongue , but since you mentioned it.

"Hello T.O.? How is the vacation?"

By Trent L. Taylor - 1/12/2009

LOL....well, you know what the Cowboys and a possum have in common don't you?

They play dead at home and get killed on the road. Crazy

Hopefully they will get their act together for next year....but I am rooting for the Cardinals now! BigGrin

By Keith Chisarik - 2/13/2009

Installing 1.6.7 beta fixed this on my 2nd development machine Smile
By Douglas Riley - 6/18/2009

Is anyone still running into this error? I now have the same problem using 1.6.6.



AccessViolationException

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.



Source : EnvDTE



Stack Trace:

at EnvDTE.ProjectItem.get_Name()

at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(Project A_0, String A_1)

at MicroFour.StrataFrame.AddIns.PartialClassBuilderDialog.ᜁ(String A_0, Project A_1)



I have tried all the suggestions listed (reinstalled Strataframe 1.6.6, installed 1.6.7, reinstalled the frameworks) but still receive the same error. Any help would be appreciated!! I am about out of ideas.



Doug
By Trent L. Taylor - 6/18/2009

You know, I ran into this the other day myself. So I am willing to bet that you may be running a 64-bit OS. This is the only time I have ever seen this. And it has to do with accessing the CodeDOM or the DTE2 depending on where it fails. I would be curious if you have tried this on a new project. Just for troubleshooting purposes, if you create a new project, add a new BO, then go into the BO Mapper do you still get the error?



I did a number of things the other day and the error went away when I was not expecting it to. But let's start by troubleshooting this with a new project and solution.
By Douglas Riley - 6/18/2009

Trent,

Yes, I tried a brand new project and got the same error. I am using Windows XP (32 bit OS).

Doug
By Trent L. Taylor - 6/18/2009

Really....I have never seen it happen on a 32-bit machine....until now! Smile



Just for testing purposes, do you have another machine or laptop that you could load SF on to see if you have the same problem? You have been a user for a while so do you know what changed or when the problem started?
By Douglas Riley - 6/18/2009

Tried a new project on my laptop and everything works fine. This all started on my desktop yesterday evening. Only thing that changed on this PC was an installation of InstallAware Express 9 (on Monday). I had uninstalled it this morning before trying all of these options.
By Trent L. Taylor - 6/18/2009

You know what...come to think of it, that is when my problem started! I loaded InstallAware and it added a VS Addin and toolbar...and now that you mention it, that is when I started running into the issue.



I reloaded the extensibility about 20 times (and a number of other things) and gave up...the next day I came in and had forgotten about it, went into the BO Mapper, and it did not have any issue accessing the DTE2 object.



I did track down where it fails through all of this. We tie into the DTE using the IDTE2 interface which allows us to access the VS IDE environment, enumeration projects, solutions, etc. The DTE object itself would get created, however, the internal properties, such as the documents and projects, would show an access violation exception.



There is something within the environment and a very unique set of circumstances that causes this issue. I plan on changing how we get to the CodeDOM and DTE altogether when we rework the BO Mapper before long, but I would sure like to try and figure out what environmental piece is causing this.



I never uninstalled InstallAware as it never dawned on me that my problems started after I loaded that. Now that it is uninstalled, try reloading SF to see if anything gets put back into the GAC and add-in environment correctly.
By Douglas Riley - 6/18/2009

Ok. Do I need to touch the Strataframe database during reinstallation? Thanks!
By Trent L. Taylor - 6/18/2009

Oh, that really shouldn't be part of the formula. But go ahead and let it update the database for good measure.
By Douglas Riley - 6/18/2009

Uninstalled Strataframe completely (database included) and reinstalled. Received the same error in the BOM. I am out of ideas right now. I'll take any suggestions.
By Trent L. Taylor - 6/19/2009

Sorry for the delay in getting back with you. I actually missed this post. Blush



Please answer one question for me as it might give us a clue. You have been a user for a while, so what changed on this development machine between when things worked and when it stopped?



This is one of the most frustrating errors that I have seen as I have figured out what piece is failing, but Microsoft could not give me any straight answers (or to this point ... ANY answers). I was excited the other day because I could debug it and I thought I would be able to isolate the issue....but it went away and started working again!



So it is definitely environmental. Because something within my environment changed that allowed be to get to the DTE.



I had the same issue with a Macro that we had created in house. When you create a macro, it hands you the DTE object...so...you would think that VS would give you a valid instance to work with...but in my case it failed. I moved it over to the Add-In and it worked (makes no sense). I also had the issue with the BO Mapper shortly afterwards (the machine I am working on is a new development machine...thus the newness of the issue). But after debugging and changing some things...it started to work. I didn't change any drastic, just rebuilt the extensibility solution several times (maybe like 20).



I will see if I can reproduce again. But this definitely environmental and we have not yet figured out the root of the cause...sorry Sad I will see if I can get it to happen again on my side.
By Keith Chisarik - 6/19/2009

I had this and as I posted a reinstall fixed it, luckily. It was also after an install of the InstallAware trial. I didnt think it a factor at the time, but this post made the lightbulb go off and I figured you would like another data point.

Good luck with Microsoft, after 3 hours on the phone with them trying to troubleshoot a WDAC error on my machine, the fix was of course "reload your OS".

By Trent L. Taylor - 6/19/2009

LOL...yeah, I am not holding my breath! But I think this is starting to shed some light.



Edhy, if you read this post would you comment if this was after your IntsallAware install as well? Thanks!
By Edhy Rijo - 6/19/2009

Trent L. Taylor (06/19/2009)
Edhy, if you read this post would you comment if this was after your IntsallAware install as well? Thanks!


Hi Trent,



I honestly don't remember if I did something with IA at the time of getting this problem, but that may be the case since I also use IA and may have probably install an update which at any case will simple remove the current installation and install the new one BigGrin



In my case re-installing the .Net 2.0 fixed the problem, don't know if IA could mess with that, but at least now we all have another factor in this case "InstallAware". Probably you could setup a VPC and play with this installing IA.



FYI, my version of IA is: 8.01 (Build Ame - Rej.RTM, 110408).
By Trent L. Taylor - 6/19/2009

Thanks for the update, Edhy! Smile
By Douglas Riley - 6/19/2009

Trent,

Sorry I am just getting back to you. I ended up doing a repair of Visual Studio 2008 (praying I did not have to reformat the machine!). I reinstalled everything (Strataframe and Infragistics NetAdvantage 2009) except InstallAware. Went back to my project, opened the BOM and everything worked!



Now I am a little gun shy about installing InstallAware 9 back on this machine unless I can exclude that VS add-in option (or get a separate machine to create IA packages...ugh!). I may just try installing IA to see if I can recreate the error (now that I know what is needed to get back to Kansas :w00tSmile.



Doug
By Edhy Rijo - 6/19/2009

Douglas Riley (06/19/2009)
... I may just try installing IA to see if I can recreate the error (now that I know what is needed to get back to Kansas :w00tSmile.




Hi Doug,



In your case, if you have the time I may do just that, install IA and do the following:

1 - Test the BOM

2 - Reboot the computer

3 - Test again the BOM



That may give us a better clue. FYI, I am using IA in the same working computer with VS and SF.
By Trent L. Taylor - 6/19/2009

ow that I know what is needed to get back to Kansas




LOL...I am glad that you mentioned the InstallAware piece. I had been scratching my head profusely (and slapping myself in the face ever now and then) up until that point! I knew that there had to be some common denominator here.



On a good note, I am actually running, with success, at this point with all installed. So it is possible, just painful BigGrin
By Edhy Rijo - 4/25/2010

Updated...

After installing VS2010 in Windows 7 x64, I installed InstallAware 8.1 and again the BOM stop working with the same errors explained here.

I had to reinstall the .Net 2.0 "en_net_framework_sdk_20_x64.exe" and that fixed the problem with the BOM.

By Dustin Taylor - 4/28/2010

Yeah, I've taken to unchecking the "Visual Studio Add-In" component of InstallAware to avoid any potential issues here. We still haven't gotten official confirmation/denial that would confirm InstallAware as the culprit of these issues, but it follows suit with the experience of most here, as well as Trent and myself. 
By Larry Caylor - 2/27/2012

I thought I'd post my experience with installing InstallAware 2012 on Windows 7 64-bit and VS2010 in case someone else runs into the same issue. After completing the install I received the memory read errors described earlier in this thread when running BO mapper. Running the .Net 2.0 SDK setup program in repair mode fixed the problem. What ever caused this issue in earlier releases of InstallAware is still with us in the latest version.
By Ivan George Borges - 2/27/2012

Thanks for sharing, Larry.