.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unload Crash

4 REPLIES 4
Reply
Message 1 of 5
Hikeeba!
313 Views, 4 Replies

Unload Crash

I am developing a simple .NET plugin and every time I exit AutoCAD it crashes. This only happens when my plugin is loaded.

I believe I need to do some cleanup during exit but I'm not sure what. The only things I am accessing are AcadApplication, AcadDocument, and XRef blocks. I have about 4 commands defined as well.

Thanks.
4 REPLIES 4
Message 2 of 5
cgay
in reply to: Hikeeba!

It will be difficult to help if we cannot see some source code.

C
Message 3 of 5
Hikeeba!
in reply to: Hikeeba!

OK. Here is my code for creating a menu. Even if I execute none of the commands it crashes on exit.

AcadApplication autocad = Helpers.GetACAD();
foreach(AcadMenuGroup grp in autocad.MenuGroups)
{
if(grp.Name == "ACAD")
{
AcadPopupMenu menu = grp.Menus.Add("&TRIM");
menu.AddMenuItem(0, "&Store", "_STOREIT ");
menu.AddMenuItem(1, "&Retrieve", "_RETRIEVE ");
grp.Menus.InsertMenuInMenuBar("&TRIM", 10);
}
}
Message 4 of 5
cgay
in reply to: Hikeeba!

What version of AutoCAD are you using?
What version of Visual Studio are you using?
What versions of the .NET framework are loaded on your machine?
Is there an error associated with the crash?
If so, what is the error?
Have you checked the EventViewer for an error message?
Have you checked the output window in Visual Studio to see if there is some indication as to the error?
What does Helpers.GetACAD function actually do?
Do you have all appropriate references added?
Are you implementing the IExtensionApplication interface?
What is you debugging configuration?
How is the dll loaded into AutoCAD?(Netload,Script,Registry,LISP,Another Plugin)?


It would be easier to help if we could duplicate this problem, but I just don't have enough info.
You best bet for help is to ZIP up your project and post it here. At least we would be able to point you in the right direction.

C
Message 5 of 5
Hikeeba!
in reply to: Hikeeba!

I will try to post the code soon, but I can anwswer your questions.

AutoCAD 2005

Visual Studio.NET 2003

Event Viewer error: Faulting application acad.exe, version 22.1.63.0, faulting module mscorwks.dll, version 1.1.4322.2032, fault address 0x00071bd8.

The same error appears in a dialog box when AutoCAD exits.

The GetACAD function just returns (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;

I am implementing the IExtensionApplication interface. My custom commands run fine as does loading the DLL.

Are there references tthat I need that don't prevent me from compiling?

I am not doing any debugging as I've had trouble getting VS to connect to the process.

I am loading the DLL with "netload" from within AutoCAD.

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost