This is a migrated thread and some comments may be shown as answers.

OrgDiagram throws 'Object reference not set to an instance of an object' error

2 Answers 41 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jodie
Top achievements
Rank 1
Jodie asked on 08 Aug 2014, 01:04 PM
Hello,
Recently the company upgraded the Telerik Silveright UI. And I realized our customized OrgDiagram was broken and threw the 'Object reference not set to an instance of an object' error in the xaml file.
So basically our OrgDiagram was a modified version of the OrgChart presented in Silverlight Demos http://demos.telerik.com/silverlight/#Diagrams/OrgChart, it uses a similar OrgCharViewModel.cs and declare in the xaml file as follow,

<UserControl.Resources>
    <local:OrgChartViewModel x:Key="ViewModel" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="Transparent" DataContext="{StaticResource ViewModel}">
    ...
</Grid>

And it throws the exception at  <local:OrgChartViewModel x:Key="ViewModel" />. Meanwhile, in the other xaml file that uses the OrgDiagram as User Control throws a 'Catastrophic Failure (Exception from HRESULT: 0x8000FFFF(E_UNEXPECTED)), the invocation of the constructor on type that matches the specified binding threw an exception'.
I believe the OrgDiagram was working fine for a long time and I think the error occurs after we upgraded the Telerik UI.

So Why would it happen and how to resolve the issue?

Please let me know if you need any other info. for this issue.

Thank you for your assistance.

2 Answers, 1 is accepted

Sort by
0
Jodie
Top achievements
Rank 1
answered on 08 Aug 2014, 01:07 PM
Just a side note, it looks like it is the same error described in http://www.telerik.com/forums/orgchart-demo-won't-build-locally except it was working fine.
0
Martin Ivanov
Telerik team
answered on 12 Aug 2014, 01:48 PM
Hello Jodie,

Can you provide me with an isolated project that demonstrates the reported exceptions? This will allow me to test it locally and investigate what is causing the issue. In addition I prepared a sample project with the code from the OrgChart example. Can you give it a try and let me know if I am missing something?

As for the Catastrophic Failure exception, you can try to manually delete the "bin" and "obj" folders of your solution and then Clean and Rebuild it.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Diagram
Asked by
Jodie
Top achievements
Rank 1
Answers by
Jodie
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or