Maniphest T66986

macOS code signed release errors with Python ctypes
Closed, ResolvedBUG

Assigned To
Brecht Van Lommel (brecht)
Authored By
Brecht Van Lommel (brecht)
Jul 15 2019, 1:57 PM
Tags
  • BF Blender
  • Platform: macOS
Subscribers
Arto Kitula (akitula)
Brecht Van Lommel (brecht)
Brian Savery (bsavery)
Jeducious (jameshcrowther)
Sergey Sharybin (sergey)

Description

System Information
Operating system: macOS 10.14.5
Graphics card: n/a

Blender Version
Broken: Blender 2.80 rc1
Worked: buildbot, any unsigned build

Short description of error
Using ctypes in add-ons is failing to work in the release candidate build that is code signed and notarized.

Exact steps for others to reproduce the error
Run import ctypes in the console editor, a MemoryError will be thrown.

Revisions and Commits

rB Blender

Event Timeline

Brecht Van Lommel (brecht) lowered the priority of this task from 90 to High.Jul 15 2019, 1:57 PM
Brecht Van Lommel (brecht) created this task.
Brecht Van Lommel (brecht) added a project: Platform: macOS.
Brecht Van Lommel (brecht) mentioned this in T66754: macOS missing shortcuts and menu entries with 2.80 RC1.
Brecht Van Lommel (brecht) added a comment.Jul 15 2019, 1:59 PM
Brecht Van Lommel (brecht) added subscribers: Arto Kitula (akitula), Sergey Sharybin (sergey).Jul 15 2019, 1:59 PM
Jeducious (jameshcrowther) added a subscriber: Jeducious (jameshcrowther).Jul 15 2019, 2:37 PM

thanks @Brecht Van Lommel (brecht) :D

Brecht Van Lommel (brecht) claimed this task.Jul 15 2019, 2:44 PM
Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved by committing rBe66c3589a2a6: Fix T66986: errors with add-ons using ctypes in macOS release.Jul 15 2019, 3:01 PM
Brecht Van Lommel (brecht) added a commit: rBe66c3589a2a6: Fix T66986: errors with add-ons using ctypes in macOS release.
Brecht Van Lommel (brecht) added a comment.EditedJul 15 2019, 3:01 PM

The latest build should work now, it's identical to the previous one except for different code signing:
https://download.blender.org/release/Blender2.80/blender-2.80rc1-macOS.dmg

Brian Savery (bsavery) added a subscriber: Brian Savery (bsavery).Jul 15 2019, 9:49 PM

Hi @Brecht Van Lommel (brecht) . I'm still seeing an issue with that link you sent.

Here's the error

types.CDLL(str(rpr_lib_path))
  File "/Applications/Blender.app/Contents/Resources/2.80/python/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/bsavery/Library/Application Support/Blender/2.80/scripts/addons/rprblender/libRadeonProRender64.dylib, 6): no suitable image found.  Did find:
	/Users/bsavery/Library/Application Support/Blender/2.80/scripts/addons/rprblender/libRadeonProRender64.dylib: code signature in (/Users/bsavery/Library/Application Support/Blender/2.80/scripts/addons/rprblender/libRadeonProRender64.dylib) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)

We don't sign the dylibs that come with RPR.

Brecht Van Lommel (brecht) added a commit: rBc42b7f843464: Fix T66986: fix dylib plugins on macOS not working in code signed release.Jul 15 2019, 10:23 PM
Brecht Van Lommel (brecht) changed the task status from Resolved to Unknown Status.Jul 15 2019, 11:02 PM

No time to test today to replace the official build, but this one should work in theory:
https://download.blender.org/ftp/brecht/builds/blender-2.80rc1-macOS.dmg

Brian Savery (bsavery) added a comment.Jul 15 2019, 11:36 PM

Thanks @Brecht Van Lommel (brecht) That seems to do the trick.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Jul 16 2019, 12:21 PM

Official build updated now.