+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Senior Member
    Using
    AutoCAD 2006
    Join Date
    Jan 2008
    Posts
    286

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

    Registered forum members do not see this ad.

    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+Comma ndThunk+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

  2. #2
    Senior Member
    Using
    AutoCAD 2006
    Join Date
    Jan 2008
    Posts
    286

    Default

    Registered forum members do not see this ad.

    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

Similar Threads

  1. Copy and Paste issue on AutoCAD Mechanical 2009
    By Zioncsc in forum Mechanical
    Replies: 6
    Last Post: 1st Mar 2011, 01:41 pm
  2. rendering 3D models in autocad mechanical 2009
    By kenickie in forum AutoCAD 3D Modelling & Rendering
    Replies: 4
    Last Post: 10th Nov 2009, 03:41 am
  3. AutoCad Mechanical 2009 - suddenly menu bar is gone
    By Proctor in forum AutoCAD Beginners' Area
    Replies: 14
    Last Post: 27th Jan 2009, 12:28 am
  4. AutoCad Mechanical 2009 - New Layer issue
    By Proctor in forum AutoCAD General
    Replies: 4
    Last Post: 8th Jan 2009, 08:24 pm
  5. Replies: 3
    Last Post: 10th Jul 2008, 11:35 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts