Bug Report T500747
Visible to All Users

Code Providers - DeclareProvider throws an exception in VB

created 8 years ago

[DevExpress Support Team: CLONED FROM T497988: DeclareProvider throws null reference exception]
Hi,
I am so sorry, but started getting this error again with CR for Roslyn v16.2.7

Here is the exception.

Visual Basic
System.NullReferenceException : Object reference not set to an instance of an object. at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.GetExpressionTypeSyntax(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.ArgumentToParameter(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.GetParameterListFromArguments(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.GetParametersFromArguments(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.MethodDeclarator.RegisterForMethodReference(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.MethodDeclarator.RegisterNodeDeclarations(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.MemberDeclarator.GetNodeReplacements(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.Execute(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.DeclareMemberRefactoring.Execute(<Unknown Parameters>) at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.DeclareRefactoring.ApplyChangeManager(<Unknown Parameters>) at async DevExpress.CodeAnalysis.TargetPicker.TargetPickerRegistrator.DoRegistration(<Unknown Parameters>) at async DevExpress.CodeAnalysis.TargetPicker.TargetPickerRefactoringProvider.DoRefactoringRegistration(<Unknown Parameters>) at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RegisterRefactoring(<Unknown Parameters>) at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>) at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
Comments (3)
DevExpress Support Team 8 years ago

    Hi Edhy,

    Thank you for contacting us and sending the call stack.
    We can add an additional check to prevent NullReferenceException, but it is better to find a scenario when the exception happens and make more intelligent correction.
    Would you please provide the code example where the exception is raised? It would be of great help if you prepare a simple test project illustrating the problem.

      Hi Eugene,
      I don't get the error as frequent as before so it may take some time until I can post more details.

      DevExpress Support Team 8 years ago

        Hi Edhy,

        We will add an additional check now and let you know when changes are ready.
        We kindly ask you to provide as more exact steps as possible to use if you face this exception again. A simple code sample would be also really helpful.

        Answers approved by DevExpress Support

        created 8 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.