NullReferenceException: cannot create an L-value from the given expression with property 'size' because the target object is null

activities
terminal
variable

#1

Originally we had some problems during a terminal connection (UiPath internal, TN3270): we lost connection during the workflow due to the terminal screen size. In order to change the size of the terminal screen, we changed the worflow based on the solution proposed in this topic:Terminal Session - change screen size.

The problem is now: we receive the NullReferenceException which indicates ‘size’ is the problem, but I don’t see why.
I added my worflow in attachment.

If someone could help us with this issue, we would be very grateful!Main.xaml (19.6 KB)

We use the professional version of Uipath Studio.

Kr,


Terminal Session - change screen size
#2

Hey just delete the value from out variable and pass it again it will solve your problem.


#3

The problem is that “screenData” variable is not initialized when you try to assign to screenData.Size a value.
To fix it, when you declare the screenData variable, use the Default field to initialize it: “new ScreenData”.
See updated file Main.xaml (20.1 KB)