DataTables giving "Object reference not set..." error within Data Table properties

DataTable variables are giving “Object reference not set to an instance of an object” during .xaml execution… upon initialization rather than within the workflow at execution time. All packages are up-to-date. I have also tried initializing with new and other variations, both within the default value of the variable, within “assign” activities, and have tried building the data tables outright. I’ve tried clearing caches and inspecting the .xaml in Notepad, but I don’t see anything off. I’ve also uninstalled and reinstalled Studio.

Not sure if this is related, but I am also getting error: Assembly with same name is already loaded

see below image as to what I mean by “upon initialization.” It looks like the DataTable value is set, but the properties therein are coded as “object reference…” themselves. None of these are editable.

From the locals panel:

Have you tried a different version of UiPath.Database.Activities?

Yes I’ve tried downgrading and upgrading, currently on version 1.7.1. It’s my understanding that this may also be reliant on UiPath.System.Activities, and I’ve tried a bunch of different versions of that package as well.

I would try creating a blank process, remove all the dependencies except system, add database, and see what happens. If it works, add in your other dependencies one by one to find the conflict.


Welcome to the community

Try with a new project and check if the issue persists…if it persists then remove the system package from the .nuget folder in userprofile folder and reopen the project

Also when you initialize a empty table ideally in locals it should show wenpty curly braces and not new datatable


The issue does not persist in other projects, I’m only getting it in one.
I went ahead and tried this method and it didn’t work.

regarding new System.Data.Datatable in the locals panel, this is because I specified it in the variables panel as a default value (based on other advice from different threads). This obviously didn’t work. When I remove the default value, the default value is simply removed, it looks like this:

This is not happening in other projects, just this one. I’ve also tried this method (sort-of) by removing all dependencies and letting Studio automatically install them, and no luck.


Have you used the arguments in your project?



Try deleting the project.json and reopen and check if that solves

as this is not occuring across the packages look good but some issue with the xaml or the json


Yes I’m using these as variables, it’s a single workflow so I haven’t needed to convert to arguments.

Tried this, no luck. I’ve re-created the project and copied activities from the original (ctrl+c/v between instances, not copying xaml in directory), and it does reproduce the issue. Whatever packages are getting installed by default may be throwing it off?

So I went ahead and converted the DataTable variables to arguements to see if this makes a change - I didn’t have to do this before, so I’m not sure what broke, but this did make a change.
When I run, initially the locals panel shows the same as before (new System.Data.Datatable and “object reference” errors for the properties):

However, upon running, it shows initialized properties in Locals:

This is still throwing an “object reference” error upon execution at the top-level sequence. It does not error at any specific activity - it won’t progress at all…



Open the xaml in notedpad and check the difference between references for the effeted aml and the xaml which is normal


Assembly references? I’ve added the ones that were missing and nothing changed.


Is it possible to attach the effected xaml here?


Unfortunately I cannot.


One basic check…are there two variable swith same name in you xaml?

Can you create a different datatable variable and check if issue persists


There are no duplicates, also this issue persists with new Data Tables.

FYI I had to rebuild the project from scratch. It took a significant amount of time but the issue has not popped up in the current project.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.