Contour segmentation fault

Hello,

when I use the contour filter in Paraview I’m getting the following error:

Loguru caught a signal: SIGSEGV
Stack trace:
72            0x40802a /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/paraview-real() [0x40802a]
71      0x7fe85e217305 __libc_start_main + 133
70      0x7fe85e21724a /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7fe85e21724a]
69            0x407c8a /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/paraview-real() [0x407c8a]
68      0x7fe85aa84120 QCoreApplication::exec() + 128
67      0x7fe85aa7b62a QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 298
66      0x7fe80945ee13 /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5(+0x5ee13) [0x7fe80945ee13]
65      0x7fe85b2ee0db QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 187
64      0x7fe85b312b35 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 261
63      0x7fe85b3118ad QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 1837
62      0x7fe85aa7cdd8 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 280
61      0x7fe85d363260 QApplication::notify(QObject*, QEvent*) + 704
60      0x7fe85d35c18c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
59      0x7fe85d3b68fb /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libQt5Widgets.so.5(+0x1b68fb) [0x7fe85d3b68fb]
58      0x7fe85d3b3d86 /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libQt5Widgets.so.5(+0x1b3d86) [0x7fe85d3b3d86]
57      0x7fe85d3627cc QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 460
56      0x7fe85aa7cdd8 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 280
55      0x7fe85d363dc8 QApplication::notify(QObject*, QEvent*) + 3624
54      0x7fe85d35c18c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
53      0x7fe85d399c28 QWidget::event(QEvent*) + 424
52      0x7fe85d43f945 QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 213
51      0x7fe85d43f77a /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libQt5Widgets.so.5(+0x23f77a) [0x7fe85d43f77a]
50      0x7fe85d43e45a /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libQt5Widgets.so.5(+0x23e45a) [0x7fe85d43e45a]
49      0x7fe85d43e272 QAbstractButton::clicked(bool) + 50
48      0x7fe85aaab1ea QMetaObject::activate(QObject*, int, int, void**) + 1850
47      0x7fe85c9fd47f pqPropertiesPanel::apply() + 687
46      0x7fe85c8cf542 pqPropertiesPanel::applied(pqProxy*) + 50
45      0x7fe85aaab1ea QMetaObject::activate(QObject*, int, int, void**) + 1850
44      0x7fe85dce4551 pqApplyBehavior::applied(pqPropertiesPanel*, pqProxy*) + 193
43      0x7fe85dce56de pqApplyBehavior::showData(pqPipelineSource*, pqView*) + 414
42      0x7fe84b41b1c8 vtkSMParaViewPipelineControllerWithRendering::ShowInPreferredView(vtkSMSourceProxy*, int, vtkSMViewProxy*) + 168
41      0x7fe84b418f64 vtkSMParaViewPipelineControllerWithRendering::UpdatePipelineBeforeDisplay(vtkSMSourceProxy*, int, vtkSMViewProxy*) + 212
40      0x7fe8593fbd6c vtkSMSourceProxy::UpdatePipeline(double) + 140
39      0x7fe859379718 vtkSMOutputPort::UpdatePipelineInternal(double, bool) + 184
38      0x7fe8592c3c25 vtkPVSessionBase::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 53
37      0x7fe8592c4bfb vtkPVSessionCore::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 59
36      0x7fe8592c4dc2 vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream const&, bool) + 242
35      0x7fe85761128d vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) + 29
34      0x7fe857610fee vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) + 1294
33      0x7fe8576108bd vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) + 1229
32      0x7fe857610259 vtkClientServerInterpreter::CallCommandFunction(char const*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&) + 345
31      0x7fe84c8a2bbb vtkSISourceProxyCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&, void*) + 971
30      0x7fe8592fde44 vtkSISourceProxy::UpdatePipeline(int, double, bool) + 468
29      0x7fe852ec5d3a vtkStreamingDemandDrivenPipeline::Update(int, vtkInformationVector*) + 282
28      0x7fe852e6ab36 vtkDemandDrivenPipeline::UpdateData(int) + 134
27      0x7fe852ec4979 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 953
26      0x7fe852e6bb1e vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 222
25      0x7fe852e650f1 vtkCompositeDataPipeline::ForwardUpstream(vtkInformation*) + 337
24      0x7fe852ec4979 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 953
23      0x7fe852e6bb76 vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 310
22      0x7fe852e66201 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 113
21      0x7fe852e694f7 vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 55
20      0x7fe852e6f2ce vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) + 62
19      0x7fe83967e5bb vtkPVContourFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 2043
18      0x7fe83967dd21 vtkPVContourFilter::ContourUsingSuperclass(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 673
17      0x7fe853432879 vtkContourFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 4249
16      0x7fe852e5e1db vtkAlgorithm::UpdatePiece(int, int, int, int const*) + 139
15      0x7fe852e5f0aa vtkAlgorithm::Update(vtkInformation*) + 170
14      0x7fe852ec5d3a vtkStreamingDemandDrivenPipeline::Update(int, vtkInformationVector*) + 282
13      0x7fe852e6ab36 vtkDemandDrivenPipeline::UpdateData(int) + 134
12      0x7fe852ec4979 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 953
11      0x7fe852e6bb76 vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 310
10      0x7fe852e66201 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 113
9       0x7fe852e694f7 vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 55
8       0x7fe852e6f2ce vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) + 62
7       0x7fe853434eae vtkContourGrid::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 494
6       0x7fe853434ae5 /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libvtkFiltersCore-pv5.10.so.1(+0x234ae5) [0x7fe853434ae5]
5       0x7fe853435d94 vtkContourHelper::Contour(vtkCell*, double, vtkDataArray*, long long) + 84
4       0x7fe8527c0ddb vtkHigherOrderHexahedron::Contour(double, vtkDataArray*, vtkIncrementalPointLocator*, vtkCellArray*, vtkCellArray*, vtkCellArray*, vtkPointData*, vtkPointData*, vtkCellData*, long long, vtkCellData*) + 219
3       0x7fe8527bab5e vtkHexahedron::Contour(double, vtkDataArray*, vtkIncrementalPointLocator*, vtkCellArray*, vtkCellArray*, vtkCellArray*, vtkPointData*, vtkPointData*, vtkCellData*, long long, vtkCellData*) + 990
2       0x7fe85277e0b0 vtkDataSetAttributes::CopyData(vtkDataSetAttributes*, long long, long long) + 96
1       0x7fe85016811a /scratch/user/Apps/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/../lib/libvtkCommonCore-pv5.10.so.1(+0x56811a) [0x7fe85016811a]
0       0x7fe85e22c050 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7fe85e22c050]
(  93.614s) [paraview        ]                       :0     FATL| Signal: SIGSEGV

What is the reason? And how to solve it?

Can you share the data and pipeline setup that triggers this?

Cc: @mwestphal @cory.quammen

Unfortunately I cannot share the data at the moment. But do you have an idea on why this issue arise? It happens when I try to contour the QCriteron

Best

Then you may want to contact Kitware to set up a NDA: https://www.kitware.eu/get-support/

But do you have an idea on why this issue arise?

Impossible to say without access to the data.

I noticed a strange behaviour: if I run the script (to make the contour) multiple times sometimes it segfaults other works correctly (on average it works 1 time out of 5). The same happens in the GUI where the first time I hit apply returns an empty mesh while after that it works fine.

Any idea?

Something tells me that you are trying to access memory that should not be accessed.

Using valgrind or address sanitizer will give you/us a better idea.

If the data were created by hand, then there is a possibility that you did not create the dataset correctly.

Also if you can not give the whole dataset, consider at least providing a subset of the dataset (using extract geometry or threshold) so that we can explore your issue, without revealing the content of your dataset.