Error "NullReference Exception" in Telerik.JustDecompiler.Languages.CSharp.CSharpWriter.ToTypeString(TypeReference type)

2 posts, 1 answers
  1. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 17 Apr 2012 Link to this post

    Hi,

    on one of our Usercontrols JustDecompile fails with a NullReference exception.

    Current member / type: Bdl.DialogCrm.Silverlight.UserControls.CallCenterLayoutMainControl

    Product version: 2012.1.409.0
    Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
    bei Telerik.JustDecompiler.Languages.CSharp.CSharpWriter.ToTypeString(TypeReference type)
    bei Telerik.JustDecompiler.Languages.AttributeWriter.ƒ(CustomAttributeArgument argument)
    bei Telerik.JustDecompiler.Languages.AttributeWriter.(TypeDefinition attributeType, Collection`1 namedArguments, Boolean fields, Boolean wroteArgument)
    bei Telerik.JustDecompiler.Languages.AttributeWriter.WriteAttribute(CustomAttribute attribute)
    bei Telerik.JustDecompiler.Languages.AttributeWriter.WriteMemberAttributesAndNewLine(IMemberDefinition member)
    bei Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.WriteAttributes(IMemberDefinition member)
    bei Telerik.JustDecompiler.Languages.BaseImperativeLanguageWriter.WriteAttributesWithLock(IMemberDefinition member)
    bei Telerik.JustDecompiler.Languages.BaseLanguageWriter.Write(IMemberDefinition member, Boolean showCompilerGeneratedMembers)
    bei JustDecompile.CodeViewer.CodeWriter.Write() in c:\Builds\126\Behemoth\NoPlugins - JustDecompile Production build\Sources\UI\JustDecompile.CodeViewer\Writers\CodeWriter.cs:Zeile 31.

    bei JustDecompile.CodeViewer.ViewModels.CodeViewerViewModel.(AssemblyMemberNode member, CancellationToken cancellationToken) in c:\Builds\126\Behemoth\NoPlugins - JustDecompile Production build\Sources\UI\JustDecompile.CodeViewer\ViewModels\CodeViewerViewModel.cs:Zeile 171.

    Here is the code: (it is a usercontrol)

    namespace Bdl.DialogCrm.Silverlight.UserControls
    {
        using System.ComponentModel;
        using System.Windows;
        using Bdl.DialogCrm.Silverlight.Core.InverseOfControl;
        using Bdl.DialogCrm.Silverlight.Core.ViewManagement;
        using Bdl.DialogCrm.Silverlight.Core.ViewManagement.Bases;
        using Bdl.DialogCrm.Silverlight.ViewModels.Interfaces;
        using Microsoft.Practices.Unity;
      
        /// <summary>
        /// LayoutMain Control
        /// </summary>
        [ViewDescription("CallCenterLayoutMainControl", "CallCenter LayoutDesigner", typeof(CallCenterLayoutMainControl), InputViewModelType = null, ExposedViewModelType = typeof(ICurrentGeschaeftspartnerViewModel), Selectable = false, ResolvesViewModel = true, IsMainView = true)]
        public partial class CallCenterLayoutMainControl : AttachableUserControl
        {
            /// <summary>
            /// das InputView Model
            /// </summary>
            private object inputViewModel = null;
      
            private ICurrentGeschaeftspartnerViewModel currentGeschaeftspartnerViewModel = null;
      
            /// <summary>
            /// Initializes a new instance of the <see cref="CallCenterLayoutMainControl" /> class.
            /// </summary>
            public CallCenterLayoutMainControl()
            {
                InitializeComponent();
      
                this.Loaded += new RoutedEventHandler(this.CallCenterLayoutMainControl_Loaded);
                this.Unloaded += new RoutedEventHandler(this.CallCenterLayoutMainControl_Unloaded);
      
                if (!DesignerProperties.IsInDesignTool)
                {
                    this.currentGeschaeftspartnerViewModel = DependencyContainer.Container.Resolve<ICurrentGeschaeftspartnerViewModel>();
                    this.currentGeschaeftspartnerViewModel.Title = "CallCenter LayoutDesigner";
                    this.DataContext = this.currentGeschaeftspartnerViewModel;
                }
      
                this.LayoutMainControl.DesignPane.Visibility = Visibility.Visible;
            }
      
            /// <summary>
            /// Gets or sets das Input ViewModel
            /// </summary>
            public override object InputViewModel
            {
                get
                {
                    return this.inputViewModel;
                }
      
                set
                {
                    this.inputViewModel = value;
                }
            }
      
            /// <summary>
            /// Gets das bereitgestellte ViewModel
            /// </summary>
            public override object ExposedViewModel
            {
                get { return this.DataContext; }
            }
      
            /// <summary>
            /// Verwirft das aktuelle Control
            /// </summary>
            public override void Dispose()
            {
                base.Dispose();
      
                this.currentGeschaeftspartnerViewModel = null;
            }
      
            /// <summary>
            /// Behandelt das Loaded-Event der Maske
            /// </summary>
            /// <param name="sender">Auslöser des Events</param>
            /// <param name="e">Argumente des Events</param>
            private void CallCenterLayoutMainControl_Loaded(object sender, RoutedEventArgs e)
            {
            }
      
            /// <summary>
            /// Behandelt das UnLoaded-Event der Maske
            /// </summary>
            /// <param name="sender">Auslöser des Events</param>
            /// <param name="e">Argumente des Events</param>
            private void CallCenterLayoutMainControl_Unloaded(object sender, RoutedEventArgs e)
            {
            }
        }
    }

  2. Answer
    Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 20 Apr 2012 Link to this post

    Hi Matthias,

    Thank you for contacting us. We are aware of this issue and we have it logged. Stay tuned for updates and don't hesitate to contact us if you find anything else that bothers you in JustDecompile.

    Regards,
    Yordan Dikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top