question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation fault in TerracottaDriver.insert with Shapely > 1.8.0

See original GitHub issue

Python: 3.9 OS / Architecture: macOS arm64

I encountered a segmentation fault whenever I tried inserting any raster with TerracottaDriver.insert. This was in an ingestion script that was previously working fine, with images that had once been successfully ingested.

After stepping through the code with PDB, I identified this line as the one causing the segfaults https://github.com/DHI-GRAS/terracotta/blob/5cbe5412a7caf566a1bee0fcddad7d1d9e3ab8ca/terracotta/raster.py#L157

I was on Shapely 1.8.2, the newest release of Shapely, at the time of writing. The latest version of Shapely that was found not to cause segfaults is 1.8.0.

I’m reporting this upstream with Shapely but leaving this here in case others have the same issue. Tagging as wontfix, as there’s not much we can do about it.

@dionhaefner it might make sense for us to pin Shapely to 1.8.0 if we get more reports of people having this problem. This is most likely a problem with GEOS and might only be an issue on macOS arm64.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
dionhaefnercommented, Jul 13, 2022

Confirmed on my Mac. Let’s see what comes out of it.

0reactions
mrpgraaecommented, Aug 9, 2022

Seems to be fixed in the new 2.0 alpha 1 release, but that’s a new major version, so hopefully the fix gets back-ported to 1.8.x

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · DHI-GRAS/terracotta - GitHub
Segmentation fault in TerracottaDriver.insert with Shapely > 1.8.0 wontfix This will not be worked on. #270 opened on Jul 12 by mrpgraae.
Read more >
Getting “Segmentation fault: 11” with Shapely in Python on ...
I am trying to use OGR and Shapely to find the nearest street to a point. OSX 10.12.6. Python 3.5.2 :: Anaconda custom...
Read more >
python - segmentation fault pytest on shapely.geometry.box()
The following code fails when ran using pytest with the note "Fatal Python error: Segmentation fault" from shapely import geometry def ...
Read more >
Segmentation fault after install - build - Psi4
So I recently installed Psi4 1.3.2 for macOS with Python 3.7 from the installer, but I've been having a lot of problems.
Read more >
Segmentation Fault when importing PyTorch
Python 3.8.6; CUDA Version: 11.1; GPU is RTX 3090 with driver version 455.23.05; CPU: Intel Core i9-10900K; PyTorch version: 1.8.0+cu111 (I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found