PhotogrammetrySession cannot be created

Hi, I'm using the sample code to create a 3D object from photos using PhotogrammetrySession but it returns this error:

Error creating session: cantCreateSession("Native session create failed: CPGReturn(rawValue: -11)")

Sample code I've used is this and this.

Any idea?

Thanks in advance!

Accepted Reply

Hi, that error code means that your hardware is not supported. This is typically caused by the GPU not supporting the neccesary features. What Mac are you running PhotogrammetrySession on?

  • This session https://developer.apple.com/videos/play/wwdc2021/10076/ provides the supported GPU types, at the 2 minute 32 second mark.

  • I've got 2019 Mac Pro with 32GB Ram and 8GB Radeon Pro 580X gpu, and still have same issue

  • Although my device is older, but it should be able to run because it just reaches the threshold. My device is iMac 27" 2017 - GPU Radeon Pro 570 4 GB, RAM 16 GB. But it has the same issue too.

Replies

Hi, that error code means that your hardware is not supported. This is typically caused by the GPU not supporting the neccesary features. What Mac are you running PhotogrammetrySession on?

  • This session https://developer.apple.com/videos/play/wwdc2021/10076/ provides the supported GPU types, at the 2 minute 32 second mark.

  • I've got 2019 Mac Pro with 32GB Ram and 8GB Radeon Pro 580X gpu, and still have same issue

  • Although my device is older, but it should be able to run because it just reaches the threshold. My device is iMac 27" 2017 - GPU Radeon Pro 570 4 GB, RAM 16 GB. But it has the same issue too.

Thanks for your reply!

I'm using a 2018 Mac mini, so definitely it's not supported.

In Apple's slides it says that 4GB of VRAM is required.

Actually I was able to run it on my Macbook Air (Intel), which should not be supported. A eGPU is connected (Radeon Pro 580 8 G😎 but it entirely used only the integrated Intel GPU. Still gave a USDZ result

  • Turning "prefer external GPU" for the Terminal - always needed for the Terminal 😛 - seems to force the eGPU calculation

  • yeah same. There doesn’t seem to be an option for selecting one of multiple GPUs for the photogrammetry session in the API at all.

  • can I ask - do you still see the "Prefer external GPU" checkbox in the latest macOS 12 beta? I upgraded from Big Sur to beta 5 a few days ago, and that checkbox is not there in the file inspector window at all.

Add a Comment

I am running it on MacBookPro 2017 mid and getting the same error ... oh no 🙈   Model Name: MacBook Pro

  Model Identifier: MacBookPro14,3

  Processor Name: Quad-Core Intel Core i7

  Processor Speed: 2.8 GHz

  Number of Processors: 1

  Total Number of Cores: 4

  L2 Cache (per Core): 256 KB

  L3 Cache: 6 MB

  Hyper-Threading Technology: Enabled

  Memory: 16 GB

Adding a comment that I am facing the same issue, on a 2013 Intel Mac Pro (which has 64GB RAM and AMD FirePro D700 6GB ). Per the comment above, this seems to satisfy the requirements per the WWDC 2021 session 10076.

I've got a iMac late 2017 with enough RAM (16GB) and VRAM (8GB). Same error for me. Anybody knows a workaround?

Hello, same issue. When I use Photogrammetry, I receive this error:
Error creating session: cantCreateSession("Native session create failed: CPGReturn(rawValue: -11)") .

My specs are listed below. I think My macBook Pro should be supported. Please let me know if I missed something or if there is a fix for the issue.

Model Name: MacBook Pro (2019)
Model Identifier: MacBookPro15,2
Processor Name: Quad-Core Intel Core i7
Processor Speed: 2.8 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB