Object refence not set to an instance of an object while Debugging itself

hi Team,

I just created a framework and added few conditions while debugging or running its showing the below error.

Error: RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.ParallelTransform.BuildBookmarkInitializationActivity()
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.ParallelTransform.Transform(TransformArgs args)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.StartTransform.GenerateBigParallel(TransformArgs args)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.StartTransform.d__9.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Services.LocalTriggersTransformServiceProjectEndpoint.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Helpers.d__9`1.MoveNext(), HResult -2146233088

1 Like

@Sree_Krishnan_vellinezhi

Can you open details and show please

Also try analyzing the project and then check what errors it shows…also check project panel if there is any red mark on any of the xamls

Cheers

Hi @Anil_G

This was working fine but suddenly something happened. No idea

No errors found while validating also

Analyzer won’t find these error types, since they only occur runtime.
At some point, somewhere in your workflow you want to do some action on an object (most often arrays, dictionaries or datatables), which hasn’t been initialised. Therefor the object is null and this very common error occurs.

Make sure that you initialize your objects before invoking them.

Everything is initialized :slight_smile:
Shall i share the file ??

It is not, since you get the error. But sure I’ll have a quick look if you like

Main.xaml (142.7 KB)

I Can’t solve this with just this file.

  • since you invoke loads of other files there are many broken invoke links in it. The error might be in those
  • We must have a studio - versio mismatch, because opening the main file yields me this error:
    image

But how I would have analyzed it: If you run your project in debug mode, it will pause on the activity once the error occurs. So then you know exactly which object is null. Then trace back that object to it’s beginning and verify (or add) its initialization.

No Its not pausing in the activity … its not showing execution started log itself , before itself its throwing the error

My version is 2023.4.4

@Sree_Krishnan_vellinezhi

Are you using any trigger activities?

Is there a exception on your main.xaml outer sequence?

Cheers

Check the Default values in your variables pane. If you are referencing a variable in one of them, you can’t do that.

For example, I define two variables:

varOne string
varTwo string default varOne

This will cause the “Object reference” error as soon as the job tries to start, because the default for varTwo hasn’t been initialized.

I have uploaded the code can you check that

No Exceptions @Anil_G . while clicking debug itself its showing error

Error: RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.ParallelTransform.BuildBookmarkInitializationActivity()
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.ParallelTransform.Transform(TransformArgs args)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.StartTransform.GenerateBigParallel(TransformArgs args)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Transforms.StartTransform.d__9.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Plugin.Workflow.LocalTriggers.Services.LocalTriggersTransformServiceProjectEndpoint.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Helpers.d__9`1.MoveNext(), HResult -2146233088

hi @Sree_Krishnan_vellinezhi

Please check Every Variable the value may be null

@Sree_Krishnan_vellinezhi

are you using trigger activities any where?

cheers

Hi guys, Thanks for the involvment . This issue is resolved .

There is a bug or something else in the UiPath latest community version.
i could see 2 invoke workflow file (image1)
image

where first one is the actual invoke workflow file (image 2)

image

and the second one is start trigger flow (image 3)
image

We should use the first one , while using the second one only its throwing error.

:slight_smile: Issue resolved by myself.

3 Likes

@Anil_G @postwick @Jeroen_van_Loon

@UiPath_Community @Lahiru.Fernando

Request you to look into this and spread this to all the developers…and @UiPath_Community please fix this or provide a proper documentation , why there are two invoke with same names.