[BUG] Find/replace tool silent error

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.
12:14:09.709 [ForkJoinPool.commonPool-worker-9] WARN SearchReplace - Error during search.
java.lang.NullPointerException: null
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())

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?