I am right now porting my “custom application” from being based on PV 5.5.0 to PV 5.6.0-RC2. Now I have a crash if I change the color coding for a render view by selecting another attribute from the combo box.
I don’t have the crash if I simply load the same “unstructured grid” into plain PV v5.6.0-RC2, so there is now some discrepancy between the updated “PV base” and my own custom code, and from all my research so far I found out that there must be some vtkContext2DScalarBarActor that has now a new property named “ReverseLegend” that did not exist in the old version yet.
Of course my custom application has a modified “main window” class that started being a clone of the paraview main window class and is now customized. For the rest there is not much code copied and adapted, mostly just added, so I am a bit lost where I should handle this new property. But with some “diff” tool I also do not see too many differences between ParaviewMainWindow.cxx at v5.5.0 and v5.6.0-RC2.
Shortly before the crash the output window appears, but does not show a message yet. With the debugger I could see what the intended message actually was:
Warning: In C:\dev\pv\src\ParaViewCore\ServerManager\Core\vtkSMProxy.cxx, line 1705\vtkSMScalarBarWidgetRepresentationProxy (000001E866613310): Failed to locate property ‘ReverseLegend’ on subproxy ‘Prop2DActor’: ScalarBarWidgetRepresentation
And the crash actually happens at vtkSMNewWidgetRepresentationProxy.cxx(181) - where obviously some property (“prop”) was not found and then the null pointer was used in line 181 without further checking. The call stack from the “index changed” signal from the combo box to the point where the message should be emitted is:
1 vtkSMProxy::SetupExposedProperty vtkSMProxy.cxx 1705 0x7ffdc3517d95
2 vtkSMProxy::SetupExposedProperties vtkSMProxy.cxx 1777 0x7ffdc3514e9a
3 vtkSMProxy::CreateSubProxiesAndProperties vtkSMProxy.cxx 1627 0x7ffdc35166a0
4 vtkSMProxy::ReadXMLAttributes vtkSMProxy.cxx 1513 0x7ffdc3514861
5 vtkSMSessionProxyManager::NewProxy vtkSMSessionProxyManager.cxx 338 0x7ffdc35d1549
6 vtkSMSessionProxyManager::NewProxy vtkSMSessionProxyManager.cxx 312 0x7ffdc35c955c
7 vtkSMTransferFunctionManager::GetScalarBarRepresentation vtkSMTransferFunctionManager.cxx 196 0x7ffdbc433de0
8 vtkSMPVRepresentationProxy::SetScalarBarVisibility vtkSMPVRepresentationProxy.cxx 682 0x7ffdbc3caf49
9 vtkSMPVRepresentationProxy::SetScalarBarVisibility vtkSMPVRepresentationProxy.h 250 0x7ffdbc3d2bfd
10 pqDisplayColorWidget::PropertyLinksConnection::setServerManagerValue pqDisplayColorWidget.cxx 183 0x7ffdc9095601
11 pqPropertyLinksConnection::copyValuesFromQtToServerManager pqPropertyLinksConnection.cxx 296 0x7ffdc3b13d00
12 pqPropertyLinks::onQtPropertyModified pqPropertyLinks.cxx 159 0x7ffdc3b0bd79
13 pqPropertyLinks::qt_static_metacall moc_pqPropertyLinks.cpp 115 0x7ffdc3ba3566
14 QMetaObject::activate qobject.cpp 3768 0x58db5d1a
15 QMetaObject::activate qobject.cpp 3629 0x58db5488
16 pqPropertyLinksConnection::qtpropertyModified moc_pqPropertyLinksConnection.cpp 153 0x7ffdc3ba3156
17 pqPropertyLinksConnection::qt_static_metacall moc_pqPropertyLinksConnection.cpp 87 0x7ffdc3ba3051
18 QMetaObject::activate qobject.cpp 3768 0x58db5d1a
19 QMetaObject::activate qobject.cpp 3629 0x58db5488
20 pqDisplayColorWidget::arraySelectionChanged moc_pqDisplayColorWidget.cpp 166 0x7ffdc9307526
21 pqDisplayColorWidget::qt_static_metacall moc_pqDisplayColorWidget.cpp 103 0x7ffdc93073b6
22 QMetaObject::activate qobject.cpp 3768 0x58db5d1a
23 QMetaObject::activate qobject.cpp 3629 0x58db5488
24 QComboBox::currentIndexChanged moc_qcombobox.cpp 505 0x597402ad
Debugging possible missing or wrong signal/slot connections can be hard, and the same is true for the “properties” system of Paraview.
So I would be glad with the one or other “educated guess” from experts!