plugin - input port not set up properly

I want to use this plugin, as I’m the developer of it :laughing: : GitHub - zippy84/vtkbool: A new boolean operations filter for VTK

When I try to use it with ParaView 5.11, it crashes with this error message:

(  32.390s) [paraview        ]       vtkAlgorithm.cxx:961    ERR| vtkPolyDataBooleanFilter (0x7f4c4400aef0): Attempt to replace connection input port index 2007038758 for an algorithm with 2 input ports.

Were there any changes in ServerManagerConfiguration that are not covered in the current documentation (ParaView: Plugin Howto)?

My XML file can be found here: vtkbool/vtkPolyDataBooleanFilter.xml at master · zippy84/vtkbool · GitHub

Bisecting may be the easiest way to figure this out.

I’m not able to figure out, what’s wrong with it. Here is the backtrace:

(  14.005s) [paraview        ]       vtkAlgorithm.cxx:961    ERR| vtkPolyDataBooleanFilter (0x55555fc14f20): Attempt to replace connection input port index -181180111 for an algorithm with 2 input ports.

Thread 1 "paraview" received signal SIGSEGV, Segmentation fault.
0x00007ffff105c62c in vtkAlgorithm::GetExecutive (this=0x55555fc14f20)
    at /home/zippy/Downloads/ParaView-v5.11.1/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:741
741     e->Delete();

(gdb) bt
#0  0x00007ffff105c62c in vtkAlgorithm::GetExecutive() (this=0x55555fc14f20)
    at /home/zippy/Downloads/ParaView-v5.11.1/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:741
#1  0x00007ffff514a288 in vtkSISourceProxy::OnCreateVTKObjects() (this=0x55555fcbdff0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSISourceProxy.cxx:118
#2  0x00007ffff512e067 in vtkSIProxy::InitializeAndCreateVTKObjects(paraview_protobuf::Message*) (this=0x55555fcbdff0, message=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSIProxy.cxx:393
#3  0x00007ffff512bf73 in vtkSIProxy::Push(paraview_protobuf::Message*) (this=0x55555fcbdff0, message=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSIProxy.cxx:129
#4  0x00007ffff50f529f in vtkPVSessionCore::PushStateInternal(paraview_protobuf::Message*) (this=0x555555e566b0, message=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkPVSessionCore.cxx:449
#5  0x00007ffff50f565c in vtkPVSessionCore::PushState(paraview_protobuf::Message*) (this=0x555555e566b0, message=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkPVSessionCore.cxx:488
#6  0x00007ffff50f1a77 in vtkPVSessionBase::PushState(paraview_protobuf::Message*) (this=0x555555e65580, msg=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkPVSessionBase.cxx:140
#7  0x00007ffff52b8aaa in vtkSMSession::PushState(paraview_protobuf::Message*) (this=0x555555e65580, msg=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMSession.cxx:129
#8  0x00007ffff52b38e5 in vtkSMRemoteObject::PushState(paraview_protobuf::Message*) (this=0x7fffcc00c1e0, msg=0x7fffffffb890)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMRemoteObject.cxx:136
#9  0x00007ffff5266e4d in vtkSMProxy::CreateVTKObjects() (this=0x7fffcc00c1e0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMProxy.cxx:808
#10 0x00007ffff52f2268 in vtkSMSourceProxy::CreateVTKObjects() (this=0x7fffcc00c1e0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMSourceProxy.cxx:383
#11 0x00007ffff5266167 in vtkSMProxy::UpdateVTKObjects() (this=0x7fffcc00c1e0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMProxy.cxx:634
#12 0x00007ffff523286c in vtkSMParaViewPipelineController::PostInitializeProxy(vtkSMProxy*) (this=0x55555fcf2b90, proxy=0x7fffcc00c1e0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/ServerManager/vtkSMParaViewPipelineController.cxx:1126
#13 0x00007fffecb99b3c in vtkSMParaViewPipelineControllerWithRendering::PostInitializeProxy(vtkSMProxy*) (this=0x55555fcf2b90, proxy=0x7fffcc00c1e0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Remoting/Views/vtkSMParaViewPipelineControllerWithRendering.cxx:327
#14 0x00007ffff65604ff in pqObjectBuilderNS::postCreatePipelineProxy(vtkSMParaViewPipelineController*, vtkSMProxy*, pqServer*, QString const&)
    (controller=0x55555fcf2b90, proxy=0x7fffcc00c1e0, server=0x555555f2dc40, regName=...)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/Core/pqObjectBuilder.cxx:109
