openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.98k stars 2.55k forks source link

macos nightlies examples relying on libs crashes Xcode #8126

Closed artificiel closed 1 month ago

artificiel commented 2 months ago

after pulling hair on a messed up git-based workspace if figured i'd check the nightlies.

downloading of_v20240921_osx_release and opening the contained ofxAssimpExample.xcodeproj crashes Xcode (it just plain quits after clicking "Trust and open"). Same with opencvExample.xcodeproj

Tried a few examples with no bin libs dependencies and they work.

M1/14.5 and M2pro/14.4

chilina commented 1 month ago

Yes same thing here with macOS 14.5, Xcode 15.4, and fresh nightly of_v20240923_osx_release. Xcode crashes when the ofxAssimpExample.xcodeproj is opened. I've typically been using the 0.12.0 release, or a nightly from very close to the release date. And if I copy the ofxAssimpExample folder into the /examples/3d/ folder of the 0.12.0 release, I get a similar/same Xcode crash when I try to open its xcodeproj file. That example wasn't in the 0.12.0 release.

The polygonExample opens in Xcode without crashing, but compiling results in a couple of errors:

/Users/chilina/of_v20240923_osx_release/libs/pixman/lib/macos/pixman.xcframework:1:1 The signature of “pixman.xcframework” cannot be verified. /Users/chilina/of_v20240923_osx_release/libs/rtAudio/lib/macos/rtAudio.xcframework:1:1 The signature of “rtAudio.xcframework” cannot be verified.

forum thread: https://forum.openframeworks.cc/t/macos-15-probably-you-downloaded-the-wrong-package/43919

ofTheo commented 1 month ago

This seems to be the difference for the ofxAssimpModelLoaderExample - removing this top section fixes the crash on open issue.

image

Obviously the files are then missing, so I re-added the ofxAssimpModelLoader/src files to the project and it built and run without issue.

I am not sure if this was needed but I removed the signatures from the xcframeworks with:

codesign --remove-signature libs/*/lib/macos/*.xcframework
codesign --remove-signature addons/*/libs/*/lib/macos/*.xcframework

cc @dimitre @danoli3

dimitre commented 1 month ago

Yes, another nlohmann related issue. if you remove just the array containing "null" it will work. I'll take a look on this specific part soon.

dimitre commented 1 month ago

This is a hairy one. and greasy. nlohmann json is behaving differently from 3.11.2 to 3.11.3 Nightly scripts running in linux uses 3.11.3, causing the "null" array issue not happening on PG on macos.

macos libs is installing both versions so it is not clear which is being used https://github.com/openframeworks/apothecary/issues/436

so I checked out apothecary outside of to have access to bleeding branch (there is ambiguity in bleeding tag and branch there) https://github.com/openframeworks/apothecary/issues/435

I'm testing some alternative way of creating array with json in pg to see if it fixes the issue, but it is a wild guess.

dimitre commented 1 month ago

Ok, it seems to be working now. if yes, part of this issue is closed by https://github.com/openframeworks/projectGenerator/pull/575

xcframework signature is still erroring and there is a warning there also

Screenshot 2024-09-24 at 11 56 07
artificiel commented 1 month ago

OK good! but this means my assumption that it was related to the libs path as in #8125 was incorrect, and it's 2 distinct problems?

chilina commented 1 month ago

Yeah it sound like two different issues to me. Maybe we close this and I open one for the signing? I added those error messages just in case they were somehow related to the original issue.

dimitre commented 1 month ago

Yes it is a separate issue

chilina commented 1 month ago

OK I opened the signing errors as a separate issue #8135.

ofTheo commented 1 month ago

Amazing thanks @dimitre !!! Closing this as resolved: https://github.com/openframeworks/projectGenerator/pull/575