NullReferenceException at Cassandra.Data.Linq.CqlExpressionVisitor.GetPropertyValue(MemberExpression node)

Description

I updated library from 3.0.0 version to 3.10.0. I received this exception after updating:

I get this exception when cql command contains code like this:

This expression I set as a update expression in CqlQuery.Select().

When I use code like this:

everythink is ok.

I found question like this on SO and related issue in this project.

It is expected behaviour or not? It is a bug?

Environment

OS Name : Microsoft Windows Server 2016 Standard
OS Version : 10.0.14393 N/A Build 14393
OS Manufacturer : Microsoft Corporation
OS Configuration : Member Server
OS Build Type : Multiprocessor Free
System Boot Time : 6/7/2019, 10:22:35 AM
System Manufacturer : Microsoft Corporation
System Model : Virtual Machine
System Type : x64-based PC
System Directory : C:\Windows\system32
System Locale : en-us;English (United States)
Hotfix(s) : 13 Hotfix(s) Installed.,[01]: KB3186568,[02]: KB3192137,[03]: KB4013418,[04]: KB4023834,[05]:
KB4033393,[06]: KB4035631,[07]: KB4049065,[08]: KB4054590,[09]: KB4091664,[10]: KB4132216,[11]:
KB4465659,[12]: KB4485447,[13]: KB4493470

.NET Framework Version: 4.7.2

Activity

Show:
Артур Шайхутдинов
June 14, 2019, 12:17 AM

Project contains method:

It has been used

and this Update method we use like this:

SessionEntity is:

Joao Reis
June 14, 2019, 12:18 AM

Ok I was just able to reproduce the bug now, thanks for the bug report and I hope to post some news here soon.

Joao Reis
June 14, 2019, 12:36 AM
Edited

In any case you're correct that the workaround for these "problematic" property values is to set a local variable beforehand.

Joao Reis
June 14, 2019, 12:45 AM

From my local tests it seems that this bug occurs with static properties. As there is a simple workaround for it, this bug fix will not be included in the next patch release (3.10.1) that is currently under testing but it will be included in one of the next minor releases.

Again, thanks for the bug report!

Артур Шайхутдинов
June 14, 2019, 2:19 PM

Thanks for the fast reaction on issue!

Fixed

Assignee

Unassigned

Reporter

Артур Шайхутдинов

Labels

Reproduced in

3.10.0

PM Priority

None

Fix versions

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

C# P-NEXT

Pull Requests

None

Size

None

Time tracking

0m

Time remaining

1h

Affects versions

Priority

Major