Irregular problem with widget invoking server procedures


I have a need for a widget, which receives non-default values, derived from the data file.

I have followed your e-mail instruction on invoking remote procedures on the server side, and in constructor of the widget I use client-server tools like:

  vtkClientServerStream stream;
  stream << ... << vtkClientServerStream::Types::End;
  vtkSMSession* session = smproxy->GetSession();
  std::string humread = stream.StreamToString();
      /*location*/ smproxy->GetLocation(), stream,
      /* ignore_errores*/ false);

Where the widget class inherits : public pqPropertyWidget

And CMake file modifications are like here

It works fine. But my coworker has an irregular problem. He says it sometimes works, and sometimes does not.

bool vtkSIProxy::ReadXMLProperty(vtkPVXMLElement* propElement) , the assert fails:
  assert(!name.empty() && this->GetSIProperty(name.c_str()) == NULL);

I suspect the threading is the culprit, but when I use the debug mode, I see that widget construction and some XML property reading happens in the same thread, “Main thread”.

Could you clarify please how it works, and whether could threading be involved in such irregular failures?