I’ve encountered an issue after opening an old project in the new version of UiPath Studio. The project was originally created in an older version, and now I’m getting the following error when working with a Flow Decision:
UiPath Studio Version: 24.10.0-beta.17118
Error Message:
vbnet
Object reference not set to an instance of an object.
The problem seems to be with Flow Decisions. All the sequence connections in my flow are lost, and the flow decisions do not function correctly unless I delete and reinsert them. Even after doing that, reconnecting them manually doesn’t seem to work.
Here is the image showing the error and the broken connections:
An interesting thing, when I delete the flow decisions, the connections return to normal and I no longer receive the error.
Ex: Flow.
Convert.ToDouble(var) > 0
I did a test, the problem occurs in Flow Decision where I change the variable (string > Double) explicitly in the condition.
Ex:
Convert.ToDouble(var) > 1
In the previous version this error did not occur, in the last update it did.
Note, if I create a new Flow Decision and add the same condition, it works again… However, when importing from other projects I have an error
How to reproduce the bug, create a flow decision, example condition: 1=2.
Only follow the false condition, do not use true in any condition.
Note: In the previous version, the false flow exits from the left, true from the right. But now I have to turn on the true flow first. preventing me from working only with the False condition/flow of my decision flow
Could you please share the exception call stack (Copy to Clipboard in the error dialog) and, if possible, a sample file/project where the error occurs? I just tried reproducing the issue on my machine and I didn’t manage to hit the bug, so it would help a lot.
Related to the false branch, for now, you can just pull 2 branches from the decision node. The second one will be the false branch and you can delete the true branch. In the next release we will be adding a context menu option used to flip the branches, so after creating the true branch you will be able to convert it to false.
The problem is that when trying to use only the false node, excluding the true node, I get an error, as follows:
24.10.0-beta.17118+Branch.release-v24.10.0.Sha.bb90ccd640bbfb859b2267a06ce1d116d788e59a.bb90ccd640bbfb859b2267a06ce1d116d788e59a
Object reference not set to an instance of an object.
Error: System.Exception: Object reference not set to an instance of an object.
at System.Activities.Core.Presentation.ModernFlowDecisionBehavior.IsTrueConnectionPoint(ConnectionPoint point)
at System.Activities.Core.Presentation.ModernFlowDecisionBehavior.GetConnectorLabelBinding(ModelItem linkModelItem, ConnectionPoint sourcePoint)
at System.Activities.Core.Presentation.FlowchartDesigner.GetConnector(ModelItem linkModelItem, ConnectionPoint srcConnPoint, ConnectionPoint destConnPoint)
at System.Activities.Core.Presentation.FlowchartDesigner.GetConnectorViewState(UIElement source, UIElement dest, ModelItem linkModelItem, ConnectionPoint sourceConnectionPoint)
at System.Activities.Core.Presentation.FlowchartDesigner.CreateLink(ConnectionPoint sourceConnectionPoint, ConnectionPoint destConnectionPoint, ModelItem linkModelItem)
at System.Activities.Core.Presentation.FlowchartDesigner.CreateLink(ConnectionPoint sourceConnectionPoint, UIElement dest, ModelItem linkModelItem)
at System.Activities.Core.Presentation.FlowchartDesigner.AddConnectorsToPanel(ModelItem startNodeModelItem, List1 elem2elemConnections, List1 point2elemConnections)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2147467261
Ok, got it. Managed to reproduce the bug when only the false branch is connected, no matter the condition. We’re already working on a fix and we’ll deploy it in the next patch.
Really sorry for the inconvenience. As a workaround, you can connect an activity that has no effect (like an empty Sequence) to the true branch, then reopen the file.