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

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

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 17 Apr 2012, 02:44 PM

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)
        {
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Yordan Dikov
Telerik team
answered on 20 Apr 2012, 12:58 PM
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 >>

Tags
General Discussions
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Yordan Dikov
Telerik team
Share this question
or