# \[BUG-14889\] Error during blocking read of tags through scripting

**URL:** <https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755>\
**Category:** Ignition Early Access\
**Tags:** ignition80\
**Created:** [August 26, 2019, 12:08pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755 "2019-08-26T12:08:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 26, 2019, 12:08pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/1 "2019-08-26T12:08:21Z")

</div>

**Ignition 8.0.4-NIGHTLY - 21/08/2019**

I’ve some expression tag with runscript.

```auto
runScript("shared.tag.alarm.syntheseAlarme",0,"[default]{PathToParentFolder}")

```

This script read some tags with readBlocking.  
If I delete a tag which is read by the script with **readBlocking** , I have the following error in the gateway log and the **designer freeze for 30 seconds or more** …

@mgross is this exception normal in the gateway logs ?  
the same expression and script (with readAll) in 7.9 was not disturbed by non existing tags.

```auto
 E [Scripting[system_util_tag] ] [11:47:48]: Error during blocking read of tags through scripting. tag=[default]SYN_ALARME/SYS/TVG_SYS/status
jvm 1 | java.util.concurrent.TimeoutException: null
jvm 1 | at java.base/java.util.concurrent.CompletableFuture.timedGet(Unknown Source)
jvm 1 | at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
jvm 1 | at com.inductiveautomation.ignition.gateway.script.GatewayTagUtilities.readBlockingImpl(GatewayTagUtilities.java:148)
jvm 1 | at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.readBlocking(AbstractTagUtilities.java:358)
jvm 1 | at jdk.internal.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
jvm 1 | at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)
jvm 1 | at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:518)
jvm 1 | at org.python.core.PyObject. __call__ (PyObject.java:497)
jvm 1 | at org.python.core.PyObject. __call__ (PyObject.java:501)
jvm 1 | at org.python.pycode._pyx7016.syntheseAlarme$6(<module:shared.tag.alarm>:343)
jvm 1 | at org.python.pycode._pyx7016.call_function(<module:shared.tag.alarm>)
jvm 1 | at org.python.core.PyTableCode.call(PyTableCode.java:171)
jvm 1 | at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
jvm 1 | at org.python.core.PyFunction.function ___call__ (PyFunction.java:471)
jvm 1 | at org.python.core.PyFunction. __call__ (PyFunction.java:466)
jvm 1 | at org.python.core.PyFunction. __call__ (PyFunction.java:456)
jvm 1 | at org.python.core.PyFunction. __call__ (PyFunction.java:451)
jvm 1 | at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:788)
jvm 1 | at com.inductiveautomation.ignition.common.expressions.functions.ScriptFunction.execute(ScriptFunction.java:87)
jvm 1 | at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:66)
jvm 1 | at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.expression.ExpressionTagActorFactory$ExpressionTagActor.runInternal(ExpressionTagActorFactory.java:154)
jvm 1 | at com.inductiveautomation.ignition.gateway.tags.actors.factories.value.AbstractExpressionActor.run(AbstractExpressionActor.java:119)
jvm 1 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
jvm 1 | at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
jvm 1 | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
jvm 1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
jvm 1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
jvm 1 | at java.base/java.lang.Thread.run(Unknown Source)

```

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 26, 2019, 4:38pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/2 "2019-08-26T16:38:18Z")

</div>

I don’t see anything obvious with my mockup. When my shared script runs system.tag.readBlocking(), it reports the deleted tags as Bad\_NotFound, and there is no lag. It might help to grab a thread dump during the time that the designer is freezing up to see where the gateway is getting stuck.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 27, 2019, 7:07am UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/3 "2019-08-27T07:07:27Z")

</div>

@mgross, when the designer freeze, I have Thread [tag-expressions-2] **BLOCKED** in the gateway Diagnostics Threads.

```auto
Thread [tag-expressions-2] id=111, (WAITING for java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@46c30d2a)
  java.base@11.0.3/jdk.internal.misc.Unsafe.park(Native Method)
  java.base@11.0.3/java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.base@11.0.3/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
  java.base@11.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
  java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  java.base@11.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.base@11.0.3/java.lang.Thread.run(Unknown Source)

```

[V8-Ignition-STVG-T9\_thread\_dump20190827-090425.txt](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b71a1943a09291e4658f7db73062a890a022341c.txt) (266.8 KB)

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 27, 2019, 2:45pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/4 "2019-08-27T14:45:31Z")

</div>

OK now we are getting somewhere. As per the thread dump, the tag deletions are backing up the expression threads somehow. Exactly what was being deleted when the thread dump was taken? Was the delete happening in the same script that is being called by the expression tag?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 27, 2019, 2:54pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/5 "2019-08-27T14:54:21Z")

</div>

I manually delete folders with tags from the designer.  
(folder tree with udt instance)

expression tags outside the deleted tag tree, execute runscript expression. In the script I read some tag value which are in the deleted folders

I generate the tag with json file. I need to ofen delete and recreate tags.

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 28, 2019, 5:35pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/6 "2019-08-28T17:35:06Z")

</div>

Yeah I still cannot replicate anything. I think we will need a tag export, the runscript, and a list of tags that are being deleted when this happens.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [August 29, 2019, 10:17am UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/7 "2019-08-29T10:17:29Z")

</div>

I’ve send with PM you a link to download data

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 29, 2019, 10:51pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/8 "2019-08-29T22:51:34Z")

</div>

OK thanks. Let me see what I can find with these.

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 30, 2019, 11:10pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/9 "2019-08-30T23:10:47Z")

</div>

OK I put in a ticket to figure this out.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 9, 2019, 5:57pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/10 "2019-09-09T17:57:24Z")

</div>

Hi @mgross,  
Have you ever a fix for the 8.0.4 final or Another 8.0.5 nightly ?

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [September 9, 2019, 6:14pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/11 "2019-09-09T18:14:40Z")

</div>

Hi @mazeyrat,

We don’t have a fix ready for this yet, but I will certainly let you know when we do.

Thanks!

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 26, 2019, 6:29pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/12 "2019-09-26T18:29:05Z")

</div>

Hi @mgross, @awalker,  
Have you make any progress in the investigation of this issue ?  
We are waiting to test a fix of it to update our application from 7.9 to 8.0 🙂

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [September 26, 2019, 11:51pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/13 "2019-09-26T23:51:57Z")

</div>

Hi @mazeyrat,

Investigation is still in progress for this issue. We hope to have a fix for you soon!

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 27, 2019, 6:39am UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/14 "2019-09-27T06:39:27Z")

</div>

Thanks, I stay tuned

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 14, 2019, 7:25pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/15 "2019-10-14T19:25:16Z")

</div>

Hi @awalker,  
Any news about a fix…in 8.0.5 final ?

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [October 14, 2019, 8:26pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/16 "2019-10-14T20:26:58Z")

</div>

Hi @mazeyrat - Colby has been looking in to this issue, it will get fixed in 8.0.6 at the earliest

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 18, 2019, 7:23am UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/17 "2019-10-18T07:23:05Z")

</div>

Hi @awalker, @Colby.Clegg,

I have done other test with the final 8.0.5, and I think this issue is related to some tag expression with runscript where import doesn't work as in 7.9:

> [@Runscript() not working after upgrading from 7.9 to 8](http://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/13):
>
> @Kevin.Herron, I think I encounter a similar issue: Ignition 8.0.5 Gateway Scripting Project set to “global” I’ve create a new tag expression with a runscript. runscript("shared.tag.alarm.test",0) in the global project: def shared.tag.alarm.test() import shared.tag.util return 0 Expression return : [null, Error\_ExpressionEval("Error executing script for runScript() expression:shared.tag.alarm.test"), Thu Oct 17 17:04:44 CEST 2019 (1571324684504)] if I supprim the import, tag express…

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 29, 2019, 1:20pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/18 "2019-10-29T13:20:33Z")

</div>

@awalker  
Any news about this issue ?

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [October 29, 2019, 6:17pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/19 "2019-10-29T18:17:49Z")

</div>

Still not fixed yet, we are hoping to get it fixed for 8.0.7.

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [November 25, 2019, 4:35pm UTC](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755/20 "2019-11-25T16:35:46Z")

</div>

A change was implemented in the 8.0.7 nightly released this morning that should address the issue in this thread.

[Next page](https://forum.inductiveautomation.com/t/bug-14889-error-during-blocking-read-of-tags-through-scripting/27755.md?page=2)
