Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - 2ben7

Pages: [1]
1
Hi,

i get following exception(in Debug Mode of Visual Studio2010 c# plugin)
by closing EA9.3:

An exception was caught but handled while releasing a COM interface pointer through Marshal.Release or Marshal.ReleaseComObject or implicitly after the corresponding RuntimeCallableWrapper was garbage collected. This is the result of a user refcount error or other problem with a COM object's Release. Make sure refcounts are managed properly.  The COM interface pointer's original vtable pointer was 0x1766ef8. While these types of exceptions are caught by the CLR, they can still lead to corruption and data loss so if possible the issue causing the exception should be addressed

I thought this code may be the problem:

public void EA_Disconnect()
{
            GC.Collect();
            GC.WaitForPendingFinalizers();
}

I also tried to comment out both GC-calls. Same error.

Whats the problem ?
I don`t want to just disable some MDA-Assistent checkboxes, to get away the error !!!

interesting
I just tested it with EA7.1 -> no exception
                             EA9.3 -> exception
No code changes done. Anything im not allowed to do in EA9.3 on quiting ?

2
Hallo,

i can need your help again. Would appreciate it.

What i have to do, to recognize a deleted element from the Repository ?
Im using EA_OnPreDeleteElement. But as the docu says, the event raises BEFORE it gets deleted from the Repository.

At the moment, i react for my plugin in this method. But if i do a SQL Query at the actual Repository(from the argument parameter list of the method), it is not always
secure, that the Element is still deleted from the repository.

How can i prevent this run condition ?
Also there is no EA_OnPostDeleteElement -EventMethod :(

3
Hi,

this event works if Diagram is not still open. But how to i recognize a switching between different still opened diagrams ? I can`t find a suitable event.

thx
 ben

Pages: [1]