Error:Object reference not set to an instance of the object

Hi,
Whenever i use create directory activity, it works fine for sometime and then i get an error stating, Object reference not set to an instance of the object.
Exception type: System.NullReferenceException.
Then even if i disable that activity i get the same error.
What is the reason for this error?

Can you explain or post the screenshot of the workflow you are trying to do @KeertiJ?

the error is due to the passing of null value to the activity

Object reference not set to an instance of the object.

The above error occurs when you’re referencing something which hasn’t been initialized.

As you said that even if you disable the activity, error occurs it simply means that the error is occurring in other place in the code.

Debug the code and understand where the error occurs.

Hi @Rahul_Pasupuleti

I tried debugging the code,but the control is not entering the flowchart only.It executed 2 times and then 3rd time it showed this error.All 3 times i did not make any changes to the code.

Could you share a screenshot or your workflow?

@Rahul_Pasupuleti Actually the code is confidential. So i’m not allowed to share the workflow or its screenshots.

Hi @HareeshMR,
The code is confidential, i cannot share the workflow or its screenshot

Just explain what are you trying to do @KeertiJ?

Before the flow chart :slight_smile:

@HareeshMR I’m giving an input dialog box asking for path.After that I’ve used create directory activity.Then there is open browser activity.

Hi, @HareeshMR, @Rahul_Pasupuleti
The error got resolved.I just removed unused variables. I’m not sure whether this was the actual reason for the problem.Thank you both of you :slightly_smiling_face: