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

ARKit - crashing on basic project: SIGABRT pointer being freed was not allocated #25

Open
itslenny opened this issue Dec 8, 2021 · 5 comments

Comments

@itslenny
Copy link

itslenny commented Dec 8, 2021

I'm trying to build a basic app using the ARKit Plugin

As a starting point I pulled down the example project and started it up.

The camera turns on and it starts painting black on top of it. Then, after a few seconds I get a SIGABRT in xCode.

I went through the project commenting stuff out and it seems like as long as arkit.ar_is_anchor_detection_enabled = true the crash occurs after a few seconds even with with basically all other code commented out in the project.

2021-12-07 18:05:14.403095-0600 ARKit[11923:1119420] ERROR: Condition "!_p" is true.
2021-12-07 18:05:14.403211-0600 ARKit[11923:1119420]    at: _unref (core/dictionary.cpp:173) - Condition "!_p" is true.
ERROR: Condition "!_p" is true.
   at: _unref (core/dictionary.cpp:173) - Condition "!_p" is true.
ARKit(11923,0x10411f8c0) malloc: *** error for object 0x127293e10: pointer being freed was not allocated
ARKit(11923,0x10411f8c0) malloc: *** set a breakpoint in malloc_error_break to debug

Screen Shot 2021-12-07 at 6 05 47 PM

@itslenny itslenny changed the title ARKit - crashing on basic project SIGABRT pointer being freed was not allocated ARKit - crashing on basic project: SIGABRT pointer being freed was not allocated Dec 8, 2021
@itslenny
Copy link
Author

itslenny commented Dec 8, 2021

Also, intermittently getting this error as well.

Screen Shot 2021-12-07 at 6 32 28 PM

@akien-mga
Copy link
Contributor

CC @BastiaanOlij

@BastiaanOlij
Copy link

Dang it, I have long ago lost access to hardware to do any MacOS based development :( The last time I worked on ARKit was before it was turned into a iOS plugin.. I do plan to buy an iMac one of these days so I can get back into Apple development but right now my hands are tied.

From the error log my best guess is that the dictionary that keeps track of the anchors found by ARKit is being released prematurely.

@akien-mga
Copy link
Contributor

CC @godotengine/ios

@marius-se
Copy link

marius-se commented Sep 15, 2022

I can confirm ar_is_anchor_detection_enabled = true still causes the app to crash on my iPhone 11 Pro. Compiled with Godot 3.5 stable/ Xcode 13.4.1. Is there any workaround? I enabled the Address Sanitiser in Xcode and got the following error message:

Thread 21: signal SIGABRT

-[MTLDebugDevice newBufferWithBytesNoCopy:length:options:deallocator:]:687: failed assertion `Buffer Validation
newBufferWithBytesNoCopy:pointer 0x12cabc800 is not 4096 byte aligned.

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

No branches or pull requests

5 participants