I was trying to run my script and got this output:
orig file has 104424 rows and 161190 cols total ('window (row_start, row_stop), (col_start, col_stop)', ((55150, 72608), (13802, 31386))) ./my_script: line 3: 20326 Segmentation fault (core dumped) python -O my_main_functions.py $*
I ran through with pdb and found that the segfault was happening on my call to rasterio.open:
with rasterio.open(orig_data_file) as f: data = f.read(1, window=window)
The window was valid. I thought it might be a memory error, so in my debug session I tried doing so with a window of ((55150, 55151), (13802, 13803)) but I still got the segfault.
Why would rasterio segfault trying to read a tiny, valid window?