#15 0x00007ffff6560d66 in pqObjectBuilder::createFilter(QString const&, QString const&, QMap<QString, QList<pqOutputPort*> >, pqServer*)
    (this=0x55555594a930, sm_group=..., sm_name=..., namedInputs=..., server=0x555555f2dc40)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/Core/pqObjectBuilder.cxx:205
#16 0x00007ffff77a5aef in pqFiltersMenuReaction::createFilter(QString const&, QString const&) (xmlgroup=..., xmlname=...)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/ApplicationComponents/pqFiltersMenuReaction.cxx:391
#17 0x00007ffff76e2cad in pqFiltersMenuReaction::onTriggered(QString const&, QString const&) (this=0x555555cd9290, group=..., name=...)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/ApplicationComponents/pqApplicationComponents_autogen/EWIEGA46WW/../../../../../Qt/ApplicationComponents/pqFiltersMenuReaction.h:76
#18 0x00007ffff76d3ec5 in pqFiltersMenuReaction::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x555555cd9290, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffbfe0)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/ApplicationComponents/pqApplicationComponents_autogen/EWIEGA46WW/moc_pqFiltersMenuReaction.cpp:94
#19 0x00007ffff58d17f3 in  () at /usr/lib/libQt5Core.so.5
#20 0x00007ffff76da7a1 in pqProxyGroupMenuManager::triggered(QString const&, QString const&) (this=0x555555cb5040, _t1=..., _t2=...)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/ApplicationComponents/pqApplicationComponents_autogen/EWIEGA46WW/moc_pqProxyGroupMenuManager.cpp:205
#21 0x00007ffff781d092 in pqProxyGroupMenuManager::triggered() (this=0x555555cb5040)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/ApplicationComponents/pqProxyGroupMenuManager.cxx:743
#22 0x00007ffff76da4e1 in pqProxyGroupMenuManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x555555cb5040, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fffffffc190)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/ApplicationComponents/pqApplicationComponents_autogen/EWIEGA46WW/moc_pqProxyGroupMenuManager.cpp:134
#23 0x00007ffff58d17f3 in  () at /usr/lib/libQt5Core.so.5
#24 0x00007ffff6f6bbb7 in QAction::triggered(bool) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ffff6f7160b in QAction::activate(QAction::ActionEvent) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007ffff7f0d82b in QAction::trigger() (this=0x5555586542d0) at /usr/include/qt/QtWidgets/qaction.h:187
#27 0x00007ffff7f0ca18 in pqQuickLaunchDialog::accept() (this=0x7fffffffd090) at /home/zippy/Downloads/ParaView-v5.11.1/Qt/Widgets/pqQuickLaunchDialog.cxx:281
#28 0x00007ffff7ec13f1 in pqQuickLaunchDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x7fffffffd090, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffc350)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/Widgets/pqWidgets_autogen/EWIEGA46WW/moc_pqQuickLaunchDialog.cpp:76
#29 0x00007ffff58d17f3 in  () at /usr/lib/libQt5Core.so.5
#30 0x00007ffff705c3a7 in QAbstractButton::clicked(bool) () at /usr/lib/libQt5Widgets.so.5
#31 0x00007ffff705ec5a in  () at /usr/lib/libQt5Widgets.so.5
#32 0x00007ffff706015c in  () at /usr/lib/libQt5Widgets.so.5
#33 0x00007ffff7060300 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#34 0x00007ffff6faf1e1 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#35 0x00007ffff6f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#36 0x00007ffff6f7ddef in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#37 0x00007ffff589c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#38 0x00007ffff6f7c12a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /usr/lib/libQt5Widgets.so.5
#39 0x00007ffff6fcced5 in  () at /usr/lib/libQt5Widgets.so.5
#40 0x00007ffff6fcec27 in  () at /usr/lib/libQt5Widgets.so.5
#41 0x00007ffff6f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#42 0x00007ffff589c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#43 0x00007ffff5d4193c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#44 0x00007ffff5d2a6c5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#45 0x00007fffda72f3e0 in  () at /usr/lib/libQt5XcbQpa.so.5
#46 0x00007fffe430fa31 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#47 0x00007fffe436ccc9 in  () at /usr/lib/libglib-2.0.so.0
#48 0x00007fffe430d0e2 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#49 0x00007ffff58eb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#50 0x00007ffff589b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#51 0x00007ffff717446b in QDialog::exec() () at /usr/lib/libQt5Widgets.so.5
#52 0x00007ffff77f1bce in pqPVApplicationCore::quickLaunch() (this=0x5555558f93c0)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/ApplicationComponents/pqPVApplicationCore.cxx:167
#53 0x00007ffff781d219 in pqProxyGroupMenuManager::quickLaunch() (this=0x555555cb5040)
    at /home/zippy/Downloads/ParaView-v5.11.1/Qt/ApplicationComponents/pqProxyGroupMenuManager.cxx:765
