.NET

.NET

Reply
Active Contributor
calvindale
Posts: 33
Registered: ‎03-11-2010
Message 1 of 7 (277 Views)

AutoCAD crashes when Telerik controls are used

277 Views, 6 Replies
06-25-2012 09:33 AM

Greetings, AutoCAD crashes when I do the following:

 

File | New Project | WPF User Control Library

 

Drag a Telerik RadWatermarkTextBox onto a Window design surface.

 

Build the project | Netload the assembly | Run a command that attempts to open the Window.

 

If I comment out the XAML for the RadWatermarkTextBox, the window will open without crashing AutoCAD.

 

Also, I can programmatically created the RadWatermarkTextBox in code and add it as a child of the Window's grid.  If I run in debug mode, the window will open and AutoCAD doesn't crash.  But AutoCAD does crash if the code isn't run in debug mode.  And it crashes either in either debug or non-debug mode for the XAML.

 

Any ideas?  THANKS!

 

dmpuserinfo.xml contains the following stack dump:

 

<AppCDATA><![CDATA[Command: OD;Netload;Commandline;Ribbon
Clr Data:
at acadUnhandledExceptionFilter(_EXCEPTION_POINTERS* )
at acadUnhandledExceptionFilter(_EXCEPTION_POINTERS* )
at Autodesk.AutoCAD.Runtime.UnhandledExceptionFilter.Filter(_EXCEPTION_POINTERS* ep)
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ConMetAutoCadLibrary.Window1.InitializeComponent() in c:\VS\AutoCAD\Code\Dev\AutoCadLibrary\ConMetAutoCadLibrary\Window1.xaml:line 1
at ConMetAutoCadLibrary.Window1..ctor() in C:\VS\AutoCAD\Code\Dev\AutoCadLibrary\ConMetAutoCadLibrary\Window1.xaml.cs:line 20
at AutoCadLibrary.ScratchPad.OpenDrawing() in C:\VS\AutoCAD\Code\Dev\AutoCadLibrary\ConMetAutoCadLibrary\ScratchPad.cs:line 34
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.PerDocumentCommandClass.Invoke(MethodInfo mi, Boolean bLispFunction)
at Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()
]]></AppCDATA>

 

Running AutoCAD 2011 SP1.  I also see the same behavior when using a Telerik RadGridView.

 

Again, thanks for the help.

Active Contributor
calvindale
Posts: 33
Registered: ‎03-11-2010
Message 2 of 7 (242 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 10:54 AM in reply to: calvindale

This issue can be addressed by copying the Telerik DLLs into the directory where the main executable (acad.exe) is located.  But that approach is not especially elegant or development friendly.  Does anyone know of a better way?

 

Thanks!

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 3 of 7 (234 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 01:09 PM in reply to: calvindale

What if you added the Telerik path to the Reference Paths tab of your project properties?

Active Contributor
calvindale
Posts: 33
Registered: ‎03-11-2010
Message 4 of 7 (229 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 01:32 PM in reply to: eljobe

Thanks for the idea,

 

Unfortunately, I get the following error after adding the reference paths (and removing the Telerik DLLs from the acad.exe directory).

 

Initialization of 'Telerik.Windows.Controls.GridViewDataColumn' threw an exception.

 

 

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 5 of 7 (224 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 01:40 PM in reply to: calvindale

I've never used those controls. At what point do you get the error? Do you get the error with other projects? Maybe you shoud contact Telerik?

Active Contributor
calvindale
Posts: 33
Registered: ‎03-11-2010
Message 6 of 7 (218 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 02:15 PM in reply to: eljobe

Telerik indicated that they hadn't tested their controls with AutoCAD.  I have never previously used the Reference Paths tab of the C# project properties.  But after a brief persual of this topic on MSDN, I gather that I shouldn't need to explicitly refer to the paths since I'm referencing them with Copy Local set to true.

 

The error message appears when I attempt to execute a command that displays a dialog form containing the Telerik control.

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 7 of 7 (216 Views)

Re: AutoCAD crashes when Telerik controls are used

06-26-2012 02:23 PM in reply to: calvindale

I was just going of the fact that you said changing the path fixed it.

 

Try a test. Can you create a form that doesn't rely on acad, then change your project type to an exe and set the form as the startup object. That should tell you if the controls will initialize at all.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.