# Irregular problem with widget invoking server procedures

**URL:** https://discourse.paraview.org/t/irregular-problem-with-widget-invoking-server-procedures/13698
**Category:** Development
**Created:** [January 15, 2024, 9:36am UTC](https://discourse.paraview.org/t/irregular-problem-with-widget-invoking-server-procedures/13698 "2024-01-15T09:36:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joint](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joint](https://discourse.paraview.org/u/joint)
#### Post date: [January 15, 2024, 9:36am UTC](https://discourse.paraview.org/t/irregular-problem-with-widget-invoking-server-procedures/13698/1 "2024-01-15T09:36:26Z")

</div>

Hello

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:

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

```

Where the widget class inherits : public pqPropertyWidget

And CMake file modifications are like here  
[https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PropertyWidgets/CMakeLists.txt](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PropertyWidgets/CMakeLists.txt)

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

```auto
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?
