Skip to content

Stackoverflow exception with Devexpress.Xpo #1882

Description

@DaBeSoft

Please do the checklist before filing an issue:

  • I have read the documentation, including the FAQ
  • I can reproduce the bug using the latest prerelease version
  • I have searched existing discussion and issue to avoid duplicates

Describe the bug

Existing target object mapping of an object that inherits from Devexpress.Xpo Base Objects crashes Visual Studio. The following errors pop up, Visual Studio gets unresponsive and finally closes it self.

Image

The attached Repository immediately crashes Visual Studio on opening.
Everything starts fine if the Map Method in Mapper.cs is commented out.

Excerpt from Visual Studios ActivityLog.xml:

Feature "Solution Events" is currently unavailable due to an internal error. Exit code -1073741571 StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled.    at System.Threading.CancellationToken.ThrowOperationCanceledException()    at async StreamJsonRpc.MessageHandlerBase.WriteAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.SendAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    --- End of inner exception stack trace ---    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult](<Unknown Parameters>)
Feature "Asset synchronization" is currently unavailable due to an internal error. Exit code -1073741571 StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled.    at System.Threading.CancellationToken.ThrowOperationCanceledException()    at async StreamJsonRpc.MessageHandlerBase.WriteAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.SendAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    --- End of inner exception stack trace ---    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)
Feature "Keep alive service" is currently unavailable due to an internal error. Exit code -1073741571 StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)
Feature "Source generation" is currently unavailable due to an internal error. Exit code -1073741571 StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult](<Unknown Parameters>)
Feature "Symbol search" is currently unavailable due to an internal error. Exit code -1073741571 StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)

Repro
Link to reproduction Solution

Declaration code

BusinessObject.cs:

using DevExpress.Xpo;

namespace MapperlyCrashReproduction;

public class BusinessObject : XPBaseObject
{
    public BusinessObject(Session session) : base(session)
    {
    }

    private string _stringValue;

    public string StringValue
    {
        get => _stringValue;
        set => SetPropertyValue(nameof(StringValue), ref _stringValue, value);
    }

    private int _intValue;

    public int IntValue
    {
        get => _intValue;
        set => SetPropertyValue(nameof(IntValue), ref _intValue, value);
    }
}

Mapper.cs:

using Riok.Mapperly.Abstractions;

namespace MapperlyCrashReproduction;

[Mapper]
internal static partial class Mapper
{
    internal static partial void Map(BusinessObject from, BusinessObject to);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions