How can I locate the origin of the error "object reference not set to an instance of an object"

Hello,
My automation runs well, but when I’m in the design panel, while no automation is running, about every 20 seconds I’m getting a popup error “object reference not set to an instance of an object”.

Needless to say it’s very annoying and disturbing.

I tried the open logs but I don’t know how to find anything there.

My questions are:
What is the origin of this error?
How can I locate it? (my automation is very large, with many files and activities).

(All packages are updated)

Thanks

you can expand the Details from the Error Popup

Depending on the Studio Version it can be better stay on the stable Version Levels and not using the newest packages which are also in preview (alpha) phase

I got this same error, it was for assign activity in my case.

we do not know what was done in detail

we don’t know your version

We also encountered in some cases when sanitized / harmonized Studio Version and referenced Packages a Studio Restart was helpfully. But at first we would recommend to clear the details for deciding the up/downgrade strategy

1 Like

Hi @Udiar

I think you are using the On element appear activity, there is a bug with this activity when you use it, this will throw the object reference not set to an instance of an object error.

Make avoid the on element appear activity, Instead of using this use element exist activity.

Hope it helps!!

Here are the extended details:

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

It says nothing to me :frowning:

My Studio version is 2023.8.0