Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export ARSCNFaceGeometry wrapped in MDLAsset fail on iOS 14 with EXC_BAD_ACCESS #38

Open
ctoseankim opened this issue Nov 9, 2020 · 0 comments

Comments

@ctoseankim
Copy link

trying to export a sequence of OBJ from GARAugmentedFaceSession

In the following project, I just added the following code snippet to export OBJs;
https://github.com/google-ar/arcore-ios-sdk/tree/master/Examples/AugmentedFacesExample

Into Ln 236 from FacesViewControllers.swift;

    // Added
    let mdlMesh = MDLMesh(scnGeometry: faceTextureNode.geometry!)
    let asset = MDLAsset()
    asset.add(mdlMesh)
    do {
        let directory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
        let obj_url = directory!.appendingPathComponent("test_\(id).obj")
        try asset.export(to: obj_url) // iOS14
        self.id += 1
    }
    catch {
        print("SCNSceneRendererDelegate:renderer :: Can't write mesh to url")
    }

The weird thing is it works fine in iOS13, but crashes in iOS14.
I am using the latest version of ARCore,1.20.0

If I just use ARSCNFaceGeometry, it works fine.
But I want to use GARAugmentedFaceSession for better results.

Any idea why it crashes on iOS14?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant