# \[BUG\] Find/replace tool silent error

**URL:** <https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092>\
**Category:** Ignition\
**Created:** [June 23, 2022, 2:47am UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092 "2022-06-23T02:47:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 23, 2022, 2:47am UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/1 "2022-06-23T02:47:19Z")

</div>

There are two bugs here.

1. this error below went silently by when I tried to search for text inside a template. I only found it when I looked in the Console and in the Designer Diagnostics
2. this error occurred.

```auto
12:14:09.709 [ForkJoinPool.commonPool-worker-9] WARN SearchReplace - Error during search.
java.lang.NullPointerException: null

```

```auto
java.lang.NullPointerException: null
     at java.base/java.util.StringTokenizer.<init>(Unknown Source)
     at java.base/java.util.StringTokenizer.<init>(Unknown Source)
     at com.inductiveautomation.factorypmi.application.components.template.VisionTemplate.getComponentForPath(VisionTemplate.java:70)
     at com.inductiveautomation.factorypmi.designer.search.CachedComponent.component(CachedComponent.java:44)
     at com.inductiveautomation.factorypmi.designer.search.ComponentCursor$PropertyIterator.<init>(ComponentCursor.java:457)
     at com.inductiveautomation.factorypmi.designer.search.ComponentCursor.<init>(ComponentCursor.java:66)
     at com.inductiveautomation.factorypmi.designer.search.TemplateCursor.next(TemplateCursor.java:65)
     at com.inductiveautomation.ignition.designer.findreplace.SearchObjectAggregator.advance(SearchObjectAggregator.java:119)
     at com.inductiveautomation.ignition.designer.findreplace.SearchObjectAggregator.next(SearchObjectAggregator.java:107)
     at com.inductiveautomation.ignition.designer.findreplace.SearchObjectAggregator.next(SearchObjectAggregator.java:89)
     at com.inductiveautomation.ignition.designer.findreplace.SearchObjectAggregator.next(SearchObjectAggregator.java:31)
     at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
     at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
     at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
     at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
     at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
     at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
     at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
     at com.inductiveautomation.ignition.designer.findreplace.DefaultSearchExecutor.search(DefaultSearchExecutor.java:40)
     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source)
     at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
     at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
     at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
     at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
     at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

```

Any ideas how to resolve this? I’m suspecting there’s a corrupted template somewhere which is tripping up the find script

I did an upgrade to 8.1.18 and need to find all references to some text as I know they will have issues (e.g. tag qualities now have more context in them, and I use to compare the quality as a string to hide tags that didn’t exist. I need to replace these to use `isGood()`)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 23, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/2 "2022-06-23T16:17:26Z")

</div>

I think you might have done some inadvertently in one find/replace operation that left things in a bad state. Does this persist after you restart the designer?

---

<div class="post-metadata">

**Author:** ![cmason](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cmason](https://forum.inductiveautomation.com/u/cmason)\
**Post date:** [August 17, 2022, 9:07am UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/3 "2022-08-17T09:07:17Z")

</div>

I’m also getting error with “null pointers” and “array out of bounds” and others on almost all Find/Replace’s I do that include vision templates/windows after going from 7.9.x to 8.1.18

Here’s an example

```auto
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
	at java.base/java.util.Vector.elementAt(Unknown Source)
	at java.desktop/javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
	at com.inductiveautomation.factorypmi.application.components.VisionAdvancedTable.lambda$updateViewDataset$3(VisionAdvancedTable.java:704)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 17, 2022, 9:31am UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/4 "2022-08-17T09:31:55Z")

</div>

I forgot to come back to this. I solved it eventually by narrowing down the bad view by selecting folders of views and searching using the new contextual find replace tool. Once the find replace tool stopped working, I searched again in smaller selections within that folder and so on until I got to a single view. I had to resave a particular binding in the view and then it fixed it

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 17, 2022, 2:47pm UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/5 "2022-08-17T14:47:36Z")

</div>

If either of you could reach out to support with the views/templates/whatevers in question, that’d be very helpful 🙂

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [August 17, 2022, 3:10pm UTC](https://forum.inductiveautomation.com/t/bug-find-replace-tool-silent-error/61092/6 "2022-08-17T15:10:07Z")

</div>

I’ll see what I can do, hopefully I kept a copy of the original json, otherwise I’ll have to restore the original backup and find the page again ☹
