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 system.data.datatable() 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.
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.
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.
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…