System.AccessViolationException

Hi Everyone

This is not the first Add-In that I've written however seems to be the most frustrating one. Im using VS 2008 with VB.

I have a few functions that create RefPlanes and a few functions and subs that carry out split and move/copy Body operations.

Each individual function/sub on its own runs smooth with no problem.

I then have a sub that run these functions/subs in order and, passes the returned values to the next function.

When I run this sub maybe a couple of times,randomly  out of the blue I could end up getting a system.AccessViolationException or a new message which says "Application Identity is not known... Invalid deployment..." which seems to be related to ClickOnce. ClickOnce is greyed out in my add-in properties and cannot even be enable!!!!

This sub normally runs once or twice before it gives me the error but sometimes even running for the first time.

I checked the Application Log Files  after the crashes and can see that I have a few .NET runtime Fatal execution engine error, some solidworks ntdll.dll faults which I think are caused by the .NET errors.

Does anyone have a clue cause I'm about to jump out the window.

Cheers

Ali

 

SolidworksApi macros