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.
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:
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.
Happy new year everybody !
Hi, JNewell. Thanks for you time!
Yes, I wrote an SE Add In using .NET.
Answering your questions:
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 !
Rio de Janeiro - Brazil