Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEC 4.2.2 Error #731

Open
ismkdc opened this issue Oct 14, 2024 · 2 comments
Open

FEC 4.2.2 Error #731

ismkdc opened this issue Oct 14, 2024 · 2 comments

Comments

@ismkdc
Copy link

ismkdc commented Oct 14, 2024

I upgraded fec 4.2.2 (https://github.com/dadhi/FastExpressionCompiler/releases/tag/v4.2.2) and Compile throws exception.

config.NewConfig<SubscriptionReport, SubscriptionReportOutputDTO>()
            .Map(dest => dest.Email,
                src => src.User.Email)
            .Map(dest => dest.PackageName,
                src => src.PackageName)
            .Map(dest => dest.CreatedAt,
                src => src.CreatedAt)
            .Map(dest => dest.PaidAmount,
                src => src.PaidAmount)
            .Map(dest => dest.Action,
                src => src.Action);

config.Compiler = exp => exp.CompileFast();
===>>>(this line) config.Compile();
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at FastExpressionCompiler.ExpressionCompiler.NestedLambdaInfo.GetLambdaType() in /_/src/FastExpressionCompiler/FastExpressionCompiler.cs:line 592
   at FastExpressionCompiler.ExpressionCompiler.EmittingVisitor.EmitLoadConstantsAndNestedLambdasIntoVars(ILGenerator il, ClosureInfo& closure) in /_/src/FastExpressionCompiler/FastExpressionCompiler.cs:line 3436
   at FastExpressionCompiler.ExpressionCompiler.TryCompileBoundToFirstClosureParam(Type delegateType, Expression bodyExpr, IReadOnlyList`1 paramExprs, Type[] closurePlusParamTypes, Type returnType, CompilerFlags flags) in /_/src/FastExpressionCompiler/FastExpressionCompiler.cs:line 503
   at FastExpressionCompiler.ExpressionCompiler.CompileFast(LambdaExpression lambdaExpr, Boolean ifFastFailedReturnNull, CompilerFlags flags) in /_/src/FastExpressionCompiler/FastExpressionCompiler.cs:line 163
   at ParadiseProject.Api.MappingConfiguration.<>c.<Generate>b__0_134(LambdaExpression exp) in /app/src/ParadiseProject.Api/MappingConfiguration.cs:line 232
   at Mapster.TypeAdapterConfig.Compile(Boolean failFast)
   at ParadiseProject.Api.MappingConfiguration.Generate() in /app/src/ParadiseProject.Api/MappingConfiguration.cs:line 233
   at Program.<>c__DisplayClass0_0.<<Main>$>g__ConfigureMapper|1() in /app/src/ParadiseProject.Api/Program.cs:line 88
   at Program.<Main>$(String[] args) in /app/src/ParadiseProject.Api/Program.cs:line 34
   at Program.<Main>(String[] args)
Aborted (core dumped)
@ismkdc
Copy link
Author

ismkdc commented Nov 26, 2024

Same error with fec 5.0.0

@ismkdc
Copy link
Author

ismkdc commented Dec 24, 2024

Same error with fec 5.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant