When running my Automation via Debug file i get the following mistake... But when running from this activity (the first one) everything works fine

The sequence doesnt have any trouble, it runs perfectly. But to do so i have to select the forst instance and run from that activity with my right click, instead of simply debuging the file and running it as a whole.

MISTAKE DETAIL:
23.6.1-beta.13324+Branch.release-v23.6.1.Sha.52787b786620e97cba5555379da6e6bb423b3e6b

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.Presentation.Validation.ValidationService.MarkParents(ValidationError validationError, IEnumerable1 errorParents, ModelItem source) at System.Activities.Presentation.Validation.ValidationService.MarkError(ValidationError validationError, List1 errorSourcePath, ModelItem source)
at System.Activities.Presentation.Validation.ValidationService.MarkErrors(ICollection1 errors, ValidationReason reason, Activity rootActivity) at System.Activities.Presentation.Validation.ValidationService.OnValidationWorkCompleted(Tuple3 input)
at System.Activities.Presentation.Validation.BackgroundValidationSynchronizer`1.<>c__DisplayClass26_0.b__0()
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

@Humberto_Dalponte_Garcia

Looks like your outer sequence enclosing everything is having an issue…either add one more and try or move or copy everything to new xaml and check

Cheers

tried moving to a new xaml but i got the same error.

If i used classic wl activities in a w version can that be causing the error? It doesnt make sense to me since it actually runs fine when i give it a right click and run from the first activity, its only a debug problem.

This error means you are referencing a variable or argument that has not been initialized. Show us your code and which activity is generating the error.

@Humberto_Dalponte_Garcia

when you run a xaml, arguments such as “Config” dont get initialized so theres an error

you should put something like this at the start of the xaml to initialize it (if its NULL)

the reason it works from main is because the main sequence initializes all these for you and passes the value down to this xaml

@Humberto_Dalponte_Garcia

Please dont copy your out sequence…instead copy all other activities or each activiry and then check running…it is clear that there is some issue with your outer sequence

Cheers

I did various fixes… beginning from moving the rpa to a new xaml following @Anil_G advince and then rechecking each argument to see he advice of @jack.chan . It did the trick, it ran from debug with no problem.

So as expected we moved the rpa to our server to do background tests… same error of “object reference not set to an instance of an object”, with more errors in the details:

21.10.4+Branch.master.Sha.8f864e3db4251aecabea63041087de2634460029

Object reference not set to an instance of an object.

Open Document Error: UiPath.Studio.Contracts.RecoverableException
—> UiPath.Studio.Contracts.RecoverableException: The project ‘C:\Users\jmonroy\Documents\UiPath\TestAutomationProject Vcomp Intermediarios\project.json’ could not be opened: Object reference not set to an instance of an object…
—> RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Studio.Plugin.Workflow.Services.SettingsServiceWrapper.GetActivitiesManagerSettings()
at UiPath.Studio.Plugin.Workflow.Project.Services.ActivitiesRegistrationService.ProcessActivities(IAssemblyInfo assemblyInfo, CancellationToken token)
at UiPath.Studio.Plugin.Workflow.Project.Services.ActivitiesRegistrationService.ProcessActivities(CancellationToken token)
at UiPath.Studio.Plugin.Workflow.Project.Services.ActivitiesRegistrationService.<>c__DisplayClass13_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Studio.Plugin.Workflow.Project.Services.ActivitiesRegistrationService.WaitRegistrationAsync()
at UiPath.Studio.Plugin.Workflow.Project.Services.ActivitiesRegistrationService.GetContextAsync()
at UiPath.Studio.Plugin.Workflow.Services.ActivityLoaderService.SetContextAsync()
at UiPath.Studio.Plugin.Workflow.Services.ActivityLoaderService.LoadActivitiesAsync()
at UiPath.Studio.Plugin.Workflow.Services.ProjectLoaderProjectEndpoint.b__11_0()
at UiPath.Studio.Plugin.Workflow.Services.ProjectLoaderProjectEndpoint.LoadFromContainerAsync()
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location —
at UiPath.CoreIpc.Helpers.Timeout[TResult](TimeSpan timeout, List1 cancellationTokens, Func2 func, String message, Func2 exceptionHandler) --- End of inner exception stack trace --- at UiPath.Studio.Core.Services.PersistableServiceBase3.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options)
at UiPath.Studio.Core.CommonServices.ProjectServiceBase.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Core.Services.PersistableServiceBase3.OpenAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
— End of inner exception stack trace —
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenDocumentAsync(OpenInformation openInfo)
at UiPath.Studio.Core.CommonServices.OpenCloseCommandsService.OpenPath(String filePath)
at UiPath.Studio.Shell.Services.ProcessArgumentsService.ProcessWithCommandLine(String commandLineFileName)
at UiPath.Studio.Shell.ShellApplication.StudioShellApplication.<>c__DisplayClass23_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)
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 -2146233088

@Humberto_Dalponte_Garcia

To start with where you changed the process and where you ran it are on same versions? Or is there a version difference

Cheers

i think there is a version difference. From 23.6 to 21.4. But they both are over 21.4 which according to the packs i use should give trouble after that version.

@Humberto_Dalponte_Garcia

Never do something on higher version and then move to lower…other way round might be still fine…try to do it on 21.4 only

Cheers