[python] Segfault in element iterator
I'm running a freshly installed basic setup with python modules installed in my home folder. It's macOS Big Sur.
#!/usr/bin/env python3
from dune.grid import structuredGrid
gridView = structuredGrid([0,0],[1,1],[5,5])
for e in gridView.elements:
print(gridView.indexSet.index(e))
print("done")
I run this script and I get this output (shortened the output a bit where ...
)
0
1
2
3
...
21
22
23
24
[eduroam-193-157-160-95:15313] *** Process received signal ***
[eduroam-193-157-160-95:15313] Signal: Segmentation fault: 11 (11)
[eduroam-193-157-160-95:15313] Signal code: Address not mapped (1)
[eduroam-193-157-160-95:15313] Failing at address: 0x9
[eduroam-193-157-160-95:15313] [ 0] 0 libsystem_platform.dylib 0x00007fff203a9d7d _sigtramp + 29
[eduroam-193-157-160-95:15313] [ 1] 0 ??? 0x0000000000000000 0x0 + 0
[eduroam-193-157-160-95:15313] [ 2] 0 libstdc++.6.dylib 0x000000010dda731a _ZL16get_adjusted_ptrPKSt9type_infoS1_PPv + 74
[eduroam-193-157-160-95:15313] *** End of error message ***
Segmentation fault: 11
The segfault always occurs after the last element and as you can see done
is not printed anymore.
Might be the same thing causing problems in #124 (closed)? Any help on how to get out more information would be appreciated.
I added
import faulthandler
faulthandler.enable()
which gives me
Fatal Python error: Segmentation fault
Current thread 0x000000010b7cae00 (most recent call first):
File "<path_to_script>", line 9 in <module>
and line 9 is the line with the element for-loop.
I also tried only print(e)
to make sure this is not connected to the indexSet. The segfault persists.
Previously this had been working for me. But I haven't had time to look for the commit which might break this.
Edited by Timo Koch