AutoCAD Crashes when attempting to view object properties in the debugger.

AutoCAD Crashes when attempting to view object properties in the debugger.

bakerrWZ69Z
Contributor Contributor
433 Views
1 Reply
Message 1 of 2

AutoCAD Crashes when attempting to view object properties in the debugger.

bakerrWZ69Z
Contributor
Contributor

I haven't written a lot of .NET (C#) programs for AutoCAD yet so I don't know if my compiler settings are wrong or not.  Basically I have registered an Event to monitor when certain objects in the drawing are modified.  Recently when I have tried to examine the properties of the objects using the Visual Studio 2019 debugger I see runtime exceptions listed for some of the properties.  Depending on the object properties the act of trying to view the properties will actually crash AutoCAD without any error messages.  Is this normal or are my compiler or debugger settings wrong?  Did I forget to reference some AutoCAD file?


Note: This Mtext entity was created by AutoCAD without any other plug-ins other than my program active at the time.

bakerrWZ69Z_0-1715613654837.png
For example, under certain conditions if I try to examine the properties of a MText entity I get the following error message and once I respond to the error message AutoCAD disappear.  I tried to following the suggestion in the error message but after I turn off the setting I can't see any property information for the variable.

bakerrWZ69Z_1-1715613979112.png

Note: My program is referencing the following AutoCAD files from the AutoCAD 2021 directory.

bakerrWZ69Z_0-1715614583899.png

 

 

0 Likes
434 Views
1 Reply
Reply (1)
Message 2 of 2

bakerrWZ69Z
Contributor
Contributor

Additional Information.  Using the EventWatcher program that comes with the AutoCAD 2021 SDK (ObjectArx 2021) I was able to confirm that the problem I reported above has nothing to do with my program.  I was able to reproduce both problems listed above using the callback_ObjectModified function in the EventWatcher program.

Note: The second problem occurs when I use a third-party program that creates a series of MText entities in the drawing.  Since the first problem shows the results of using AutoCAD to create the MText entity I am not sure the third-party program is causing the problem.

So at this point based on the debugger results I am inclined to believe AutoCAD is not handling those properties correctly and causing problems with the debugger.  It appears that certain property values are not being initialized or set properly.

0 Likes