Uncaught exception executing batch contex

Hello all Ignition’s fans!

I have tag value change script that calculate a dataset tag and then write back this dataset to a memory tag.

The dataset is good and is written in the tag. I can check in the tag and the dataset is ok.

But in the logger, I have this error:
“Uncaught exception executing batch contex”

Can someone help me?

Can you expand it by clicking the “+” button and let us know what version of Ignition you are using?

Ignition 8.0.3

The complete listing of the error is about 2000 lines.

Here are the first lines.
java.lang.StackOverflowError: null

at java.base/java.lang.Class.privateGetPublicMethods(Unknown Source)

at java.base/java.lang.Class.getMethods(Unknown Source)

at org.json.JSONObject.populateMap(JSONObject.java:846)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

at org.json.JSONObject.populateMap(JSONObject.java:873)

at org.json.JSONObject.(JSONObject.java:259)

at org.json.JSONObject.wrap(JSONObject.java:1460)

Long exceptions are typical for these. IIRC, this (circular refs in JSON) was fixed not that long ago.

Yes, I also think this is a bug that was fixed, and you are on a relatively ancient version so it would be worth your time to upgrade.

Oups sorry.

I’m on 8.1.3. We just upgraded 1 month ago and we cannot upgrade until Sepasoft can support a newer version.

I have other scripts that are writting dataset to memory tags. And they are working fine. So why this particular tags? I must say the script is inside a UDT.

Any workaround?

It’s got something to do with the contents/objects you’ve put into the dataset… hard to say without seeing your script.

Okay, found an open ticket where this StackOverflowError will occur when trying to encode a QualityCode object, so that’s one thing to look for (or by extension a QualifiedValue object).