#54 0x00007ffff76da4f2 in pqProxyGroupMenuManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x555555cb5040, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fffffffd230)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Qt/ApplicationComponents/pqApplicationComponents_autogen/EWIEGA46WW/moc_pqProxyGroupMenuManager.cpp:135
#55 0x00007ffff58d17f3 in  () at /usr/lib/libQt5Core.so.5
#56 0x00007ffff6f6bbb7 in QAction::triggered(bool) () at /usr/lib/libQt5Widgets.so.5
#57 0x00007ffff6f7160b in QAction::activate(QAction::ActionEvent) () at /usr/lib/libQt5Widgets.so.5
#58 0x00007ffff70f400b in  () at /usr/lib/libQt5Widgets.so.5
#59 0x00007ffff70f412d in  () at /usr/lib/libQt5Widgets.so.5
#60 0x00007ffff6faf1e1 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#61 0x00007ffff6f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#62 0x00007ffff6f7ddef in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#63 0x00007ffff589c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#64 0x00007ffff70f7c7e in  () at /usr/lib/libQt5Widgets.so.5
#65 0x00007ffff70f84a6 in QMenu::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#66 0x00007ffff6faf1e1 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#67 0x00007ffff6f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#68 0x00007ffff6f7ddef in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#69 0x00007ffff589c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#70 0x00007ffff6f7c12a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /usr/lib/libQt5Widgets.so.5
#71 0x00007ffff6fcd9d4 in  () at /usr/lib/libQt5Widgets.so.5
#72 0x00007ffff6fcec27 in  () at /usr/lib/libQt5Widgets.so.5
#73 0x00007ffff6f7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#74 0x00007ffff589c6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#75 0x00007ffff5d4193c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#76 0x00007ffff5d2a6c5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#77 0x00007fffda72f3e0 in  () at /usr/lib/libQt5XcbQpa.so.5
#78 0x00007fffe430fa31 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#79 0x00007fffe436ccc9 in  () at /usr/lib/libglib-2.0.so.0
#80 0x00007fffe430d0e2 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#81 0x00007ffff58eb51c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#82 0x00007ffff589b404 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#83 0x00007ffff589c8a3 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#84 0x0000555555564142 in main(int, char**) (argc=1, argv=0x5555556f2910)
    at /home/zippy/Downloads/ParaView-v5.11.1/build/Clients/ParaView/paraview_main.cxx:152

The configuration looks good to me:

<ServerManagerConfiguration>
    <ProxyGroup name="filters">
        <SourceProxy name="PolyDataBooleanFilter" class="vtkPolyDataBooleanFilter" label="PolyDataBooleanFilter">
            <Documentation short_help="A boolean filter for polydata inputs." long_help=""></Documentation>

            <InputProperty name="InputA" command="SetInputConnection" port_index="0">
                <ProxyGroupDomain name="groups">
                    <Group name="sources"/>
                    <Group name="filters"/>
                </ProxyGroupDomain>
                <DataTypeDomain name="input_type">
                    <DataType value="vtkPolyData"/>
                </DataTypeDomain>
                <Documentation>
                    First polydata.
                </Documentation>
            </InputProperty>

            <InputProperty name="InputB" command="SetInputConnection" port_index="1">
                <ProxyGroupDomain name="groups">
                    <Group name="sources"/>
                    <Group name="filters"/>
                </ProxyGroupDomain>
                <DataTypeDomain name="input_type">
                    <DataType value="vtkPolyData"/>
                </DataTypeDomain>
                <Documentation>
                    Second polydata.
                </Documentation>
            </InputProperty>

            <IntVectorProperty name="OperMode" command="SetOperMode" number_of_elements="1" default_values="1">
                <EnumerationDomain name="enum">
                    <Entry value="1" text="Union"/>
                    <Entry value="2" text="Intersection"/>
                    <Entry value="3" text="Difference"/>
                    <Entry value="4" text="Difference2"/>
                </EnumerationDomain>
                <Documentation>
                    Sets the operation mode.
                </Documentation>
            </IntVectorProperty>

            <Hints>
                <ShowInMenu category="Extensions"/>
            </Hints>

        </SourceProxy>
    </ProxyGroup>

I think I need help!