Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mogra69 on November 07, 2006, 11:11:41 am

Title: EA Exceptions and Crashes due to Automation
Post by: mogra69 on November 07, 2006, 11:11:41 am
Hello EA Add-In Developers,

I am in the midst of developing an EA Add-In. From time to time I see EA exceptions and crashes when the Add-In is active. The exception often lacks detail that points to the cause.

I would like to compile a list of things that you have done in the Add-In that caused unexpected crashes or exceptions in EA.

Please respond to this thread with your experiences.

Also, please share any thoughts and ideas for making raising the quality and robustness of the Add-In.

Thanks.
Title: Re: EA Exceptions and Crashes due to Automation
Post by: mogra69 on November 07, 2006, 11:15:52 am

I need to lock the some model elements. I do this by setting element.Locked to true.

Without unlocking if start to modify the locked element properties I get an exception. This does make sense but it was not obvious when I first ran into it.
Title: Re: EA Exceptions and Crashes due to Automation
Post by: MattAdamson on November 07, 2006, 09:44:43 pm
If your developing in Visual Studio .NET be sure to enabled the debugger features to break on either specific types or ALL exceptions when they occur.

This will cause the debugger to break at the line of code cause the exception. Obviously only useful when it's your code causing the exception and not deep within the EA code whicih will provide you with a call stack in the assembly code.