Jump to content

CallbackOnCollectedDelegate was detected (AutoCad Mechanical 2009 and .net api)


Proctor

Recommended Posts

Hello: I have a window application created using visual studio 2005 and .net api.

It's all been working great...till I came in this morning and got the following error

that occures when trying to call a custom command. This command has been working for a very long time and nothing has changed in it.

 

Here's the bug:

CallbackOnCollectedDelegate was detected

Message: A callback was made on a garbage collected delegate of type 'acmgd!Autodesk.AutoCAD.Runtime.CommandClass+CommandThunk+CommandInvokeHandler::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.

 

I tried to turning off callbackonCollectedDelegate. I went to debug>exceptions and I unchecked callbackonCollectedDelegate. After, I now get this error:

Unhandled e0434f4dh Exception @ 7c812afbh.

 

Any help is truly appreciated.

Thanks,

Rene

Link to comment
Share on other sites

I resolved this issue. Fortunatly, when i was logging into the application, I noticed this message in the command prompt:

 

Cannot load assembly. Error details: Autodesk.AutoCAD.Runtime.Exception:

eDuplicateKey

 

I googled this error and it said it occurs when mulitple same commands exist. I looked over my code and sure enough, I had a custom command that was in twice by accident. Removing this resolved the issue.

 

thanks,

Proctor

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...