Catalyst Live causes extractors to fail (Catalyst 2.0)
Initially I thought this was an issue with using Fides with Catalyst 2, but I was able to reproduce this with one of the Catalyst2 examples.
When you have an extractor in your Catalyst script and you try to use Catalyst Live, if you have more than one proxy in your pipeline, you end up getting the following error, starting with the next time step after you pull extracts to ParaView to be visualized:
( 144.630s) [pvbatch ]vtkSMImageExtractWriter:174 ERR| . . . . vtkSMImageExtractWriterProxy (0x565406c76990): No view provided to generate extract from!
( 144.630s) [pvbatch ]vtkSMExtractsController:191 ERR| . . . . vtkSMExtractsController (0x565408983890): Write failed! Extracts may not be generated correctly!
The first step is successful, and checking the address of the writer proxy on the extractor proxy, it's different from the writer proxy listed in the later steps where the extractor fails. So somehow the "Writer" proxy property is being changed, but I can't figure out why or how.
That may end up being a weird side effect of a different issue though. I did some more digging and found that on the Live side, vtkSMLiveInsituLinkProxy::MarkStateDirty()
is being called when I think it shouldn't be. It seems that is a callback for a vtkCommand::PropertyModifiedEvent
, but I think nothing should be being modified on these extracts.
This seems to be getting triggered by pqInputSelectorWidget::updateComboBox()
. In pqInputSelectorWidget::updateComboBox()
, the list of pqPipelineSource
s is iterated through, to set the pipeline proxies as the Input proxy to the FindDataHelper
proxy.
When it's setting the Input Connection on the FindDataHelper
proxy, the index is always 0, so when PPInternals->Set()
is called, it always ends up returning true, leading to Modified()
being called and resulting in MarkStateDirty()
being called.
In the case there's only a single proxy in the pipeline (e.g., grid
in the Catalyst2 examples), this all seems to work correctly. The calls to PPInternals->Set()
ends up returning false, because that proxy is saved and matches the proxy, so Modified
and MarkStateDirty
are not called.
But once you add another proxy to the pipeline, both proxies will be saved into PPInternals
, but both at index 0 in the vector Proxies
, so in subsequent steps, it will basically just keep overwriting on these PPInternals->Set()
calls, returning true and always marking the property as modified.
It doesn't seem to me that this should be linked to the extractor/writer issue described earlier, but in vtkSMLiveInsituLinkProxy.cxx
, if I just set StateDirty
to always be false, the extractor works correctly when using Catalyst Live. I'm not sure what the actual solution should be.
Not sure who to tag, perhaps @c.wetterer-nelson @danlipsa? Or maybe @francois.mazen?