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

AutoCAD crashes when Telerik controls are used

6 REPLIES 6
Reply
Message 1 of 7
calvindale
712 Views, 6 Replies

AutoCAD crashes when Telerik controls are used

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.

Tags (1)
6 REPLIES 6
Message 2 of 7
calvindale
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!

Message 3 of 7
Ed.Jobe
in reply to: calvindale

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

Ed

EESignature

Message 4 of 7
calvindale
in reply to: Ed.Jobe

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.

 

 

Message 5 of 7
Ed.Jobe
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?

Ed

EESignature

Message 6 of 7
calvindale
in reply to: Ed.Jobe

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.

Message 7 of 7
Ed.Jobe
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.

Ed

EESignature

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