Visualizer frontend mistakes cause server busy

I am trying to employ Visualizer in my web app to let user view their 3D data on my server. My data is in raw format(micro CT data , basically only gray values) without meta data(dimentions, etc.). In Visualizer, user need fill the meta data parameters such as extents, spacing, etc. While after setting parameters as "volume, imageFile, origin, spacing, " etc. Trying to display the 3D data, Visualizer looks busy trying to do something, while nothing happened for ever.

I checked the pvw-server console, and find the below error:

vtkPVImageReader (0x776d120): Received error when calling
MPI_File_set_view(file.Handle, this->GetHeaderSize(file), MPI_BYTE, view, const_cast<char *>("native"), MPI_INFO_NULL)

Invalid argument, error stack:
MPI_FILE_SET_VIEW(61): Invalid displacement argument

According to the above error in console, the issue seems related to parameters providing is not correct. While I am not sure what's the correct inputs and what's the caveat. The worse is that after this mistakes, it seems mistakenly make the server busy doing something and the user have no chance to correct his/her mistakes.
For the moment, I have to kill the server process manually and restart it to break the frozen status of Visualizer(Visualizer browser is showing busy, not the"server disconnected" status). (When I tried to connect to the same server from another browser, it shows server disconnected. While actually the server process is still on and occupying the port)
Does this mean we need make some patch for the pvw-server to deal with this mistakes from the user?  Considering some parameters input wrongly is very possible. We don't want the user crash the pvw-server so frequently.  
Has anyone met the same situation? Could you please share your experience? Thanks in advance.

I’m not sure Visualizer is going to provide the right controls for RAW data especially due to the error prone situation. Is there any other way you could convert your raw files into *.vti files?

As another option, if you have a custom file describing the raw format, you could create a Python plugin that could use that to properly load and initialize the data for the user.



My web app is using a public database for data source and all datasets are in raw format (gray values of every voxel from the first page to the last page) with meta data in database I can fetch on the fly.
Previously I was using the paraview desktop software to convert the raw file into .vti file. In that way, Visualizer works perfectly. Then I also checked with raw data, and met error in console, while will let me provide the meta data parameter then it will work just feeding .vti file(Maybe I was too lucky at that time). When I let my users test it, I found this problem and then I tried it by myself and get into pit , could re-play my original success trial.

I think I may need a small function to read raw and add the meta data tag then write into .vti file on my web server side. In that way, let Visualizer been feed with .vti file.

I am happy to hear that I do not need touch the pvw-server side, because I am not confident to do that now. I have not get clear how you guys make the realtime communication when doing the remote rendering. What’s the socket body/data/ontents are you transferring between browser and pvw-visualizer server? Are you doing all of that in C++? Is there some documentation about that? I am basically a javascript coder and know about python, but no clue of C++ at all.

If you want to create a convert script in Python, you can use ParaView and the Trace feature to see how you could script the [Loading of RAW, set parameters, and write a vti]. Then by tweaking the script so it can be used with args, you could run it with pvpython on the server side in an automatic fashion to convert your files.

Regarding your second question, most of the code is Python on the server side and the client use wslink RPC/Pub-Sub infrastructure to drive the Python side which then call the wrapped C++ classes of VTK/ParaView.

Thanks a lot. The Trace feature is great.