Kitware / paraview-visualizer

Web frontend to ParaView based on trame
BSD 3-Clause "New" or "Revised" License
30 stars 12 forks source link

Loguru caught a signal: SIGSEGV #13

Open LiChengChen666 opened 1 year ago

LiChengChen666 commented 1 year ago

I use simple.LoadPlugin to load plugin, the code :

@smproxy.filter()
@smproperty.input(name="Input")
@smdomain.datatype(dataTypes=["vtkMultiBlockDataSet"], composite_data_supported=True)
class PythonCR3BPTrajSource(VTKPythonAlgorithmBase):
    """
    Example filter demonstrating how to write a filter that preserves the input
    dataset type.
    """
    def __init__(self):
        super().__init__(nInputPorts=1, inputType="vtkMultiBlockDataSet", nOutputPorts=1, outputType="vtkMultiBlockDataSet")
        from vtkmodules.vtkFiltersSources import vtkPolyLineSource

    def RequestData(self, request, inInfo, outInfo):
        inData = self.GetInputData(inInfo, 0, 0)
        self.mu = inData.GetFieldData().GetArray('mu').GetComponent(0,0)
        print(self.mu)
        return 1
jourdain commented 1 year ago

What is the question? It seems that you are providing the answer to your own question.

LiChengChen666 commented 1 year ago

sorry, i forget to change the title ,the error is "Loguru caught a signal: SIGSEGV". this code can run in local paraview and visualizer.

jourdain commented 1 year ago

I'm not sure what would be different with paraview-visualizer compared to paraview and old visualizer.

LiChengChen666 commented 1 year ago

Thanks, this issue has been fixed, it seems to be a version issue with paraview . Whether it is necessary to rewrite Python plugins in C++.