PropertyDescriptorCollection.find causing fatal crash

PropertyDescriptorCollection.find causing fatal crash

mdaycock
Explorer Explorer
218 Views
0 Replies
Message 1 of 1

PropertyDescriptorCollection.find causing fatal crash

mdaycock
Explorer
Explorer

We have a long-running process in 2019 that we need AutoCAD to report messages to the console window.  We are doing this by executing a Windows Forms DoEvents() to get AutoCAD to refresh the message in the console.  However, this will occasionally cause a fatal crash with an exception "object reference not set to the instance of an object" with this stack trace:

 

System.NullReferenceException: Object reference not set to an instance of an object.
at Autodesk.AutoCAD.Windows.Data.DynamicObjectBase.PropertyDescriptorCollection.Find(String name, Boolean ignoreCase)
at Autodesk.AutoCAD.Ribbon.LayerComboText.LayerComboText_Loaded(Object sender, RoutedEventArgs e)

Windows .NET messages ...

 

Is there a better way to get output messages while a process is running?  Any ideas why this wouldn't work?

0 Likes
219 Views
0 Replies
Replies (0)