StandardCyborg / StandardCyborgSDK

A C++ SDK for 3D computer vision, paired with Cocoa frameworks for TrueDepth-based 3D scanning, meshing, and ML landmarking models + analysis for foot and ear
MIT License
47 stars 25 forks source link

Assertion failure when reconstructing mesh #12

Closed termoraq closed 6 months ago

termoraq commented 1 year ago

Hi everybody,

I am wondering that, is this repository is up to date? I mean; -Was the framework binary file in [StandardCyborgCocoa] repository built from [StandardCyborgSDK]?

because in my projects when I used the framework binary file in [StandardCyborgCocoa] repository, All goes well. But when I use the framework binary which is archived and built by me from [StandardCyborgSDK] my application commonly crashes at reconstrouctmesh phase.

framework from [StandardCyborgCocoa] ios-arm64(from standardcyborgcocoa).zip

framework from built by me ios-arm64(built by me).zip

aaptho commented 1 year ago

The framework binary in -Cocoa is indeed built from -SDK, and it is up to date.

Can you plase share the crash you’re seeing?

termoraq commented 1 year ago

hi aaptho thanks for your reply. here are the errors from truedepthfusion app with SDK

error

error2

When I change the framework to in -Cocoa repository. all goes well as I said

remeshing_dane

ps:

Also I wanna take your attention to another point.

when I checked the header files of framework in Cocoa. there are 2 files;

Only in ios-arm64/StandardCyborgFusion.framework/Headers: SCFaceLandmarking3D.h Only in ios-arm64/StandardCyborgFusion.framework/Headers: SCFaceTracking.h

these files are not in -SDK repository.

aaptho commented 1 year ago

This is failing an assertion within igl in igl::min_quad_with_fixed_precompute.

image

This assertion within MeshTopology::compute also fails SCASSERT(_edges[edgeCA].face1 == -1, "Non-manifold edge found in mesh topology”);

Repros 100% when using TrueDepthFusion to take a scan, then tapping Mesh.

@erkaman any ideas?

aaptho commented 1 year ago

when I checked the header files of framework in Cocoa. there are 2 files;

Only in ios-arm64/StandardCyborgFusion.framework/Headers: SCFaceLandmarking3D.h Only in ios-arm64/StandardCyborgFusion.framework/Headers: SCFaceTracking.h

these files are not in -SDK repository.

These files should have been removed earlier. They are now deleted from StandardCyborgFusion, and will be removed from the published framework with the next build.

termoraq commented 1 year ago

any progress or idea to solve the issue?

jeremyadoux commented 1 year ago

Hello,

Exactly the same problem here. What xCode version are you using to build the SDK framework?

For my part, I use xCode 14.3, and I have the same crash on mesh reconstruction. But, I build the SDK the last year, with xCode 14.1 and it worked fine.

Maybe the C++ compiler was changed between xCode version?

termoraq2 commented 1 year ago

Hi, I build with 14.3, and I think you may get the point. in 14.3 relase notes clang changed

Apple Clang Compiler New Features Clang and the build system support a new mode for building module dependencies called explicit modules which improves build performance, reliability, and correctness. The new mode is opt-in, and can be enabled by setting _EXPERIMENTAL_CLANG_EXPLICIT_MODULES as a user-defined build setting in C and Objective-C projects which build with modules enabled. (104438594)

The following C++23 features have been implemented:

New support for multidimensional subscript operator. (P2128R6)

Relaxed restrictions on the presence of non-literal variables (and labels and gotos) in constexpr functions (P2242R3).

Introduce auto(x) for decay-copy in the language (P0849R8). (104887755)

termoraq2 commented 1 year ago

now I tried to bulid with xcode 14.1 and yes it works. it is clear that problem is xcode 14.3 Apple Clang Compiler. needs a configuration or code update.

scratchthatitch commented 1 year ago

I have just updated the SCCocoa pod that includes the new version of SCFusion 2.3.3 and managed to build successfully but then when installed on device I get what seems to be a similar crash/bug with SCMeshReconstruction or SCMeshingHelper. I have built and installed previously in June using Xcode 14.3 I believe and it worked fine. I am still using 14.3 to install this version of the app.

Screenshot 2023-08-14 at 13 45 07
termoraq2 commented 1 year ago

@scratchthatitch it is not about your xcode version. 2 weeks ago, framework of StandardCyborgCocoa is updated. I guess it was built with xcode 14.3, that is why you are getting this error.

scratchthatitch commented 1 year ago

Oh, I see what you mean. You think when the framework was updated and compiled it was with a different version of Xcode and thus won’t work?


From: Termoraq @.> Sent: Tuesday, August 15, 2023 2:00 pm To: StandardCyborg/StandardCyborgSDK @.> Cc: Joshua Shires @.>; Mention @.> Subject: Re: [StandardCyborg/StandardCyborgSDK] Assertion failure when reconstructing mesh (Issue #12)

@scratchthatitchhttps://github.com/scratchthatitch it is not about your xcode version. 2 weeks ago, framework of StandardCyborgCocoa is updated. I guess it was built with xcode 14.3, that is why you are getting this error.

— Reply to this email directly, view it on GitHubhttps://github.com/StandardCyborg/StandardCyborgSDK/issues/12#issuecomment-1678897135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANS2IXZYRBZHYD7MKP2MKUDXVNXGLANCNFSM6AAAAAAZGMXA5M. You are receiving this because you were mentioned.Message ID: @.***>

termoraq2 commented 1 year ago

Oh, I see what you mean. You think when the framework was updated and compiled it was with a different version of Xcode and thus won’t work? ____ From: Termoraq @.> Sent: Tuesday, August 15, 2023 2:00 pm To: StandardCyborg/StandardCyborgSDK @.> Cc: Joshua Shires @.>; Mention @.> Subject: Re: [StandardCyborg/StandardCyborgSDK] Assertion failure when reconstructing mesh (Issue #12) @scratchthatitchhttps://github.com/scratchthatitch it is not about your xcode version. 2 weeks ago, framework of StandardCyborgCocoa is updated. I guess it was built with xcode 14.3, that is why you are getting this error. — Reply to this email directly, view it on GitHub<#12 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANS2IXZYRBZHYD7MKP2MKUDXVNXGLANCNFSM6AAAAAAZGMXA5M. You are receiving this because you were mentioned.Message ID: @.***>

yes

scratchthatitch commented 1 year ago

@aaptho would we be right in assuming this?

scratchthatitch commented 1 year ago

@termoraq2 Just to confirm. You have been able to build and install and test on device the latest SCSDK 2.3.3 using Xcode 14.1 but not 14.3? Is that correct?

termoraq2 commented 1 year ago

@termoraq2 Just to confirm. You have been able to build and install and test on device the latest SCSDK 2.3.3 using Xcode 14.1 but not 14.3? Is that correct?

Yes I build standardcyborgsdk using xcode 14.1, I build and install my own app with this sdk and it works. Also I build standardcyborgsdk using xcode 14.3.1, I build and install my own app with this sdk and it crashed. I think problem is xcode 14.3 c++ compiler.

aaptho commented 6 months ago

Great news—this is now fixed with https://github.com/StandardCyborg/StandardCyborgSDK/pull/15! With this fix, it shouldn’t matter anymore what version of Xcode you are using to build either the SDK or your app.

The fix is in StandardCyborgFusion version 2.3.6, now published to CocoaPods.