# Out of range exception when using GhostCellGenerator

**URL:** https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354
**Category:** ParaView Support
**Created:** [June 21, 2023, 1:33pm UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354 "2023-06-21T13:33:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [June 21, 2023, 1:33pm UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/1 "2023-06-21T13:33:27Z")

</div>

Hi all,

When using the `GhostCellsGenerator` filter on the following database  
[bug\_gcg.tar.bz2](https://discourse.paraview.org/uploads/short-url/eY6SLkfgaiAnuhnpqmbhtn5HDO7.bz2) (28.3 KB)  
, `ParaView`crashes, throwing a `std::out_of_range` exception.

The database is the result of a computation made on 2 MPI threads and the crash occurs when 2 paraview servers are used.  
If ParaView is used in standalone mode (no MPI process) the crash does not occur and the application of `GhostCellsGenerator` runs fine.

Commands launched:

```auto
clear && mpirun -n 2 ~/ParaView_build/bin/pvserver --dr 2>&1|tee listing.txt
clear && ~/ParaView_build/bin/paraview --dr --url cs://un00035159:11111

```

Here is the stack (the same on both MPI threads):

```auto
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=139641744625664) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=139641744625664) at ./nptl/pthread_kill.c:78
#2 __GI___ pthread_kill (threadid=139641744625664, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007f00f1422476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007f00f14087f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007f00e67c4bbe in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007f00e67d024c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007f00e67d02b7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007f00e67d0518 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00007f00e67c74e6 in std::__throw_out_of_range(char const*) () from /lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f00eaff4f40 in std::map<int, vtkDIYGhostUtilities::PolyDataBlockStructure, std::less<int>, std::allocator<std::pair<int const, vtkDIYGhostUtilities::PolyDataBlockStructure> > >::at (__k=@0x55b3f12af944: 3, this=0x55b3f12a90f0) at /usr/include/c++/11/bits/stl_map.h:541
#11 vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}::operator()(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&) const (__closure=<optimized out>, cp=..., block=0x55b3f12a90f0)
    at /home/peillexg/ParaView/VTK/Parallel/DIY/vtkDIYGhostUtilities.txx:422
#12 std::__invoke_impl<void, vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}&, vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&>(std::__invoke_other, vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}&, vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*&&, vtkdiy2::Master::ProxyWithLink const&) (__f=...) at /usr/include/c++/11/bits/invoke.h:61
#13 std::__invoke_r<void, vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}&, vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&>(vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}&, vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*&&, vtkdiy2::Master::ProxyWithLink const&) (
    __fn=...) at /usr/include/c++/11/bits/invoke.h:154
#14 std::_Function_handler<void (vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&), vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}>::_M_invoke(std::_Any_data const&, vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*&&, vtkdiy2::Master::ProxyWithLink const&) ( __functor=...,__ args#0=<optimized out>, __args#1=...)
    at /usr/include/c++/11/bits/std_function.h:290
#15 0x00007f00eafefed0 in std::function<void (vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)>::operator()(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&) const ( __args#1=...,__ args#0=<optimized out>, this=0x55b3f13a3a88) at /usr/include/c++/11/bits/std_function.h:590
#16 vtkdiy2::Master::Command<vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation> >::execute (
    this=this@entry=0x55b3f13a3a80, b=<optimized out>, cp=...) at /home/peillexg/ParaView/VTK/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/detail/master/commands.hpp:16
#17 0x00007f00eaeff795 in vtkdiy2::Master::ProcessBlock::operator() (this=0x7ffc5bf21e40)
    at /home/peillexg/ParaView/VTK/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/detail/master/execution.hpp:61
#18 0x00007f00eaf123f0 in vtkdiy2::Master::execute (this=0x7ffc5bf22220) at /home/peillexg/ParaView/VTK/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/detail/master/execution.hpp:149
#19 0x00007f00eb004bc8 in vtkdiy2::Master::foreach_<vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation> >(std::function<void (vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)> const&, std::function<bool (int, vtkdiy2::Master const&)> const&) (this=this@entry=0x7ffc5bf22220, f=..., skip=...) at /home/peillexg/ParaView/VTK/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/master.hpp:631
#20 0x00007f00eb004e6d in vtkdiy2::Master::foreach<vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2}>(vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData>(vtkdiy2::Master&, std::vector<vtkPolyData*, std::allocator<vtkPolyData*> >&)::{lambda(vtkDIYGhostUtilities::Block<vtkDIYGhostUtilities::PolyDataBlockStructure, vtkDIYGhostUtilities::PolyDataInformation>*, vtkdiy2::Master::ProxyWithLink const&)#2} const&, std::function<bool (int, vtkdiy2::Master const&)> const&) (f=..., s=..., this=0x7ffc5bf22220)
    at /usr/include/c++/11/bits/std_function.h:211
#21 vtkDIYGhostUtilities::ExchangeGhosts<vtkPolyData> (master=..., inputs=std::vector of length 4, capacity 4 = {...})
    at /home/peillexg/ParaView/VTK/Parallel/DIY/vtkDIYGhostUtilities.txx:414

```

Thanks in advance for your investigations.

PS: I tried to open an issue in ParaView’s Gitlab issues, but i received the following message:

```auto
The form contains the following error:
    Your issue has been recognized as spam and has been discarded.

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [June 22, 2023, 2:46am UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/2 "2023-06-22T02:46:28Z")

</div>

Cc: @Yohann_Bearzi

> [@guillaume\_Peillex](#):
>
> PS: I tried to open an issue in ParaView’s Gitlab issues, but i received the following message:
> 
> ```auto
> The form contains the following error:
> Your issue has been recognized as spam and has been discarded.
> 
> ```

Sorry about that; try to reduce the number of links. We had CAPTCHA-based spam stuff, but the spam was out of control (it seems to be scripts mediated by humans). Just stopping it outright has worked better (even if the false-positive rate is higher 😕 ).

---

<div class="post-metadata">

### Author: ![guillaume\_Peillex](https://discourse.paraview.org/user_avatar/discourse.paraview.org/guillaume_peillex/32/10449_2.png) [@guillaume\_Peillex](https://discourse.paraview.org/u/guillaume_Peillex)
#### Post date: [June 22, 2023, 6:21am UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/3 "2023-06-22T06:21:58Z")

</div>

@ben.boeckel thanks for the hint. I split the issue message and it worked:  
[https://gitlab.kitware.com/paraview/paraview/-/issues/22191](https://gitlab.kitware.com/paraview/paraview/-/issues/22191)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2023, 7:26am UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/4 "2023-06-29T07:26:20Z")

</div>

How did that issue disappeared ?

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [June 29, 2023, 4:15pm UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/5 "2023-06-29T16:15:20Z")

</div>

As Mathieu said, the post in gitlab #22191 says no such page exists… Post what you want in the gitlab bug post, and I will create it if desired.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2023, 4:19pm UTC](https://discourse.paraview.org/t/out-of-range-exception-when-using-ghostcellgenerator/12354/6 "2023-06-29T16:19:13Z")

</div>

There was a mixup in gitlab, a account was deleted by mistake, not @guillaume_Peillex fault.
