Showing results for 
Search instead for 
Did you mean: 

AccessViolationException & FatalExecutionEngineError

Valued Contributor
Valued Contributor



I'm new in SE development. I've been working on a Add-in for tree months and I frequently have problems with these two kinds of errors that seem to happen especially when I execute my application repeatedly, but not only.


Does anybody have any special advice, tip, best practice that can avoid them? I'm not felling confident to put my application into production since I don't know when this might happen.


Re: AccessViolationException & FatalExecutionEngineError

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

For clarification, I assume you've written a Solid Edge AddIn using .NET? I'm a bit thrown off when you say "I execute my application repeatedly". That sounds like you have written a standalone .exe.


I have seen these types of errors back when .NET had first came out and we were all struggling trying to get .NET addins to work. Both .NET & Solid Edge have came a long way (gotten better) since then so I don't hear much about those types of errors these days.


Some questions we need answered:

  • What version of Solid Edge are you targeting?
  • What version of the .NET framework are you targeting?
  • Are the exceptions reproducible or random?
  • Have you spent time looking at the sample addins on CodePlex?
  • What is the functionality of your addin? i.e. What are you trying to accomplish?

My approach to resolving an issue like this is to start removing functionality from the addin until the exceptions stop. The goal is to isolate the issue.


There was a time when I wouldn't write a Solid Edge AddIn using .NET because there were so many issues like this but as of late, I've changed my stance because things have gotten better. AddIn development is not easy. I'll try to help you where I can.

Jason Newell
Applications Architect

Re: AccessViolationException & FatalExecutionEngineError

Valued Contributor
Valued Contributor

Happy new year everybody !


Hi, JNewell. Thanks for you time!


Yes, I wrote an SE Add In using .NET. 


Answering your questions:

  • ST5 / MP6 - 64bit
  • .NET Framework 4.5 / VS 2012
  • Reproducible
  • Not so much. I've just overviewed them. But I'll take a look at them careffuly soon.

I've got good news. I managed to resolve this issue, at least in my development machine it's working. Now I'm able to click in my Add In as many times as I want and have it work with no AVs.


I'm waiting to test it on a user machine to post it as a solution and I should do it until the end of the next week. It's related to disposing of objects and garbage collection. Not complex, but I prefer to test a litle bit more to be sure.


Well, the functionalitty of my Add In is to make aluminun panels that are used together for building houses just like cake pans. The user draws a rectangular sketch and the Add In creates a panel with it's height and width. The panels are formed by many diferent parts, created on time if they don't exist in a parts directory. If they already exist, I just use them.


I assemble the occurences placing their relationships and save the assembly file.


At this time I'm creating the panels isolated, one by one, so that designers don't need to do it manually. But in the future, the idea is to be able to create full stairs that are formed by many panels of diferent sizes and shapes. (Wow, it's a lot of work, for years maybe, but I believe it's possible!). I'll have to create the drafts as well.


I uploaded a video to show how it works.


Thanks a lot JNewell !


Marcio Lima

Systems Analyst

Rio de Janeiro - Brazil


(view in My Videos)