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

3 posts, 0 answers
  1. Jodie
    Jodie avatar
    3 posts
    Member since:
    Mar 2013

    Posted 08 Aug 2014 Link to this post

    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. Jodie
    Jodie avatar
    3 posts
    Member since:
    Mar 2013

    Posted 08 Aug 2014 Link to this post

    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.
  3. DevCraft banner
  4. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 12 Aug 2014 Link to this post

    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.
     
Back to Top